Skip to main content

A SQLAlchemy middleware for FastAPI

Project description


Build Status codecov

SQLAlchemy Middleware for FastAPI inspired by the official tutorial.


pip install fastapi fastalchemy


  • Super-easy configuration: simply put and files in your project folder with the following code.
from fastapi import FastAPI
from fastalchemy import SQLAlchemyMiddleware, db

from models import User

app = FastAPI()

def get_users():
    return db.query(User).order_by(


Please peek tests/app folder if you want to know the way to create and models py.

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for fastalchemy, version 0.1.3
Filename, size File type Python version Upload date Hashes
Filename, size fastalchemy-0.1.3.tar.gz (3.2 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring DigiCert DigiCert EV certificate Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page