Skip to main content

Flask based library to help structure an application with an eye towards CLI apps, not just web.

Project description

Flac

mive app pypi-version

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):

  1. Ensure host dependencies are installed

  2. Start docker service dependencies (if applicable):

    docker compose up -d

  3. Sync project virtualenv w/ lock file:

    uv sync

  4. Configure pre-commit:

    pre-commit install

  5. 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


Download files

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

Source Distribution

flask_flac-0.20250725.1.tar.gz (88.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

flask_flac-0.20250725.1-py3-none-any.whl (15.5 kB view details)

Uploaded Python 3

File details

Details for the file flask_flac-0.20250725.1.tar.gz.

File metadata

  • Download URL: flask_flac-0.20250725.1.tar.gz
  • Upload date:
  • Size: 88.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for flask_flac-0.20250725.1.tar.gz
Algorithm Hash digest
SHA256 f2f22ed65269135d02cf8119efe467fb5ed0fac3d33a7aef820c3f8fb8b61ead
MD5 344e322b26f30d433219eb896680672f
BLAKE2b-256 e8187d9854dbd50256557c3c9fef03edb368c50da6b636373be20c25209764af

See more details on using hashes here.

Provenance

The following attestation bundles were made for flask_flac-0.20250725.1.tar.gz:

Publisher: pypi.yaml on rsyring/flac

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file flask_flac-0.20250725.1-py3-none-any.whl.

File metadata

File hashes

Hashes for flask_flac-0.20250725.1-py3-none-any.whl
Algorithm Hash digest
SHA256 7a42bde5c09b0a176460d7d1a75ef5ba1025c45f088a1f60eb7b892e357cae92
MD5 2b671830ab3e30ddd6f4a187bfddb279
BLAKE2b-256 060a355605e588372b5f3b3f2c73f16001a6d500ec99392f40ab5bd269fefbcd

See more details on using hashes here.

Provenance

The following attestation bundles were made for flask_flac-0.20250725.1-py3-none-any.whl:

Publisher: pypi.yaml on rsyring/flac

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

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