Skip to main content

FastAlchemy

Build Status codecov

SQLAlchemy Middleware for FastAPI inspired by the official tutorial.

Install

pip install fastapi fastalchemy

Features

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

from models import User

app = FastAPI()
app.add_middleware(SQLAlchemyMiddleware)

@app.get('/users')
def get_users():
    return db.query(User).order_by(User.id).all()

Details

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

Release files for fastalchemy 0.1.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for fastalchemy 0.1.3
File Size Uploaded
fastalchemy-0.1.3.tar.gz 3.2 kB Details

Release files / fastalchemy-0.1.3.tar.gz

Download URL fastalchemy-0.1.3.tar.gz
Size 3.2 kB
Tags Source
SHA-256 checksum
How to use checksums
08a5b44fd0e2450c8fbc4e664d3ec3c48798e58c2410bc040a7af55aab5d5dd8
BLAKE2b-256 checksum
How to use checksums
700869b96ae52b32c5ab240e55cb8f1fc3616aa30717c85618017d6e50ec64dd
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/46.1.3 requests-toolbelt/0.9.1 tqdm/4.42.0 CPython/3.8.2

Release history Release notifications | RSS feed

This release

0.1.3 This release

1 release file

0.1.2

1 release file

0.1.1

1 release file

0.1

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page