A FastAPI 0.162 CRUD API starter in Python 3.12, served by Uvicorn, that stores one resource, items, in PostgreSQL through psycopg 3 and a connection pool. It is for developers who want a tested create, read, update and delete service with Pydantic validation, OpenAPI docs at /docs, JSON errors, limit and offset paging and a database /health check.
by Light CloudCRUD APIs

The app is built in app/main.py and re-exported from a root main.py, so Uvicorn starts it as main:app. Each route borrows a connection from the shared pool and returns rows as dicts, so there are no ORM models or response models to keep in step with the table. If the database is unreachable the lifespan handler fails and the app does not start, which surfaces a bad connection at deploy time. Renaming items starts in app/db.py, app/schemas.py and app/routers/items.py. On Light Cloud the deploy installs requirements.txt and runs uvicorn main:app with the DB_* variables set, and every push to your copy redeploys.
This starter uses psycopg 3 with psycopg-pool: app/config.py builds the connection from DB_HOST, DB_NAME, DB_USER, DB_PASSWORD and DB_SSLMODE, and the routes run plain SQL through the pool. You can add SQLAlchemy or SQLModel later without changing the routes' shape.
Start PostgreSQL in Docker and load .env as in the README's quick start, then run pytest. The tests use that real database and delete the items they create; ruff check . lints the code.
Add it to the CREATE TABLE in app/db.py, to ItemIn in app/schemas.py and to the queries in app/routers/items.py. CREATE TABLE IF NOT EXISTS does not alter an existing table, so run an ALTER TABLE once on a database that already has items.
Press Deploy on this template: Light Cloud copies the repo into your GitHub account, creates a PostgreSQL database and sets DB_HOST, DB_NAME, DB_USER and DB_PASSWORD on the app. Databases need a paid plan.
Yes. Any host with Python 3.12 and a reachable PostgreSQL runs it: install requirements.txt, set the DB_* variables and start uvicorn main:app --host 0.0.0.0 --port $PORT.

Start a Python REST API with FastAPI, live OpenAPI docs, pytest and ruff set up
Start a Flask CRUD API on PostgreSQL with blueprints, Gunicorn and pytest set up
Start a Python CRUD API on PostgreSQL with Django REST framework, migrations and tests