| Crates.io | faspi |
| lib.rs | faspi |
| version | 1.2.0 |
| created_at | 2025-05-09 08:30:20.401896+00 |
| updated_at | 2025-05-10 06:52:22.529502+00 |
| description | ๐ CLI generator for FastAPI projects with hexagonal architecture |
| homepage | |
| repository | https://github.com/1Terabit/faspi |
| max_upload_size | |
| id | 1666613 |
| size | 369,342 |
ย
A powerful and efficient CLI for generating FastAPI projects with hexagonal architecture, written in Rust.
cargo install faspi
# Create new project
faspi new myapp
# Generate components
faspi make route user
faspi make model user
faspi make service user
faspi make core user
faspi make ports user
faspi make infrastructure user
When creating a new project, you can include additional features:
# Create project with optional features
faspi new myapp --sql # Include SQLAlchemy ORM support
faspi new myapp --supabase # Include Supabase integration
faspi new myapp --auth # Include JWT authentication
faspi new myapp --cors # Include CORS middleware
faspi new myapp --cache # Include Redis and FastAPI-Cache support
faspi new myapp --tasks # Include Celery task queue and Flower monitoring
# Combine multiple features
faspi new myapp --sql --auth --cache
myapp/
โโโ app/
โ โโโ __init__.py
โ โโโ main.py
โ โโโ routes/
โ โ โโโ __init__.py
โ โ โโโ example_router.py
โ โโโ models/
โ โ โโโ __init__.py
โ โโโ services/
โ โ โโโ __init__.py
โ โโโ core/
โ โ โโโ __init__.py
โ โโโ ports/
โ โ โโโ __init__.py
โ โ โโโ example_port.py
โ โโโ infrastructure/
โ โโโ __init__.py
โ โโโ example_impl.py
โโโ tests/
โ โโโ __init__.py
โ โโโ conftest.py
โ โโโ test_example.py
โโโ .env.example
โโโ .gitignore
โโโ requirements.txt
โโโ README.md
The CLI generates the base structure, and you choose your preferred environment:
# Example with venv
cd myapp
python -m venv .venv
source .venv/bin/activate # On Windows: .venv\Scripts\activate
pip install -r requirements.txt
uvicorn main:app --reload
For more details about available commands:
faspi --help
faspi make --help
This project is licensed under the MIT License - see the LICENSE (English) and LICENSE.es (Spanish) files for details.