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.2.tar.gz
(14.6 kB
view hashes)
Built Distribution
sqla_wrapper-5.2-py3-none-any.whl
(16.2 kB
view hashes)
Close
Hashes for sqla_wrapper-5.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 65ca63969400ed1207e890893217c5e347fb832208eded444dfcbdaa68b27a53 |
|
MD5 | 0efe77981bdef01efc914abc28147eb7 |
|
BLAKE2b-256 | a2e12d1388f825e2d3a94c70ad569b192ae7a20e5b51a45fd666f2492630c209 |