Skip to main content

flaskit

PyPI version Python versions License: GPL-3.0 Docs CI publish

CLI scaffolding for Flask + Flask-Smorest APIs: modular resources, auto-discovery, local Swagger UI, JSON logging (optional OpenTelemetry), BASE_PATH for every route and asset, and a production Docker image with bjoern.

Documentation: flaskit.readthedocs.io · source under docs/

pip install -e ".[docs]"
mkdocs serve

Install

pip install flaskit-cli
# or from source
pip install -e .

PyPI name is flaskit-cli (flaskit / flask-it are taken or blocked); the CLI and import stay flaskit.

Requires Python 3.10+ for the CLI. Generated apps target 3.11–3.13 (3.12 recommended; see .python-version).

Quick start

flaskit init myapi
cd myapi
python3.12 -m venv .venv
# Windows PowerShell (if scripts are blocked):
#   Set-ExecutionPolicy -Scope Process -ExecutionPolicy Bypass
#   .\.venv\Scripts\Activate.ps1
pip install -U pip && pip install -r requirements.txt
flaskit generate module users
python app.py

Open http://127.0.0.1:5000/docs.

CLI

Command Description
flaskit init [path] Scaffold project (app.py, flat config.py, resources/, assets/, templates/)
flaskit generate module <name> Create resources/<name>/ with flask_bp + smorest_blp stubs

Layout

app.py                 # create_app, init_app
config.py              # flat UPPER_CASE settings from env
templates/
  swagger_ui.html      # Swagger UI page (Jinja)
resources/
  users/
    blueprint.py       # Flask blueprint (flask_bp) + URL_PREFIX
    resource.py        # Smorest blueprint (smorest_blp) + CRUD
    schema.py          # Request / Response schemas
assets/
  swagger-ui/          # local Swagger UI (no CDN)
  statics/             # public files at {BASE_PATH}/assets/statics/...

Highlights

  • BASE_PATH applies to API routes, /docs, and /assets
  • Timezone via TIMEZONE (IANA); log fields include timezone / tz_offset
  • Logging to stream and/or file; optional OTel with the same sinks when enabled
  • Docker on Python 3.13; bjoern installed in-image only
  • Versioning of the flaskit package itself from git tags (setuptools-scm)

Publish (maintainers)

Push a tag v* to trigger .github/workflows/publish.yml. Set repository secret PYPI_API_TOKEN only (Python/PyPI URL are fixed in the workflow).

License

GPL-3.0-or-later. See LICENSE.

Metadata

Release files for flaskit-cli 0.2.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for flaskit-cli 0.2.1
File Size Uploaded Provenance Actions
flaskit_cli-0.2.1.tar.gz 544.9 kB Without provenance Details for flaskit_cli-0.2.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for flaskit-cli 0.2.1
File Interpreter ABI Platform Actions
flaskit_cli-0.2.1-py3-none-any.whl Python 3 none any Details for flaskit_cli-0.2.1-py3-none-any.whl

Total release size: 1.1 MB

Release files / flaskit_cli-0.2.1.tar.gz

Download URL flaskit_cli-0.2.1.tar.gz
Size 544.9 kB
Tags Source
SHA-256 checksum
How to use checksums
a26210f86f80fb95e3603d8511e8b0e3d57ba56d6510cc5dbe72afb2bcac4f46
BLAKE2b-256 checksum
How to use checksums
fc9378a45c8139acb52a0e3473e5894c064413b7925110766c624352c31695d0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.16

Release files / flaskit_cli-0.2.1-py3-none-any.whl

Download URL flaskit_cli-0.2.1-py3-none-any.whl
Size 529.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
dda795224f335be0c891e74453251cdde47368a1ce66318825c0e57113eb2d11
BLAKE2b-256 checksum
How to use checksums
354e6930ae39901dcd6ad451356bfaf00f678a903dcaf12c4d84cbc4070c37e5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.16

Security for flaskit-cli 0.2.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page