A framework-independent modern wrapper for SQLAlchemy & Alembic.
Project description
A friendly wrapper for modern SQLAlchemy (v1.4 or later) and Alembic.
Documentation: https://sqla-wrapper.scaletti.dev/
Includes:
-
A SQLAlchemy wrapper, that does all the SQLAlchemy setup and gives you:
- A scoped session extended with some useful active-record-like methods and pagination helper.
- A declarative base class.
- A helper for performant testing with a real database.
from sqla_wrapper import SQLAlchemy db = SQLAlchemy("sqlite:///db.sqlite", **options) # You can also use separated host, name, etc. # db = SQLAlchemy(user=…, password=…, host=…, port=…, name=…)
-
An Alembic wrapper that loads the config from your application instead of from separated
alembic.ini
andenv.py
files.from sqla_wrapper import Alembic, SQLAlchemy db = SQLAlchemy(…) alembic = Alembic(db, "db/migrations")
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
sqla-wrapper-5.6.1.tar.gz
(14.9 kB
view hashes)
Built Distribution
Close
Hashes for sqla_wrapper-5.6.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a3a1732146d64702cb8517d9b7b0eab78300ee1009e739cda321c3bc754fc291 |
|
MD5 | 7e2d878c12a3847182016018a13fc159 |
|
BLAKE2b-256 | 7f2e1533032a81b5391b50234daf3cdf9f1a5fa0764fd28f8df2595b0b9cfdfa |