Neon. A Python backend needs a Postgres database that standard drivers can reach, somewhere to put files, and increasingly a way to call language models. Neon covers all three with tooling Python developers already use: psycopg or asyncpg for the database, boto3 for Object Storage, and the OpenAI SDK for the AI Gateway.
Django and FastAPI connect like any Postgres
Every Neon database is standard Postgres. The Django guide shows the DATABASES block with psycopg 3, sslmode: require, and CONN_HEALTH_CHECKS: True, which keeps Django from reusing a connection that was closed when the compute scaled to zero. FastAPI apps use SQLAlchemy or asyncpg directly:
import os, psycopg
with psycopg.connect(os.environ["DATABASE_URL"]) as conn:
with conn.cursor() as cur:
cur.execute("SELECT now()")
print(cur.fetchone())Migrations run the normal way: python manage.py migrate or Alembic (Django migrations, SQLAlchemy migrations). If your app runs on a serverless host, use the pooled connection string; Neon's PgBouncer endpoint accepts up to 10,000 client connections per compute (connection pooling).
Files with boto3
Object Storage is S3-compatible, so boto3 works with an endpoint URL and a Neon credential:
client.put_object(
Bucket='my-bucket',
Key='hello.txt',
Body='Hello from Neon Object Storage!',
ContentType='text/plain',
)Presigned URLs let a browser upload straight to the bucket while your Django model stores the key (objects). Object Storage is in beta, available in aws-us-east-2 and aws-eu-central-1 (with support expanding toward all regions), and free during the beta with 5 GB per project on the Free plan.
Models through the OpenAI SDK
The AI Gateway serves OpenAI, Google, and open-weight models from one Neon credential. Point the OpenAI Python client at your branch endpoint:
from openai import OpenAI
client = OpenAI(
api_key=os.environ["NEON_AI_GATEWAY_TOKEN"],
base_url=f"{os.environ['NEON_AI_GATEWAY_BASE_URL']}/v1",
)AI Gateway is in beta, requires a paid plan, and is free during the beta; when billing begins Neon charges provider list prices with no markup (pricing).
Functions are JavaScript only for now
Branch-per-feature for Python teams
neon checkout feature-x creates a copy-on-write branch and pulls its DATABASE_URL into your .env, so each developer runs migrations against their own copy of production data (branching). A Python SDK and the Neon API automate the same thing in CI.
How other options compare
- Supabase: connects to Django and FastAPI the same way through its pooler, its Python client library is in beta, and its storage is S3-compatible so boto3 works there too (features). Edge Functions run Deno, so Python logic lives elsewhere, as it does with Neon. There's no model gateway, so the OpenAI client points at each provider with its own key (Neon vs Supabase). Environments are the cost: staging and dev are each another instance billed hourly, from about $10/month for Micro, and a branch rebuilds from migrations without production data, so
manage.py migratenever runs against real data shapes before production (compute usage, branching). The pooler allows 200 clients on Micro, which a Gunicorn or Uvicorn fleet can exhaust before the instance is busy (compute and disk). - AWS RDS plus S3: the traditional Django stack. You size and pay for the instance around the clock, and each new environment is a manual provisioning step rather than a branch.
Vendor details verified on 2026-09-02 against the linked pages.

Follow the Django guide to configure psycopg, SSL, and health checks.








