horn v0.1.4 mix horn.new View Source

Creates a new Horn-Flask project.

It expects the path of the project as an argument.

mix horn.new PATH [--app APP]

A project at the given PATH will be created. The default app folder name is "app" unless --app is given.

Options

  • --app - the name of the application folder. default value is app

  • --proj - the name of the project, the default value is the capitalized given PATH. for example, if the PATH is foo_bar, the default project name is FooBar

  • --pypi - the mirror of pypi, eg: pypi.doubanio.com

  • --bare - if set, horn will create a bare project without user module

Example

mix horn.new foo_bar --app foobar --pypi=pypi.doubanio.com --bare

the project directory structure looks like:

.
 foobar
   configs
     ...
   core
     ...
   models
     ...
   schemas
     ...
   views
     ...
   ....
 instance
   ...
 log/
 test
   ...
 Pipfile
 README.md
 ...

you will find:

  • app - the app folder is renamed to foobar.

  • Pipfile - in section [[source]], the url become https://pypi.doubanio.com/simple

  • README.md - the project name is FooBar