Skip to main content

API Project Starter Kit

Interactive Python CLI that generates production-ready backend boilerplates for FastAPI, Flask, and Django.

Templates are written in Jinja2 — extend them without touching generator logic.

Features

  • One-question-at-a-time interactive flow (Questionary + Rich)
  • Frameworks: FastAPI · Flask · Django
  • Databases: PostgreSQL · MySQL · SQLite · MongoDB · None
  • ORMs filtered by framework
  • Background jobs: Celery · RQ · Dramatiq · APScheduler (+ Redis / RabbitMQ / Kafka)
  • Auth: JWT · OAuth · API Key
  • REST or GraphQL
  • Docker + docker-compose
  • Pytest / Unittest samples
  • Ruff · Black · Mypy · pre-commit
  • GitHub Actions CI
  • Structlog / Loguru / stdlib logging
  • CRUD module scaffolding (Users, Products, Orders, …)

Install

pip install api-project-starter-kit

From source (editable):

python -m venv .venv
source .venv/bin/activate
pip install -e ".[dev]"

Usage

api-starter

# Or as a module
python -m api_starter

# Custom output directory
api-starter --output ~/projects

Answer the prompts, confirm the summary, and a complete project is written to disk.

Layout

api_starter/
├── cli.py                 # Typer entry point
├── generator.py           # Façade
├── prompts.py             # Interactive questions
├── config.py              # Dataclasses & enums
├── validators.py          # Input validation
├── template_engine.py     # Jinja2 wrapper
├── template_registry.py   # Config → template map
├── project_builder.py     # Render + write files
├── filesystem.py          # Path helpers
├── utils/
└── templates/
    ├── fastapi/
    ├── flask/
    ├── django/
    └── shared/            # Docker, CI, jobs, modules, quality

Extending templates

  1. Add a .j2 file under api_starter/templates/<framework>/ or shared/.
  2. Register it in template_registry.py (TemplateMapping).
  3. Use context keys from ProjectConfig.to_template_context() (project_name, package_name, has_database, modules_meta, …).

Programmatic use

from api_starter.config import (
    Framework, Database, ORM, BackgroundJobs, Authentication,
    APIType, TestingFramework, LoggingLibrary, ProjectConfig,
)
from api_starter.generator import Generator

config = ProjectConfig(
    project_name="demo-api",
    framework=Framework.FASTAPI,
    database=Database.SQLITE,
    orm=ORM.SQLALCHEMY,
    background_jobs=BackgroundJobs.NO,
    authentication=Authentication.JWT,
    api_type=APIType.REST,
    docker=True,
    testing=TestingFramework.PYTEST,
    logging=LoggingLibrary.STRUCTLOG,
    github_actions=True,
    output_dir=".",
)

Generator().generate(config)

Publishing to PyPI

pip install -e ".[dev]"
python -m build
twine check dist/*
# TestPyPI first (recommended)
twine upload --repository testpypi dist/*
# Then production PyPI
twine upload dist/*

Create an API token at https://pypi.org/manage/account/token/ and use:

  • Username: __token__
  • Password: pypi-... (your token)

Metadata

Release files for api-project-starter-kit 1.0.2

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

Source distribution (sdist)

Source distribution for api-project-starter-kit 1.0.2
File Size Uploaded
api_project_starter_kit-1.0.2.tar.gz 51.5 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for api-project-starter-kit 1.0.2
File Interpreter ABI Platform
api_project_starter_kit-1.0.2-py3-none-any.whl Python 3 none any Details

Total release size: 136.0 kB

Release files / api_project_starter_kit-1.0.2.tar.gz

Download URL api_project_starter_kit-1.0.2.tar.gz
Size 51.5 kB
Tags Source
SHA-256 checksum
How to use checksums
85ea25e058bbee090c626e4dd1abd768beb164869f99d30e4268f713bb42e4d1
BLAKE2b-256 checksum
How to use checksums
a340aadc6d2aff87175a149fb5519a200948307ee15f6ebf2cef8bf70bb1a423
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.11

Release files / api_project_starter_kit-1.0.2-py3-none-any.whl

Download URL api_project_starter_kit-1.0.2-py3-none-any.whl
Size 84.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
1671268e2a433e3276eac314df29605f70123f0508acf3389ae56ad39e224843
BLAKE2b-256 checksum
How to use checksums
e502f69ca95de366a0ec33bc4cabd610c08d33d40b1af4a949e3f1b19b12350a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.11

Release history Release notifications | RSS feed

This release

1.0.2 This release

2 release files

1.0.0

2 release files

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