Skip to main content

Scaffold a production-ready FastAPI project using uv.

Project description

fastapi-easy-setup

CLI tool that scaffolds a production-ready FastAPI project in seconds, powered by uv.

What you get

myapp/
├── pyproject.toml
├── uv.lock
├── .env / .env.example
├── .gitignore
├── alembic.ini              # only with Alembic (default)
├── alembic/
│   ├── env.py               # async, reads DATABASE_URL from Settings
│   ├── script.py.mako
│   └── versions/
├── app/
│   ├── main.py              # create_app() factory, lifespan, CORS
│   ├── core/
│   │   ├── config.py        # pydantic-settings — .env auto-loaded
│   │   └── database.py      # async engine + session + get_db dependency
│   ├── models/
│   │   └── base.py          # DeclarativeBase + UUID / Timestamp mixins
│   ├── schemas/
│   ├── api/
│   │   ├── deps.py          # DBSession annotated dependency
│   │   └── v1/
│   │       ├── router.py    # /health endpoint
│   │       └── endpoints/
│   ├── services/
│   └── utils/
└── tests/
    ├── conftest.py           # async httpx test client
    └── test_health.py

Prerequisites

  • uv (any recent version)
  • Python 3.12+ (managed by uv automatically)

Quick start

Run directly (no install)

uvx --from /path/to/this/folder fastapi-easy-setup myapp

If the tool is installed, you can run:

uvx fastapi-easy-setup myapp

Interactive mode

Omit the project name and the tool will prompt you:

fastapi-easy-setup
# Project name: _

Options

fastapi-easy-setup [project_name] [OPTIONS]

positional arguments:
  project_name          Name of the project directory (prompted if omitted)

options:
  --python VERSION      Python version for uv init (default: 3.12)
  --no-alembic          Skip Alembic initialization
  --version             Show version and exit
  -h, --help            Show help and exit

Examples

# Default: FastAPI + Alembic + Python 3.12
fastapi-easy-setup myapp

# Skip Alembic
fastapi-easy-setup myapp --no-alembic

# Use Python 3.11
fastapi-easy-setup myapp --python 3.11

After scaffolding

cd myapp

# Run the dev server
uv run uvicorn app.main:app --reload

# Generate a migration (if Alembic was included)
uv run alembic revision --autogenerate -m "initial"

# Apply migrations
uv run alembic upgrade head

# Run tests
uv run pytest

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

fastapi_easy_setup-0.1.1.tar.gz (8.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

fastapi_easy_setup-0.1.1-py3-none-any.whl (43.0 kB view details)

Uploaded Python 3

File details

Details for the file fastapi_easy_setup-0.1.1.tar.gz.

File metadata

  • Download URL: fastapi_easy_setup-0.1.1.tar.gz
  • Upload date:
  • Size: 8.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.10.10 {"installer":{"name":"uv","version":"0.10.10","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for fastapi_easy_setup-0.1.1.tar.gz
Algorithm Hash digest
SHA256 65f09c1daa8209d7ca052b0131bf65079583bd9e3380e254f85fa5064ae46c1f
MD5 368833628380d8c6fa584d825d4c120a
BLAKE2b-256 52d44ecb24a5431eea0e3403db54b2f331352ff97884fa73277e5cbd90a74344

See more details on using hashes here.

File details

Details for the file fastapi_easy_setup-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: fastapi_easy_setup-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 43.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.10.10 {"installer":{"name":"uv","version":"0.10.10","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for fastapi_easy_setup-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 b34eb2e38eb99bf9d93f02b35bc66f53312108a08c1b0dd92ea43d3d91be4d4c
MD5 89fa28d2ba84a4518d64d888969c7104
BLAKE2b-256 89def7eb576ab75781c1e58f521e4b4e28d0e1b23493cc86d007768dc03727c2

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page