Skip to main content

FastAPI-fastkit

FastAPI-fastkit: Fast, easy-to-use starter kit for new users of Python and FastAPI

PyPI - Version GitHub Release PyPI Downloads


This project was created to speed up the configuration of the development environment needed to develop Python-based web apps for new users of Python and FastAPI.

This project was inspired by the SpringBoot initializer & Python Django's django-admin CLI operation.

Key Features

  • ⚡ Immediate FastAPI project creation : Super-fast FastAPI workspace & project creation via CLI, inspired by django-admin feature of Python Django
  • ✨ Interactive project builder: Guided step-by-step feature selection for databases, authentication, caching, monitoring, and more with auto-generated code
  • 🎨 Prettier CLI output : Beautiful CLI experience powered by rich library
  • 📋 Standards-based FastAPI project templates : Templates follow Python standards and common FastAPI patterns.
  • 🔍 Automated template quality assurance : Weekly automated testing ensures all templates remain functional and up-to-date
  • 🚀 Multiple project templates : Choose from various pre-configured templates for different use cases (async CRUD, Docker, PostgreSQL, etc.)
  • 📦 Multiple package manager support : Choose your preferred Python package manager (pip, uv, pdm, poetry) for dependency management
  • 🧾 Reproducible project configs : Save an interactive session to a .json / .toml / .yaml file and replay it with fastkit init --config
  • 🏷️ Self-describing projects : Every generated project records its template, preset, package manager, entrypoint and selected features in a [tool.fastapi-fastkit] block that runserver and addroute read back

Installation

Install FastAPI-fastkit in your Python environment.

$ pip install FastAPI-fastkit

Usage

  • Global options
    • --help: Show help
    • --version: Show version
    • --debug/--no-debug: Toggle debug mode

Create a new FastAPI project

fastkit init [OPTIONS]
  • What it does: Scaffolds an empty FastAPI project, creates a virtual environment, installs dependencies
  • Key options:
    • --project-name, --author, --author-email, --description
    • --package-manager [pip|uv|pdm|poetry]
    • --config <path>: create the project from a saved config file (.json / .toml, and .yaml when PyYAML is installed) with no prompts
    • --save-config <path>: with --interactive, record the answers for later reuse
    • --dry-run: print the files and packages that would be created, write nothing
    • --no-venv: skip virtual environment creation (implies --no-install)
    • --no-install: skip dependency installation
    • --yes / -y: skip the "Overwrite these files?" confirmation when deploying in place
    • Stack selection: minimal | standard | full (interactive)

Create a project with interactive mode

fastkit init --interactive
  • What it does: Guided step-by-step project setup with intelligent feature selection
  • Features:
    • Architecture preset: minimal | single-module | classic-layered | domain-starter (default)
    • Database selection: PostgreSQL, MySQL, MongoDB, Redis, SQLite
    • Authentication: JWT, OAuth2, FastAPI-Users, Session-based
    • Background tasks: Celery, Dramatiq
    • Caching: Redis, fastapi-cache2
    • Monitoring: Loguru, OpenTelemetry, Prometheus
    • Testing: Basic (pytest), Coverage, Advanced (with faker, factory-boy)
    • Utilities: CORS, Rate-Limiting, Pagination, WebSocket
    • Logging: structured JSON logging with a request-id middleware
    • Migrations: Alembic (async env, baseline revision)
    • Tooling: ruff, pre-commit, GitHub Actions, devcontainer, Makefile (multi-select)
    • Deployment: Docker, docker-compose with auto-generated configs
    • Package manager: pip, uv, pdm, poetry
    • Custom packages: Add your own dependencies
  • Auto-generates (varies by preset — see the matrix for details):
    • main.py regenerated from selected features for minimal / single-module; preserved as-shipped for classic-layered / domain-starter
    • Database and authentication configuration files at preset-specific paths
    • Docker deployment files (Dockerfile, docker-compose.yml) with the preset's correct uvicorn entrypoint
    • Test configuration (pytest with coverage)
    • /health and /ready endpoints on every generated project
    • Real working code — not just installed packages — for background tasks, caching, WebSocket, pagination, OpenTelemetry, OAuth2 and session-based auth
    • --dry-run previews the exact file tree a run would create, including logging/migrations/tooling artifacts

Create a project from a template

fastkit startdemo [TEMPLATE] [OPTIONS]
  • What it does: Creates a project from a template (e.g., fastapi-default) and installs dependencies
  • Key options:
    • --project-name, --author, --author-email, --description
    • --package-manager [pip|uv|pdm|poetry]
    • --dry-run, --no-venv, --no-install, --yes/-y — same meaning as on init
    • Refuses to run if the target project directory already exists (--dry-run excepted)
  • Tip: List available templates with fastkit list-templates

