A reusable FastAPI project initializer with production-oriented templates.
Project description
inifastapi
inifastapi is a reusable FastAPI project initializer. It generates a stronger personal FastAPI engineering template around a fixed layout: app/, app/api/v1/, app/config/, app/schemas/, app/services/, app/utils/, plus top-level dockers/, scripts/, tests/, logs/, and optional alembic/.
Requirements
uv must be installed on the machine. The scaffold uses uv both to run the CLI and to bootstrap the generated FastAPI project.
Usage
You do not need to install inifastapi first if it has been published. The recommended one-off command is:
uvx inifastapi init
uvx inifastapi init my-service
More examples:
uvx inifastapi init my-service --with-database --with-auth
uvx inifastapi init my-service --with-task-queue --with-ci --ci-provider github
init runs as an interactive wizard. If you pass my-service, it is used as the prefilled project name; the wizard still lets you confirm the project name, target directory, application title, description, and feature flags. The generated package is always app, and the project always uses the fixed non-src layout above. Database, auth, cache, task queue, Docker, and CI are all selectable in the wizard, and the generated project bootstraps the matching dependencies with uv.
Published Package
If inifastapi is available on PyPI, prefer uvx for one-off usage:
uvx inifastapi init
uvx inifastapi init my-service
This downloads and runs the scaffold temporarily. It does not add inifastapi to the generated project's dependencies.
Local Development
If you are working from this repository before publishing, use the local environment:
uv sync --group dev
uv run inifastapi init
uv run inifastapi init my-service
You can also run the local source tree without installing it globally:
uvx --from . inifastapi init
uvx --from . inifastapi init my-service
Install
If you want a persistent local development environment for the scaffold itself:
uv sync --group dev
Features
- Auto-registered routers from
app/api/v1/ pydantic-settingsconfiguration- Lifespan-aware app factory in
app/utils/build_app.py - Request logging and security middleware
- File + console logging with noise control in
app/utils/logging.py - Service-oriented layout under
app/services/ - Root
run.py,dockers/,scripts/,tests/, andlogs/ - Optional PostgreSQL + SQLAlchemy + Alembic
- Optional JWT auth service with password hashing and demo user bootstrap
- Optional Redis cache skeleton
- Optional Celery + RabbitMQ skeleton
- Optional Docker and CI templates
uv-managedpyproject.toml,uv.lock, and.venv
Development
uv run python -m pytest
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
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 inifastapi-0.1.1.tar.gz.
File metadata
- Download URL: inifastapi-0.1.1.tar.gz
- Upload date:
- Size: 27.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.9.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f701cc35cf3c68e7975fb1c0745ebf3fa46b25b571f858b709bd6a688a07c6d6
|
|
| MD5 |
bac90c57cb903587642aae60dab422b8
|
|
| BLAKE2b-256 |
279e14dcef818dbb5aeb75f4116426c99cd80735b588703c2fa79861b0f07c1c
|
File details
Details for the file inifastapi-0.1.1-py3-none-any.whl.
File metadata
- Download URL: inifastapi-0.1.1-py3-none-any.whl
- Upload date:
- Size: 36.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.9.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b21abc143399f45d2098198fa34a129c3cf1a0cc453cfc2f7314f075b0e8ce7d
|
|
| MD5 |
a7ea25c9c02e24c1761169f828254de8
|
|
| BLAKE2b-256 |
9e58cac6fc9f630cf391c86212aa91c07bffea2500084ccfc942dfde23e5eac5
|