Forge Logo

PyPI version Python Versions License: MIT


Forge is a CLI tool that generates production-ready FastAPI projects. It collects your preferences through an interactive terminal interface, saves them to a configuration file, then generates a complete project structure with all the boilerplate code you need.

pip install ningfastforge
forge init

Why Forge?

Every time you start a new FastAPI project, do you find yourself repeating the same tasks?

  • Setting up database connections and ORM configuration

  • Implementing JWT authentication and user management

  • Integrating Redis caching and Celery task queues

  • Writing Docker and deployment configurations

  • Configuring test frameworks and CI/CD pipelines

Forge was built to solve this problem.

As a FastAPI developer, I got tired of building the same infrastructure from scratch for every new project. While there are many templates available online, they’re either too simple or too complex to customize.

Forge’s design philosophy:

  • Generate on demand: Only generate what you need, nothing more, nothing less

  • Production-ready: Generated code follows best practices and is ready for production

  • Easy to understand: Clean code structure that’s easy to maintain and extend

  • Quick start: Go from zero to a complete project skeleton in minutes

Features

  • Database Support: PostgreSQL, MySQL, SQLite with SQLModel or SQLAlchemy ORM

  • Authentication: JWT-based auth with two modes (basic or complete with email verification)

  • Caching: Redis integration for caching and session management

  • Background Tasks: Celery with Redis broker for async task processing

  • Testing: Pre-configured pytest with async support

  • Deployment: Docker and Docker Compose configurations

  • Migrations: Alembic database migrations

Additional