Skip to main content

Opinionated FastAPI project scaffolding CLI for services, monoliths, and monorepos.

Project description

fastio

fastio is an opinionated Python CLI that generates FastAPI projects for three shapes:

  • single service
  • modular monolith
  • monorepo microservices

It is designed around your standards:

  • Python + FastAPI
  • uv
  • Alembic
  • SQLAlchemy
  • Swagger at /docs
  • SQLAdmin
  • Celery + Redis
  • clean architecture
  • thin routers
  • business logic in services/
  • versioned APIs under /api/v1

Install

Local development

uv sync
uv run fastio --help

Editable install

uv pip install -e .
fastio --help

Quick start

Create a CRUD service:

uv run fastio create my-service --mode service --blueprint crud-service

Create a user service:

uv run fastio create user-service --mode service --blueprint user-service

Create a modular monolith:

uv run fastio create my-app --mode monolith

Create a monorepo:

uv run fastio create platform --mode monorepo

Publishing to PyPI

The project includes a GitHub Actions publish workflow using PyPI Trusted Publishing. PyPI’s docs recommend Trusted Publishing via OIDC because it avoids long-lived API tokens, and a pending publisher can create a new project on first release. Also note that a pending publisher does not reserve the name before first publish.

Commands

fastio create

Generate a new FastAPI project.

fastio create NAME [OPTIONS]

Arguments:

  • NAME - Project directory name (required)

Options:

  • --mode {service,monolith,monorepo} - Project shape (default: service)
  • --blueprint {base,crud-service,user-service} - Project template (default: base for monolith/monorepo, crud-service for service)
  • --database {sqlite,postgres} - Database backend (default: sqlite)
  • --sqlalchemy {sync,async} - SQLAlchemy mode (default: sync, async for user-service)
  • --sqladmin/--no-sqladmin - Include SQLAdmin (default: enabled)
  • --celery/--no-celery - Include Celery + Redis (default: enabled)
  • --docker/--no-docker - Include Dockerfile (default: enabled)
  • --tests/--no-tests - Include test suite (default: enabled)
  • --ci/--no-ci - Include GitHub Actions CI workflow (default: enabled)
  • --output-dir, -o - Output directory (default: current directory)
  • --interactive - Interactive mode with prompts for all options

Blueprints:

  • base - Minimal FastAPI project with core structure
  • crud-service - Full CRUD API with models, schemas, and services
  • user-service - User management service with authentication, OAuth, and FastAPI-Users

fastio version

Display the installed version.

fastio version

Usage Examples

Interactive mode

uv run fastio create my-project --interactive

CRUD service with PostgreSQL

uv run fastio create my-api --mode service --blueprint crud-service --database postgres

Async monolith

uv run fastio create my-app --mode monolith --sqlalchemy async

Minimal service without extras

uv run fastio create my-service --mode service --no-celery --no-sqladmin

Monorepo with custom output

uv run fastio create platform --mode monorepo --output-dir ./projects

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

fastapi_fastio-0.1.2.tar.gz (21.1 kB view details)

Uploaded Source

Built Distribution

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

fastapi_fastio-0.1.2-py3-none-any.whl (48.1 kB view details)

Uploaded Python 3

File details

Details for the file fastapi_fastio-0.1.2.tar.gz.

File metadata

  • Download URL: fastapi_fastio-0.1.2.tar.gz
  • Upload date:
  • Size: 21.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.2 {"installer":{"name":"uv","version":"0.11.2","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for fastapi_fastio-0.1.2.tar.gz
Algorithm Hash digest
SHA256 545054e406b9ef972669e47ee13c774e5e78d2be213f6b5b6d025a6a66db28f6
MD5 2b2bf5b65c7cd3e9a4b21b2dd5abb376
BLAKE2b-256 1d5f094d01b793e38397a137fc14fef7d2194ea9245a7a80067e192c270dc66e

See more details on using hashes here.

File details

Details for the file fastapi_fastio-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: fastapi_fastio-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 48.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.2 {"installer":{"name":"uv","version":"0.11.2","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for fastapi_fastio-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 339de1658e56b9c7be2683d6438bd05d9df68ae72587603d2fbaf942cbdc100d
MD5 087f6e9c095a30fc751226ec8877d498
BLAKE2b-256 423ecd097d392b885ad3861d88d1cc55b61fec3ec0e502734cad05bb66d8ad9d

See more details on using hashes here.

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