Flask based library to help structure an application with an eye towards CLI apps, not just web.
Project description
Flac
Flask based library to help structure an application with an eye towards CLI apps, not just web.
Features
-
App factory pattern
- blueprints (web & CLI)
-
CLI Integration
- custom command
- two-phase init for blueprints
-
Configuration
- .env & .flaskenv
- from files
- from environment
- alternate settings for testing, dev, prod
-
Logging
- logs are probably cheap, don't prematurely optimize
- centralize your logs to an aggregation service
- .info logs are show/saved by default
- cli output is plain text
- saved logs are JSON
- saved logs go to syslog, let devops handle the aggregation
-
Testing
- alternate DB URI
- pytest & fixtures
-
Flask-SQLAlchemy
- ext init
- fixtures to get db to ensure app context
-
Celery
- refresh process pool
-
cli integration with the ability to customize the app's configuration using global cli options
someapp --debug --with-sentry run-some-task
-
pytest fixtures for app initialization
-
demo cli test that uses separate process
Develoment
Copier Template
Project structure and tooling mostly derives from the Coppy, see its documentation for context and additional instructions.
This project can be updated from the upstream repo, see Updating a Project.
Project Setup
From zero to hero (passing tests that is):
-
Ensure host dependencies are installed
-
Start docker service dependencies (if applicable):
docker compose up -d -
Sync project virtualenv w/ lock file:
uv sync -
Configure pre-commit:
pre-commit install -
Run tests:
nox
Versions
Versions are date based. A bump action exists to help manage versions:
# Show current version
mise bump --show
# Bump version based on date, tag, and push:
mise bump
# See other options
mise bump -- --help
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file flask_flac-0.20250522.1.tar.gz.
File metadata
- Download URL: flask_flac-0.20250522.1.tar.gz
- Upload date:
- Size: 88.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2929f89cef5d27cb833126e897646269cb779272422ab2005819d14433e52a47
|
|
| MD5 |
bdce622e4faab87084fcc900a6b2b8c7
|
|
| BLAKE2b-256 |
5606a8ef8e13298f90810599b5cf8d1d0a9762c65e9137cc198ef79d3f725006
|
Provenance
The following attestation bundles were made for flask_flac-0.20250522.1.tar.gz:
Publisher:
pypi.yaml on rsyring/flac
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
flask_flac-0.20250522.1.tar.gz -
Subject digest:
2929f89cef5d27cb833126e897646269cb779272422ab2005819d14433e52a47 - Sigstore transparency entry: 218684354
- Sigstore integration time:
-
Permalink:
rsyring/flac@5d813bda07c41285df3c2e00b325e3f7f3953a3f -
Branch / Tag:
refs/tags/v0.20250522.1 - Owner: https://github.com/rsyring
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
pypi.yaml@5d813bda07c41285df3c2e00b325e3f7f3953a3f -
Trigger Event:
push
-
Statement type:
File details
Details for the file flask_flac-0.20250522.1-py3-none-any.whl.
File metadata
- Download URL: flask_flac-0.20250522.1-py3-none-any.whl
- Upload date:
- Size: 15.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
daab268eca5593766ed987d71d2144b1eb70b5c3f6ec67790644eb45dbb9a15b
|
|
| MD5 |
aedcfb23949d9e4aed353f2f1828b3f5
|
|
| BLAKE2b-256 |
5af2b8ed744b85e97a2fb126170ce2904ee6cb2d3285fdb30de47cd8e2bbced1
|
Provenance
The following attestation bundles were made for flask_flac-0.20250522.1-py3-none-any.whl:
Publisher:
pypi.yaml on rsyring/flac
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
flask_flac-0.20250522.1-py3-none-any.whl -
Subject digest:
daab268eca5593766ed987d71d2144b1eb70b5c3f6ec67790644eb45dbb9a15b - Sigstore transparency entry: 218684358
- Sigstore integration time:
-
Permalink:
rsyring/flac@5d813bda07c41285df3c2e00b325e3f7f3953a3f -
Branch / Tag:
refs/tags/v0.20250522.1 - Owner: https://github.com/rsyring
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
pypi.yaml@5d813bda07c41285df3c2e00b325e3f7f3953a3f -
Trigger Event:
push
-
Statement type: