Production-ready FastAPI project scaffolding for teams that want a usable starting point instead of an empty repo.
Fastix is a CLI package that generates FastAPI projects with opinionated defaults for application structure, local development, testing, deployment, and common platform integrations.
It is designed for two workflows:
- Bootstrap a new FastAPI codebase quickly.
- Evolve an existing Fastix-generated project with additional modules later.
- Scaffold monolith and microservices layouts.
- Generate optional Docker or Podman assets.
- Add PostgreSQL, MySQL, or MongoDB support.
- Add Redis, Kafka, or RabbitMQ messaging integrations.
- Add Celery or RQ workers, plus Celery Beat or Kubernetes CronJob scheduling.
- Generate Helm, Kustomize, or raw Kubernetes manifests.
- Include logging, testing, editor tooling, and task runner templates.
- Inspect project state and add supported modules incrementally after generation.
pip install fastixFor the interactive prompt flow:
pip install "fastix[interactive]"Create a project interactively:
fastix initCreate a project non-interactively:
fastix init my_api \
--arch monolith \
--db postgres \
--queue redis \
--worker celery \
--container docker \
--k8s helm \
--logging api_logger \
--cicd gitlab_ciCreate a microservices workspace:
fastix init platform_api \
--arch microservices \
--services gateway,users,orders \
--protocol grpc \
--db postgres \
--queue redis \
--worker celery \
--container docker \
--k8s kustomize \
--daprGenerates a new project from the selected architecture and module set.
Examples:
fastix init billing_api --db postgres --container docker
fastix init --arch microservicesShows the manifest and active modules for an existing Fastix project.
fastix inspect .Adds or switches a supported incremental module in an existing project.
fastix add-module dapr --path .
fastix add-module container.podman --path .
fastix add-module orchestration.helm --path .Lists modules that can be safely added to an existing generated project.
fastix list-modulesPrints the current supported architectures, transports, and tooling options.
fastix infomonolithmicroservices
postgresmysqlmongodbnone
rediskafkarabbitmqnone
- Workers:
celery,rq,none - Schedulers:
celery_beat,cronjob,none
- Containers:
docker,podman,none - Orchestration:
helm,kustomize,raw_manifests,none
- Logging:
api_logger,none - Scripting:
makefile,justfile,taskfile,none - CI/CD option in config:
github_actions,gitlab_ci,none
Fastix-generated projects can include:
- versioned API routing
- environment-based configuration
- health endpoints
- response and error helper scaffolding
- testing templates
- container and deployment assets
- messaging and background job scaffolding
- optional README and editor config files
The exact output depends on the CLI flags and architecture selected at generation time.
python -m venv .venv
source .venv/bin/activate
pip install -e '.[dev,interactive]'
pytest -qBuild the package locally:
python -m build
python -m twine check dist/*This repository is set up to support GitHub-based packaging and release automation.
Recommended repository secrets:
PYPI_API_TOKEN: PyPI token used for package publishing
Recommended release flow:
- Update version metadata in pyproject.toml and src/fastix/init.py.
- Update CHANGELOG.md.
- Push a version tag such as
v0.2.1. - Let GitHub Actions build, validate, and publish the package.
Contributors should keep changes aligned with the current module registry and CLI surface.
Typical extension points:
- Add or update templates under src/fastix/templates.
- Register new modules in src/fastix/modules/register.py.
- Extend CLI options in src/fastix/cli/main.py.
- Add or update tests under tests.
Before opening a PR:
- run
pytest -q - run
python -m build - verify generated output for the feature you changed
MIT. See LICENSE.