Skip to main content

A framework-independent modern wrapper for SQLAlchemy & Alembic

Project description

SQLA-Wrapper

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.
    • 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 and env.py files.

    from sqla_wrapper import Alembic, SQLAlchemy
    
    db = SQLAlchemy()
    alembic = Alembic(db, "db/migrations")
    

Project details


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-6.0.0.tar.gz (10.3 kB view details)

Uploaded Source

Built Distribution

sqla_wrapper-6.0.0-py3-none-any.whl (11.3 kB view details)

Uploaded Python 3

File details

Details for the file sqla_wrapper-6.0.0.tar.gz.

File metadata

  • Download URL: sqla_wrapper-6.0.0.tar.gz
  • Upload date:
  • Size: 10.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.3.2 CPython/3.9.16 Linux/5.15.0-1031-azure

File hashes

Hashes for sqla_wrapper-6.0.0.tar.gz
Algorithm Hash digest
SHA256 4159aed7aa391d5a664574230fc2c9f6185eb7f1d10852495aadecff55864ac7
MD5 585051f9b66d13e910503980f2753dff
BLAKE2b-256 305111f64faa47de983e75b03c1d8f7cc9e7b2e8254e6406e667eae4a2963384

See more details on using hashes here.

File details

Details for the file sqla_wrapper-6.0.0-py3-none-any.whl.

File metadata

  • Download URL: sqla_wrapper-6.0.0-py3-none-any.whl
  • Upload date:
  • Size: 11.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.3.2 CPython/3.9.16 Linux/5.15.0-1031-azure

File hashes

Hashes for sqla_wrapper-6.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 39665c54c310a40832bf79db36c6c4230d5654a73b109847203cd6b98c93af95
MD5 273827a6de12b3957bdb9ba1adc38d33
BLAKE2b-256 92f664a83b9b5a58ca1b9ac7f174ce577df977f8998044cf707cf10fc192c681

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page