Horn: A Flask scaffolding tool
Installation
$ pip install horn-py
Usage
Usage:
horn new <target> [--app=<app> --proj=<proj> --pypi=<pypi> --bare]
horn new <target> <from> [<checkout>] [--json=<json>] [-f=PATH | --file=PATH]
horn gen api <module> <table> <fields>...
horn gen model <module> <table> <fields>...
horn gen schema <module> (<fields>... | --model=<model> | <fields>... --model=<model>)
horn -h | --help
horn --version
Options:
--app=<app> App name [default: app].
--proj=<proj> Project name.
--pypi=<pypi> Pypi domain.
--bare Bare project.
--json=<json> Json string [default: {}].
-f=PATH, --file=PATH Json file PATH.
--model=<model> Schema baseed on model.
-h, --help Show this screen.
--version Show version.
Examples:
horn new tmp/foo_bar --app foobar --proj FooBar
horn new tmp/foo_bar https://github.com/bigfang/drf-starter.git --json '{"app":"someapp"}'
horn gen api Post posts title:string:uniq content:text:nonull author:ref:users
horn gen model Post posts title:string:uniq:index content:string:nonull author:ref:users:nonull
horn gen schema Post title:string content:string author:nest:user
Notes:
Model attrs: uniq => unique=True, nonull => nullable=False,
index => index=True, default:val => default=val
Schema attrs: dump => dump_only, load => load_only, exclude => exclude,
required => required=True, none => allow_none=True
Release files for horn-py 0.6.5
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| horn_py-0.6.5.tar.gz | 181.7 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| horn_py-0.6.5-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 216.3 kB
Release files / horn_py-0.6.5.tar.gz
| Download URL | horn_py-0.6.5.tar.gz |
|---|---|
| Size | 181.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
f5310c5005b642c8ab15a2aa0f0deb9a63054171e8156c34dc36bc95aac341e9
|
|
BLAKE2b-256 checksum How to use checksums |
1490fad6f6256d74a04c74002b157617a8509a05ac20783f0d339588634f4a8d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
python-httpx/0.24.1
|
Release files / horn_py-0.6.5-py3-none-any.whl
| Download URL | horn_py-0.6.5-py3-none-any.whl |
|---|---|
| Size | 34.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
0a5c2928bef026f823a8a5e5334ac82ef2eeedff582f616013738dc002021489
|
|
BLAKE2b-256 checksum How to use checksums |
8c9ad334bb2c71732aef46844e3a7ecc3ca66218b45f1d3e10e2d8dabe60342c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
python-httpx/0.24.1
|