Skip to main content

CLI tool to generate FastAPI project structure

Project description

FastAPI Generator

A simple CLI tool to generate FastAPI project structure, inspired because I haven't found a way to quickly create the folder structure.

Installation

# Install from PyPI
pip install fastapi-project-creator

# Or install directly from GitHub
pip install git+https://github.com/raihanhd12/fastapi-project-creator.git

Usage

# Create a new FastAPI project
create-fastapi-app my-project-name

This will generate a complete FastAPI project structure with the following features:

  • Organized directory structure following best practices
  • Pre-configured API router setup
  • Database connection with SQLAlchemy
  • Environment variable configuration
  • Ready-to-use project structure

Project Structure

my-project-name/
├── app/
│   ├── api/
│   │   ├── endpoints/
│   │   │   └── __init__.py
│   │   ├── __init__.py
│   │   └── api.py
│   ├── core/
│   │   ├── __init__.py
│   │   └── config.py
│   ├── db/
│   │   ├── __init__.py
│   │   └── session.py
│   ├── models/
│   │   └── __init__.py
│   ├── schemas/
│   │   └── __init__.py
│   ├── utils/
│   │   └── __init__.py
│   ├── __init__.py
│   └── main.py
├── tests/
├── .env
├── requirements.txt
└── README.md

Getting Started

After creating your project:

cd my-project-name
pip install -r requirements.txt
uvicorn app.main:app --reload

Then open http://localhost:8000 in your browser.

Development

To contribute to this project:

  1. Clone the repository
git clone https://github.com/raihanhd12/fastapi-project-creator.git
cd fastapi-project-creator
  1. Install in development mode
pip install -e .
  1. Make your changes and test them with
create-fastapi-app test-project

License

MIT

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_project_creator-0.1.2.tar.gz (4.7 kB view details)

Uploaded Source

Built Distribution

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

fastapi_project_creator-0.1.2-py3-none-any.whl (5.3 kB view details)

Uploaded Python 3

File details

Details for the file fastapi_project_creator-0.1.2.tar.gz.

File metadata

  • Download URL: fastapi_project_creator-0.1.2.tar.gz
  • Upload date:
  • Size: 4.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.6

File hashes

Hashes for fastapi_project_creator-0.1.2.tar.gz
Algorithm Hash digest
SHA256 9d9321930b64e27036490ffbd0f8861ee6651e6ee4e59921da4210d5d59f0540
MD5 8e98f65613cc0e9f96d5ad090f664100
BLAKE2b-256 1d83bbcbf007c3e9120b454543b5ef660f35a7d12c78ac5cf5cf40bf1b2c7dec

See more details on using hashes here.

File details

Details for the file fastapi_project_creator-0.1.2-py3-none-any.whl.

File metadata

File hashes

Hashes for fastapi_project_creator-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 c17d5474da55d106fdff5b0f73325b33a73fa375d1eb7e04e8ef3516e6aaa9b6
MD5 d989f3bf2703354177413c2385db0152
BLAKE2b-256 6ca811c8c124f7af8f468b7b1fdfd9c9e1173278eb26d5746e7df1e6004fcd04

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