Skip to main content

A Flask scaffolding tool

Project description

flask Horn: A Flask scaffolding tool

PyPI - License PyPI - Python Version PyPI - Implementation PyPI Build Status Codecov

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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

horn_py-0.6.5.tar.gz (181.7 kB view details)

Uploaded Source

Built Distribution

horn_py-0.6.5-py3-none-any.whl (34.6 kB view details)

Uploaded Python 3

File details

Details for the file horn_py-0.6.5.tar.gz.

File metadata

  • Download URL: horn_py-0.6.5.tar.gz
  • Upload date:
  • Size: 181.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: python-httpx/0.24.1

File hashes

Hashes for horn_py-0.6.5.tar.gz
Algorithm Hash digest
SHA256 f5310c5005b642c8ab15a2aa0f0deb9a63054171e8156c34dc36bc95aac341e9
MD5 6eb4fe0bb9d42382c1a28d94e80a977e
BLAKE2b-256 1490fad6f6256d74a04c74002b157617a8509a05ac20783f0d339588634f4a8d

See more details on using hashes here.

File details

Details for the file horn_py-0.6.5-py3-none-any.whl.

File metadata

  • Download URL: horn_py-0.6.5-py3-none-any.whl
  • Upload date:
  • Size: 34.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: python-httpx/0.24.1

File hashes

Hashes for horn_py-0.6.5-py3-none-any.whl
Algorithm Hash digest
SHA256 0a5c2928bef026f823a8a5e5334ac82ef2eeedff582f616013738dc002021489
MD5 2fcfa9bb9b892e95bc71259fb23fa7ad
BLAKE2b-256 8c9ad334bb2c71732aef46844e3a7ecc3ca66218b45f1d3e10e2d8dabe60342c

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page