New in v1.4.0: fastapi-auth-jwt (JWT auth with refresh rotation), fastapi-sqlmodel (async SQLModel + Alembic + generic CRUD), and fastapi-llm-agent (streaming Claude agent with a tool loop). fastapi-dockerized and fastapi-async-crud are deprecated — they still work, but are no longer recommended starting points.

Add a new route

fastkit addroute <project_name> <route_name>
  • What it does: Adds a new API route to the specified project

Run the development server

fastkit runserver [OPTIONS]
  • What it does: Starts the uvicorn development server
  • Key options:
    • --host, --port, --reload/--no-reload, --workers

List templates

fastkit list-templates

Delete a project

fastkit deleteproject <project_name>

Documentation

For comprehensive guides and detailed usage instructions, visit our documentation:

Contributing

We welcome contributions from the community! FastAPI-fastkit is designed to help newcomers to Python and FastAPI, and your contributions can make a significant impact.

Contributing Guide

Quick Start for Contributors

  1. Fork and clone the repository:

    git clone https://github.com/bnbong/FastAPI-fastkit.git
    cd FastAPI-fastkit
    
  2. Set up development environment:

    make dev-setup  # Sets up everything you need
    
  3. Run development checks:

    make dev-check  # Format, lint, and test
    

What You Can Contribute

  • 🚀 New FastAPI templates - Add templates for different use cases
  • 🐛 Bug fixes - Help us improve stability and reliability
  • 📚 Documentation - Improve guides, examples, and translations
  • 🧪 Tests - Increase test coverage and add integration tests
  • 💡 Features - Suggest and implement new CLI features

Contribution Guidelines

For detailed contribution guidelines, development setup, and project standards, please refer to:

Significance of FastAPI-fastkit

FastAPI-fastkit aims to provide a fast and easy-to-use starter kit for new users of Python and FastAPI.

This idea was initiated with the aim of helping FastAPI newcomers learn from the beginning, which aligns with the production significance of the FastAPI CLI package added with the FastAPI 0.111.0 version update.

As someone who has been using and loving FastAPI for a long time, I wanted to develop a project that could help fulfill the wonderful motivation that FastAPI developer tiangolo has expressed.

FastAPI-fastkit bridges the gap between getting started and building production-ready applications by providing:

  • Immediate productivity for newcomers who might be overwhelmed by setup complexity
  • Best practices built into every template, helping users learn proper FastAPI patterns
  • Scalable foundations that grow with users as they advance from beginners to experts
  • Community-driven templates that reflect real-world FastAPI usage patterns

License

This project is licensed under the MIT License - see the LICENSE file for details.

Release files for FastAPI-fastkit 1.4.0

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

Source distribution (sdist)

Source distribution for FastAPI-fastkit 1.4.0
File Size Uploaded
fastapi_fastkit-1.4.0.tar.gz 346.6 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for FastAPI-fastkit 1.4.0
File Interpreter ABI Platform
fastapi_fastkit-1.4.0-py3-none-any.whl Python 3 none any Details

Total release size: 754.2 kB

Release files / fastapi_fastkit-1.4.0.tar.gz

Download URL fastapi_fastkit-1.4.0.tar.gz
Size 346.6 kB
Tags Source
SHA-256 checksum
How to use checksums
3cb992c476b3358aac59156476b9fe456bc19dcac978dc9f81c3e11f744f50c1
BLAKE2b-256 checksum
How to use checksums
45a30ecd1f604718e8d413621dde577c728e0d951d3b6b500a337c60b9a6a7d8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 4, 2026.

Transparency log

Release files / fastapi_fastkit-1.4.0-py3-none-any.whl

Download URL fastapi_fastkit-1.4.0-py3-none-any.whl
Size 407.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
2174123b2c229f6c182ad489cbc22654bb097df28dd762250297af18488e7511
BLAKE2b-256 checksum
How to use checksums
c1c55b20fe17120d22397d746bd4d7579fd1edcd4fb3d29d54373a347ccc3795
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 4, 2026.

Transparency log

Release history Release notifications | RSS feed

1.4.1

2 release files

This release

1.4.0 This release

2 release files

1.3.0

2 release files

1.2.1

2 release files

1.2.0

2 release files

1.1.5

2 release files

1.1.4

2 release files

1.1.3

2 release files

1.1.2

2 release files

1.1.1

2 release files

1.1.0

2 release files

1.0.2

2 release files

1.0.1

2 release files

1.0.0

2 release files

0.1.1

2 release files

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