Skip to main content

Stack

Python 3.12 + FastAPI + SQLAlchemy 2.0 (async) + asyncpg + Pydantic 2

Directory Structure

Key Patterns

Dependency Injection

University Scoping

Every data query filters by user.university_id to ensure institutions only see their own data. Benchmark queries use subqueries to scope conference and peer group data.

Async Everywhere

All database operations use async/await with SQLAlchemy’s async session via asyncpg. No blocking I/O in request handlers.

API Documentation

FastAPI auto-generates OpenAPI docs at http://localhost:8000/docs (Swagger UI) and http://localhost:8000/redoc (ReDoc).