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:
- Clone the repository
git clone https://github.com/raihanhd12/fastapi-project-creator.git
cd fastapi-project-creator
- Install in development mode
pip install -e .
- 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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file fastapi_project_creator-0.1.1.tar.gz.
File metadata
- Download URL: fastapi_project_creator-0.1.1.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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ce481c3e50e46ba4b69b4f222991238a0326b51bf1388609e898ac63c809ae92
|
|
| MD5 |
52d6a12e81c1c45e176577cceba1f841
|
|
| BLAKE2b-256 |
1a7b3608138b435bbf6a62e5fdcddd8d65e01ee9a5b63eb8e9b987891faccac3
|
File details
Details for the file fastapi_project_creator-0.1.1-py3-none-any.whl.
File metadata
- Download URL: fastapi_project_creator-0.1.1-py3-none-any.whl
- Upload date:
- Size: 5.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ffbe657143feed969af2b4b93f93cc9520bd7d42703f3634d3c399ef7ad7d7af
|
|
| MD5 |
f84e73e387ecc49e7b80888fca30fe5d
|
|
| BLAKE2b-256 |
aabdd17c5c4dae6157458bfc61723068363c90b8f0ddb7474842e53a693686c1
|