Skip to main content

GitHub Actions status PyPi Shield License Shield uv version Read The Docs Badge

:cookie: cookiecutter-fastapi-backend

Cookiecutter template to build and deploy fastapi backends to your favorite PaaS..batteries included.

Supported PaaS's:

  • Render
  • DigitalOcean
  • Platform.sh (Coming soon)
  • Fly.io (Coming soon)

Quickstart

Install the latest Cookiecutter if you haven't installed it yet:

# pipx is strongly recommended.
$ pipx install cookiecutter

# If pipx is not an option,
# you can install cookiecutter in your Python user directory.
$ python -m pip install --user cookiecutter

Generate project from GitHub template:

$ pipx run cookiecutter gh:nickatnight/cookiecutter-fastapi-backend

Or from Python code:

from cookiecutter.main import cookiecutter

cookiecutter("gh:nickatnight/cookiecutter-fastapi-backend")

Features

  • :whale: Docker & Docker Compose integration and optimization for local development. Fast bundles using build stages and uv
  • :computer: Production ready Python web server using FastAPI
  • :pencil2: SQLModel Library for interacting with SQL databases from Python code, with Python objects. It is designed to be intuitive, easy to use, highly compatible, and robust
  • :light_rail: Alembic Lightweight database migration tool for usage with the SQLAlchemy Database Toolkit for Python
  • :floppy_disk: postgresql Powerful open source object-relational database
  • :convenience_store: Redis In-memory data structure store, used as a distributed, in-memory key–value database, cache and message broker
  • :gear: Common Base models and repository classes for common CRUD operations and database schemas.
  • :seedling: Celery Asynchronous task or job queue
  • :inbox_tray: Continuous Integration/Deployment Modular GitHub Actions to lint, test, and deploy to your favorite platform-as-a-service. Automatically includes Codecov reporting.
  • :leftwards_arrow_with_hook: pre-commit Git hooks to maintain code quality using modern tooling (ruff, black, isort)
  • :rocket: Sentry Application monitoring and error tracking. You can sign up for free at sentry.io

Input Variables

The generator (cookiecutter) will ask you for some data, you might want to have at hand before generating the project.

The input variables, with their default values (some auto generated) are:

  • project_name: The name of the project
  • author_email: The authors email...for maintainer info in pyproject.toml
  • py_version: The version of Python to install. Options are 3.9, 3.10, and 3.11
  • db_container_name: The name of the database container. Default db
  • backend_container_name: The name of the backend container. Default backend
  • use_celery: Whether to use Celery and Redis for asynchronous tasks. Default no
  • periodic_tasks: Whether to use Celery Beat for periodic tasks. Default no
  • use_sentry: Whether to use Sentry for application monitoring and error tracking. Default no
  • github_username: The username of the GitHub user. Used for badge display in generated project README.md
  • deployments: Deploy to your favorite platform, Render.com, DigitalOcean, (and more to come). Default none

Documentation

See full documentation here.

Release files for cookiecutter-fastapi-backend 2.5.1

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

Source distribution (sdist)

Source distribution for cookiecutter-fastapi-backend 2.5.1
File Size Uploaded
cookiecutter_fastapi_backend-2.5.1.tar.gz 7.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for cookiecutter-fastapi-backend 2.5.1
File Interpreter ABI Platform
cookiecutter_fastapi_backend-2.5.1-py3-none-any.whl Python 3 none any Details

Total release size:13.0 kB

Release files / cookiecutter_fastapi_backend-2.5.1.tar.gz

Download URL cookiecutter_fastapi_backend-2.5.1.tar.gz
Size 7.1 kB
Tags Source
SHA-256 checksum
How to use checksums
8f80bab5b15151eb1b641b82d84b560a32c16e19ef066d20ee985b05edaa1c47
BLAKE2b-256 checksum
How to use checksums
cc05ac614d2dc4bb7d5b2e7d61a6f949f74f42c2760606723270bb48f6daeb8c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.12.9

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 Jul 21, 2025.

Transparency log

Release files / cookiecutter_fastapi_backend-2.5.1-py3-none-any.whl

Download URL cookiecutter_fastapi_backend-2.5.1-py3-none-any.whl
Size 5.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
0a2eca3d53e86b9de25d8a59accf8bd09c9277a4c44622ba5262e873d3000cc1
BLAKE2b-256 checksum
How to use checksums
a61e39c16156c9a74df8c0db9c9061b39e8c693201b8b3177744f9fd172ea8e3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.12.9

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 Jul 21, 2025.

Transparency log

Release history Release notifications | RSS feed

This release

2.5.1 This release

2 release files

2.5.0

2 release files

2.4.1

2 release files

2.4.0

2 release files

2.3.0

2 release files

2.2.1

2 release files

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