Skip to main content

CLI tool for generating FastAPI projects

Project description

๐Ÿš€ FastAPI Starter CLI

A CLI tool for generating FastAPI projects with predefined structure and automatic configuration.

โœจ Main Features

๐Ÿ“ Project Generation

  • Create new project with predefined structure
  • Initialize project in existing directory
  • Automatic file and directory generation

๐Ÿ›ข๏ธ Multi-Database Support

  • PostgreSQL
  • MySQL/MariaDB
  • SQL Server
  • Oracle
  • Automatic connection configuration

โš™๏ธ Automatic Configuration

  • Python virtual environment
  • Custom requirements.txt
  • Environment variables (.env)
  • Pydantic Settings
  • SQLModel ORM

๐Ÿ”ง Additional Features

  • Alembic migrations (optional)
  • Base Repository for CRUD (optional)
  • Modular and scalable structure
  • FastAPI best practices integration

๐Ÿš€ Main Commands

# Create new project
fastapi start create-project

# Initialize in current directory
fastapi start init-project

# Show version
fastapi cli version

๐Ÿ“ฆ Generated Structure

project/
โ”œโ”€โ”€ src/
โ”‚   โ”œโ”€โ”€ controller/      # API Controllers
โ”‚   โ”‚   โ””โ”€โ”€ __init__.py
โ”‚   โ”œโ”€โ”€ service/         # Business Logic
โ”‚   โ”‚   โ””โ”€โ”€ __init__.py
โ”‚   โ”œโ”€โ”€ repository/      # Data Access
โ”‚   โ”‚   โ””โ”€โ”€ __init__.py
โ”‚   โ”œโ”€โ”€ model/          # Domain Models
โ”‚   โ”‚   โ”œโ”€โ”€ entity/     # SQLModel Entities
โ”‚   โ”‚   โ”‚   โ””โ”€โ”€ __init__.py
โ”‚   โ”‚   โ”œโ”€โ”€ enum/       # Enumerations
โ”‚   โ”‚   โ”‚   โ””โ”€โ”€ __init__.py
โ”‚   โ”‚   โ””โ”€โ”€ __init__.py
โ”‚   โ”œโ”€โ”€ dto/            # Data Transfer Objects
โ”‚   โ”‚   โ””โ”€โ”€ __init__.py
โ”‚   โ”œโ”€โ”€ config/         # Configuration
โ”‚   โ”‚   โ”œโ”€โ”€ settings.py
โ”‚   โ”‚   โ””โ”€โ”€ __init__.py
โ”‚   โ”œโ”€โ”€ db/            # Database Config
โ”‚   โ”‚   โ”œโ”€โ”€ database.py
โ”‚   โ”‚   โ””โ”€โ”€ __init__.py
โ”‚   โ”œโ”€โ”€ main.py        # Entry Point
โ”‚   โ””โ”€โ”€ __init__.py
โ”œโ”€โ”€ test/              # Unit Tests
โ”‚   โ””โ”€โ”€ __init__.py
โ”œโ”€โ”€ .env              # Environment Variables
โ”œโ”€โ”€ requirements.txt   # Dependencies
โ””โ”€โ”€ README.md         # Documentation

๐Ÿ“ฆ Optional Packages

  • Alembic - SQL Migrations
  • SQLAlchemy Base Repository - Base CRUD

โš™๏ธ Requirements

  • Python 3.8+
  • pip (package manager)
  • Compatible database installed

๐Ÿš€ Installation

pip install fastapi-starter-cli

๐Ÿ“ License

MIT License

๐Ÿ‘ค Author

betooo

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_starter_cli-0.1.0.dev0.tar.gz (15.4 kB view details)

Uploaded Source

Built Distribution

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

fastapi_starter_cli-0.1.0.dev0-py3-none-any.whl (23.3 kB view details)

Uploaded Python 3

File details

Details for the file fastapi_starter_cli-0.1.0.dev0.tar.gz.

File metadata

File hashes

Hashes for fastapi_starter_cli-0.1.0.dev0.tar.gz
Algorithm Hash digest
SHA256 7580d1edf0e0a53ef94cdcc4297637f62d9489eb986ce7aabd6b9a9f26552855
MD5 e98e16664efb11d973c0fef4a8dcfb0c
BLAKE2b-256 5d3dabc44716ef3219fb0ded97085b02a438e46f42410a3d06ba9b48cba96aa3

See more details on using hashes here.

File details

Details for the file fastapi_starter_cli-0.1.0.dev0-py3-none-any.whl.

File metadata

File hashes

Hashes for fastapi_starter_cli-0.1.0.dev0-py3-none-any.whl
Algorithm Hash digest
SHA256 7d7264108e027299caca68577d4e012d9e7c53317ba27b739ae881f2c4da797e
MD5 de83d9326f1baf12ca839d7f5ccec808
BLAKE2b-256 378b259030913df6f7c0760ec8b845d53b83931c1181fd6d9f0816ee13a18943

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