A CLI tool for bootstrapping FastAPI projects and apps
Project description
Faster API
Faster API is a Python CLI tool for scaffolding and managing FastAPI projects with a Django-inspired developer experience. It boosts productivity for large-scale projects by offering modular project structure, built-in user authentication, and out-of-the-box support for PostgreSQL via Docker.
Features
- Django-like commands:
startproject,startapp,runserver,makemigrations,migrate,createsuperuser - Modular project/app structure for scalable codebases
- Preconfigured with:
- SQLAlchemy
- Pydantic Settings module
- User, profile, and preference models
- Auth endpoints (OAuth2, registration, token refresh)
- Integrated PostgreSQL dev server powered by Docker
Installation
pip install tle-faster-api
CLI Usage
fasterapi <command> [options]
Commands
startproject <name> [--db_port <port>]: Create a new FastAPI projectstartapp <name>: Create a new app within the projectrunserver [--host <host>] [--port <port>]: Launch the development servermakemigrations: Generate a new Alembic migrationmigrate: Apply all migrationscreatesuperuser: Create an admin user interactivelydbup: Start a local PostgreSQL containerdbdown: Stop the database containerdbreset: Remove the database container and volume
Getting Started
fasterapi startproject myproject
cd myproject
cp .env.example .env
fasterapi dbup
fasterapi makemigrations
fasterapi migrate
fasterapi runserver
Creating an App
fasterapi startapp blog
Then update:
-
alembic/env.py:import app.blog.models
-
app/core/routers/v1.py:from app.blog import views as blog_views api_router.include_router(blog_views.router, prefix="/blog", tags=["blog"])
Creating a Superuser
fasterapi createsuperuser
PostgreSQL Dev Database
Faster API includes a docker-compose file to spin up a local PostgreSQL instance:
fasterapi dbup # Start DB
fasterapi dbdown # Stop DB
fasterapi dbreset # Destroy DB & volume
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 tle_faster_api-0.2.3.tar.gz.
File metadata
- Download URL: tle_faster_api-0.2.3.tar.gz
- Upload date:
- Size: 34.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d6737e8c8455ab9b6c3f858ce2646938e26c35efc62956de053097049e796ca9
|
|
| MD5 |
807ce78dbf647cbd4aba2fe376e6ec83
|
|
| BLAKE2b-256 |
8feb3ab4175470141afdf787ab0e2552fb442e9b35f857a6da85ae4325d94fc1
|
File details
Details for the file tle_faster_api-0.2.3-py3-none-any.whl.
File metadata
- Download URL: tle_faster_api-0.2.3-py3-none-any.whl
- Upload date:
- Size: 49.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
67cbe94c272d719de17e4fe004ba90f0b5e7d1a9e8b968fda5f96b8e0698a889
|
|
| MD5 |
dc94a2d4db57b71cbe307e9f1246b87d
|
|
| BLAKE2b-256 |
5d10a40f0d690893d751b7065133974ea19117b33b7dd47b57a98476e4670386
|