Skip to main content

FastAPI Gen

Create production-ready FastAPI applications in seconds

From simple APIs to LLM-enabled applications, all without build configuration.

Test Status PyPI version Python versions Downloads License

Quick Start

Get a fully functional FastAPI app running in 30 seconds:

# Recommended: using uvx (no installation needed)
uvx fastapi-gen my_app
cd my_app && make start

Or install with uv:

uv tool install fastapi-gen
fastapi-gen my_app
cd my_app && make start

Or use pip:

pip install fastapi-gen
fastapi-gen my_app
cd my_app && make start

That's it! Open http://localhost:8000/docs to see your OpenAPI documentation.

Platform Support: Works on macOS and Linux | Report Issues

Why FastAPI Gen?

Focus on Code - Skip boilerplate setup and start building Production Ready - Enterprise patterns and best practices built-in Testing Included - Real test coverage from day one Zero Config - Ready-to-run templates that just work


Templates Overview

Hello World - Perfect for Learning FastAPI

Best for: Learning FastAPI fundamentals and starting new projects

Key Features:

  • REST API fundamentals with complete CRUD
  • Configuration management (pydantic-settings & dotenv)
  • Dependency injection and clean architecture
  • Background tasks and exception handling
  • Input validation and health monitoring
  • Complete test coverage

View Details →

Advanced - Enterprise Production Template

Best for: Production applications with enterprise features

Key Features:

  • JWT authentication with registration and login
  • Database integration with SQLAlchemy 2.0 async
  • Rate limiting and caching system
  • WebSocket support and file upload
  • Enhanced security and CORS configuration
  • Full test suite

View Details →

NLP - Comprehensive AI Language Processing

Best for: AI applications with natural language processing

Key Features:

  • 8 NLP capabilities: summarization, NER, generation, QA, embeddings, sentiment, classification, similarity
  • Production architecture with startup model loading
  • Smart configuration and device auto-detection
  • Performance optimized with model caching
  • Real AI testing with actual inference

View Details →

LangChain - Modern LLM Integration

Best for: Applications using LangChain for LLM workflows

Key Features:

  • Optimized loading with startup caching
  • Modern LangChain patterns and best practices
  • Smart config with auto device detection
  • Production ready with health checks
  • Dual endpoints: text generation and question answering

View Details →

Llama - Local LLM Powerhouse

Best for: Local LLM inference with llama-cpp-python

Key Features:

  • Local LLM focus optimized for Gemma/Llama GGUF models
  • GPU acceleration with auto detection
  • Advanced config for context windows and threading
  • Production ready with lifecycle management
  • Easy setup with auto model download

Requirements: ~4GB model download + 4GB+ RAM

View Details →


Template Comparison

Template Best For Complexity AI/ML Database Auth
Hello World Learning, Simple APIs Basic No No No
Advanced Production Apps Medium No Yes Yes
NLP AI Text Processing Advanced Yes No No
LangChain LLM Workflows Advanced Yes No No
Llama Local LLM Advanced Yes No No

What You Get Out of the Box

Zero ConfigurationProduction PatternsComplete TestingCode QualityAuto DocumentationDeployment Ready

Focus on Your Code, Not Setup

All dependencies (FastAPI, Pydantic, Pytest, etc.) are preconfigured. Just create and run:

fastapi-gen my_app   # Create
cd my_app            # Enter  
make start           # Run!

Every Template Includes:

  • Ready-to-run development environment
  • Industry-standard project structure
  • Comprehensive test suites with examples
  • Ruff linting and formatting
  • Auto-generated OpenAPI documentation
  • Makefile with common development commands

Installation & Usage

You'll need to have Python 3.11+ or later version on your local development machine. We recommend using the latest version. You can use uv for Python version management and project workflows.

Choose Your Template

# Default (hello_world)
uvx fastapi-gen my_app

# Or specify a template
uvx fastapi-gen my_app --template <template-name>

Available templates: hello_world, advanced, nlp, langchain, llama

Built-in Commands

Inside the newly created project, you can run:

make start

Runs the app in development mode.
Open http://localhost:8000/docs to view OpenAPI documentation in the browser.

The page will automatically reload if you make changes to the code.

make test

Runs tests.
By default, runs tests related to files changed since the last commit.

License

fastapi-gen is distributed under the terms of the MIT license.

Download files

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

Source Distribution

fastapi_gen-0.12.1.tar.gz (41.2 kB view details)

Uploaded Source

Built Distribution

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

fastapi_gen-0.12.1-py3-none-any.whl (62.2 kB view details)

Uploaded Python 3

File details

Details for the file fastapi_gen-0.12.1.tar.gz.

File metadata

  • Download URL: fastapi_gen-0.12.1.tar.gz
  • Upload date:
  • Size: 41.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.13

File hashes

Hashes for fastapi_gen-0.12.1.tar.gz
Algorithm Hash digest
SHA256 044c4c23d362c103c1d1aadec7708d9962a2c0e9b55396b1b4c846b6b01f6f7e
MD5 325acb3db0700aca7da816ad858ad839
BLAKE2b-256 040cf96a3311c4940684175760dce650b49c212c004f418266e1ee7ee2bac2e9

See more details on using hashes here.

File details

Details for the file fastapi_gen-0.12.1-py3-none-any.whl.

File metadata

  • Download URL: fastapi_gen-0.12.1-py3-none-any.whl
  • Upload date:
  • Size: 62.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.13

File hashes

Hashes for fastapi_gen-0.12.1-py3-none-any.whl
Algorithm Hash digest
SHA256 9e46a3d0d9af824396bc9e1a4bf2e97c944bb93c3af8b97431457b6f3d44327c
MD5 5206d1d53139ec5f2f1370e4fefa0986
BLAKE2b-256 41df2230cc064d4d22750d1fbf0beda4144471e813758a010a2ca090f89597d5

See more details on using hashes here.

Release history Release notifications | RSS feed

0.13.1

2 files

0.13.0

2 files

This release

0.12.1 This release

2 files

0.12.0

2 files

0.11.2

2 files

0.11.1

2 files

0.11.0

2 files

0.10.0

2 files

0.9.0

2 files

0.8.0

2 files

0.7.1

2 files

0.7.0

2 files

0.6.4

2 files

0.6.1

2 files

0.6.0

2 files

0.5.4

2 files

0.5.1

2 files

0.4.0

2 files

0.3.0

2 files

0.2.0

2 files

0.1.1

2 files

0.1.0

2 files

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page