Skip to main content

A highly modular FastAPI project scaffolding CLI tool for the AI application era

Project description

ForgeAPI ๐Ÿš€

PyPI version Python License: MIT

A highly modular FastAPI project scaffolding CLI tool for the AI application era.

โœจ Features

  • ๐Ÿ—๏ธ Clean Architecture - Auto-generate API/Service/DAO layered structure
  • ๐Ÿ“ฆ Package Manager Choice - Support uv (default), Poetry, or pip
  • ๐Ÿ—„๏ธ Database Integration - SQLAlchemy (Async) + Alembic migrations
  • ๐Ÿณ Docker Ready - Optimized Dockerfile and docker-compose.yml
  • ๐Ÿ” JWT Authentication - Out-of-the-box auth module
  • โš™๏ธ Multi-Environment Config - dev/staging/prod configurations
  • ๐Ÿงช Testing Setup - Pytest + pytest-asyncio pre-configured
  • ๐Ÿค– AI-Powered (Coming Soon) - Generate models from natural language

๐Ÿ“ฆ Installation

# Using pipx (recommended)
pipx install forgeapi

# Using uv
uv tool install forgeapi

# Using pip
pip install forgeapi

๐Ÿš€ Quick Start

Interactive Mode

forge create my-awesome-api

Follow the interactive prompts to configure your project:

๐Ÿš€ ForgeAPI - Create New Project

? Project name: my-awesome-api
? Description: A awesome FastAPI project
? Author name: Your Name
? Author email: your@email.com
? Python version: 3.11

๐Ÿ“ฆ Package Manager
? Select package manager: uv (recommended)

๐Ÿ—„๏ธ Database
? Select database: PostgreSQL
? Enable Alembic migrations? Yes

๐Ÿ” Authentication
? Include JWT auth module? Yes

๐Ÿณ Docker
? Generate Docker configuration? Yes
? Generate docker-compose.yml? Yes

โœ… Project my-awesome-api created successfully!

Non-Interactive Mode

forge create my-api \
  --package-manager uv \
  --database postgres \
  --auth jwt \
  --docker \
  --no-interactive

๐Ÿ“ Generated Project Structure

my-awesome-api/
โ”œโ”€โ”€ app/
โ”‚   โ”œโ”€โ”€ api/           # API routes
โ”‚   โ”œโ”€โ”€ config/        # Configuration
โ”‚   โ”œโ”€โ”€ core/          # Core utilities
โ”‚   โ”œโ”€โ”€ daos/          # Data Access Objects
โ”‚   โ”œโ”€โ”€ exceptions/    # Exception handlers
โ”‚   โ”œโ”€โ”€ models/        # SQLAlchemy models
โ”‚   โ”œโ”€โ”€ schemas/       # Pydantic schemas
โ”‚   โ”œโ”€โ”€ services/      # Business logic
โ”‚   โ””โ”€โ”€ utils/         # Utilities
โ”œโ”€โ”€ alembic/           # Database migrations
โ”œโ”€โ”€ tests/             # Test suite
โ”œโ”€โ”€ Dockerfile
โ”œโ”€โ”€ docker-compose.yml
โ”œโ”€โ”€ pyproject.toml
โ””โ”€โ”€ README.md

๐Ÿ› ๏ธ Commands

Command Description
forge create <name> Create a new FastAPI project
forge version Show version information
forge --help Show help message

๐Ÿค– AI Features (Coming Soon)

# Generate SQLAlchemy model from description
forge add model "User with name, email, and subscription relationship"

# Generate CRUD API for a model
forge add api User --crud

๐Ÿ“š Documentation

๐Ÿค Contributing

Contributions are welcome! Please read our Contributing Guide for details.

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

๐Ÿ“„ License

This project is licensed under the MIT License - see the LICENSE file for details.

๐Ÿ™ Acknowledgments

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

forgeapi-0.1.1.tar.gz (35.7 kB view details)

Uploaded Source

Built Distribution

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

forgeapi-0.1.1-py3-none-any.whl (40.9 kB view details)

Uploaded Python 3

File details

Details for the file forgeapi-0.1.1.tar.gz.

File metadata

  • Download URL: forgeapi-0.1.1.tar.gz
  • Upload date:
  • Size: 35.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for forgeapi-0.1.1.tar.gz
Algorithm Hash digest
SHA256 b42101ab1243f8867f1a63ceff038a296e1bfa7dde60dcb46a03a260823517a9
MD5 7f329bf9fa16f728bc826d388ddf59de
BLAKE2b-256 64d88dbdcec16a629db5ba19ec4febe285c985887b2189aebee780e5a029bd52

See more details on using hashes here.

File details

Details for the file forgeapi-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: forgeapi-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 40.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for forgeapi-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 e985b9f3e253660bed6ffa1c6ebf76382972c16c1c13f6f5e2af36fe93516ac6
MD5 4f22a99575faf902224b44f292d06c4b
BLAKE2b-256 3bb0901f1c297336e12e0d694ae1b511693f5abf9a78073ab5197432c8003157

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