Skip to main content

A CLI tool to scaffold FastAPI projects with CRUD and schema support

Project description

FasterAPI banner

FasterAPI

Scaffold FastAPI APIs faster with a focused CLI for backend teams.

PyPI Version Python Versions License Monthly Downloads Last Commit

Quick Start · Demo · Command Reference · Contributing

Why FasterAPI

nats-fasterapi helps you skip repetitive setup and move straight to business logic.

  • Generate Pydantic schemas with one command
  • Generate CRUD repositories and service layers
  • Generate versioned FastAPI routes quickly
  • Generate token repository and auth dependency utilities
  • Auto-mount routes into main.py
  • Works in interactive and automation-friendly flows

Demo

FasterAPI CLI demo

CLI Preview Screens

Generating schema CRUD service and route

FasterAPI help output screenshot

Installation

pip install nats-fasterapi

Upgrade:

fasterapi update

Quick Start

# 1) Create a schema
fasterapi make-schema user

# 2) Generate repository and service
fasterapi make-crud user
fasterapi make-service user

# 3) Generate a versioned route
fasterapi make-route user --version-mode highest-number

# 4) Mount routes into main.py
fasterapi mount

Run the app in development mode:

fasterapi run-d

Command Reference

Command Purpose
new <name> Create a new project in a new folder
new-here Scaffold a new project in the current folder
make-schema <name> Generate a Pydantic schema
make-crud <name> Generate CRUD repository functions
make-service <name> Generate service layer template
make-route <name> [--version-mode ...] Generate route files with API versioning
make-account <name> Clone the user account scaffold into a new role module
make-token-repo [roles...] Generate token repository for roles
split-user [--force] Interactively split user into custom non-admin roles
unsplit-user [--force] Collapse split custom roles back into canonical user
make-token-deps Generate token dependency utilities
mount Mount routes into main.py
email add-template Interactively add a built-in email template example
email mount Mount templates from email_templates/ into the email singleton
email mount-custom Move templates from custom_templates/ and mount them
run-d Run dev server (uvicorn main:app --reload)
update Upgrade FasterAPI CLI

new vs new-here

  • fasterapi new <name> creates a new directory (./<name>) and scaffolds the project inside it.
  • fasterapi new-here scaffolds directly into your current directory (./) without creating a new folder.
  • new-here is safety-checked and will stop if template paths already exist in the current directory.

Route Versioning Modes

  • highest-number
  • latest-modified

Token Repo Defaults

If no roles are provided to make-token-repo, defaults are:

admin, user

Email Templates

fasterapi email add-template first asks what kind of template you need, then shows available examples.

Built-in examples (10):

  • changing-password
  • invitation
  • new-signin
  • otp
  • revoking
  • welcome
  • password-reset
  • email-verification
  • receipt
  • account-deactivated

Then mount templates with:

fasterapi email mount

For custom files placed in custom_templates/:

fasterapi email mount-custom

If mounting fails, check email_mount_errors.log in the project root.

Typical Workflow

fasterapi make-schema product
fasterapi make-crud product
fasterapi make-service product
fasterapi make-route product --version-mode latest-modified
fasterapi mount
fasterapi run-d

Roadmap

  • Improve new and new-here bootstrap customization
  • SQLAlchemy repository generators (PostgreSQL/MySQL)
  • Config-driven scaffolding via fasterapi.yaml
  • CI/CD template generation
  • Better Docker/Docker Compose scaffolding
  • Shell autocompletion support

Contributing

git clone https://github.com/nathanieluriri/faster-api.git
cd faster-api
pip install -e .
pytest

Issues and pull requests are welcome.

License

Licensed under the MIT License.

© 2026 Nathaniel Uriri

Project details


Release history Release notifications | RSS feed

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

nats_fasterapi-0.2.93.tar.gz (99.3 kB view details)

Uploaded Source

Built Distribution

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

nats_fasterapi-0.2.93-py3-none-any.whl (138.9 kB view details)

Uploaded Python 3

File details

Details for the file nats_fasterapi-0.2.93.tar.gz.

File metadata

  • Download URL: nats_fasterapi-0.2.93.tar.gz
  • Upload date:
  • Size: 99.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.10.10

File hashes

Hashes for nats_fasterapi-0.2.93.tar.gz
Algorithm Hash digest
SHA256 d9754cb532b13cc233ca59772420e21e708a95cdf12f59f1f24078620af141f5
MD5 d6bce5547e0485e679c8ce90d7ae1c48
BLAKE2b-256 60e1bfc90cfdb592b3b66d2a3a1f068c086985ace4d49b02f05ba7318bf593ec

See more details on using hashes here.

File details

Details for the file nats_fasterapi-0.2.93-py3-none-any.whl.

File metadata

  • Download URL: nats_fasterapi-0.2.93-py3-none-any.whl
  • Upload date:
  • Size: 138.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.10.10

File hashes

Hashes for nats_fasterapi-0.2.93-py3-none-any.whl
Algorithm Hash digest
SHA256 57ac66b6e0f4a2fd18862119603eec2710524587118dc1c2e5ec66bdd87982f8
MD5 abed7446d5eeb9e9a5e7eaac399f0d58
BLAKE2b-256 5294cc7ddbe9f324be58d3c09df4be433442e061dfacee73127e9b51487f25f2

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