A CLI tool to scaffold FastAPI projects with ML, DB, Auth, and Docker options.
Project description
Updates to Make:
1. Version Bump in setup.py
Since you added commands and modified the template, update the version:
version="0.2.0",
2. Update README.md to Reflect New CLI Commands
Your cli.py
now includes:
serve
(Runs the API)install
(Installs dependencies)test
(Runs tests)info
(Shows CLI details)clean
(Removes__pycache__
)
Modify the README to mention these commands.
Updated README.md
# FastAPI Scaffold
[](https://pypi.org/project/fastapi-scaffold/)
[](https://www.python.org/)
[](LICENSE)
FastAPI Scaffold is a CLI tool to quickly generate FastAPI project structures with optional features like authentication, database integration, machine learning model setup, and Docker support.
## Installation
To install FastAPI Scaffold, run:
```sh
pip install fastapi-scaffold
Usage
To create a new FastAPI project, use:
fastapi-scaffold create my_project
This generates a FastAPI project in my_project/
.
Options
Customize the generated project using:
fastapi-scaffold create my_project --ml --db --auth --docker
--ml
→ Includes ML model boilerplate--db
→ Adds database setup--auth
→ Includes authentication--docker
→ Adds Docker support
Additional Commands
-
Run API server:
fastapi-scaffold serve --host 0.0.0.0 --port 8000
-
Install dependencies:
fastapi-scaffold install
-
Run tests:
fastapi-scaffold test
-
View CLI info:
fastapi-scaffold info
-
Clean
__pycache__
:fastapi-scaffold clean
Project Structure
A generated project follows this structure:
my_project/
│── app/
│ ├── main.py
│ ├── routes/
│ ├── models/
│ ├── services/
│ ├── db.py (if --db is used)
│ ├── auth.py (if --auth is used)
│── tests/
│── .env
│── Dockerfile (if --docker is used)
│── requirements.txt
│── README.md
Running the Project
cd my_project
pip install -r requirements.txt
uvicorn app.main:app --reload
API available at http://127.0.0.1:8000.
Contributing
Contributions welcome! Open an issue or PR.
License
MIT License. See LICENSE.
Project details
Release history Release notifications | RSS feed
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
File details
Details for the file fastapi_scaffold-0.2.0.tar.gz
.
File metadata
- Download URL: fastapi_scaffold-0.2.0.tar.gz
- Upload date:
- Size: 11.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.10.10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 |
84e6f9f359e5bd9df422ab408f4080cb193c94bae8df0fdfae00de7ca04377de
|
|
MD5 |
107a35968f07910f8504ecd1781fe136
|
|
BLAKE2b-256 |
e24385d99d253e05056d669c2be95ae099216ff9d6b490855f1221371698faf9
|
File details
Details for the file fastapi_scaffold-0.2.0-py3-none-any.whl
.
File metadata
- Download URL: fastapi_scaffold-0.2.0-py3-none-any.whl
- Upload date:
- Size: 10.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.10.10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 |
e512dc82f1ffccf90689131d51df435fe1f76aebf8dd1667fceccdb84970051c
|
|
MD5 |
8cf47659fbc609f030ddf7ccbaa4cf62
|
|
BLAKE2b-256 |
4311b37480f02247932af10bf1429fa2c695e2d562d6b7d5ef604e25789f830e
|