No project description provided
Project description
SQLAlchemy get_or_create()
SQLAlchemy versions of Django’s get_or_create() and update_or_create()
Installation
To get the latest stable release from PyPi
pip install sqlalchemy_get_or_create
Usage
get_or_create(session, model, defaults=None, **kwargs)
Same as Django’s get_or_create() but also takes the SQLAlchemy session and model
update_or_create(session, model, defaults=None, **kwargs)
Same as Django’s update_or_create() but also takes the SQLAlchemy session and model
Acknowledgments
Django
Some code cribbed from https://skien.cc/blog/2014/01/15/sqlalchemy-and-race-conditions-implementing-get_one_or_create/
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
Built Distribution
Close
Hashes for sqlalchemy_get_or_create-0.1.1.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6b3fc061807a96c9e906682bd177a8577b2ebeb34e838aeb8ddb5963d3197130 |
|
MD5 | a6c5b95e767e89be5bead565a62064be |
|
BLAKE2b-256 | 511ba14ccc7f7136fb90bd63d2c6ab246568c2851ec689ef6cb46131c29b83d9 |
Close
Hashes for sqlalchemy_get_or_create-0.1.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4466a4a838e2d709fbb0452c7166408cf1a065341c8232592bc2440fe2b44a2b |
|
MD5 | 004e47c62b2c76dd523d3d99219e68f8 |
|
BLAKE2b-256 | 671a0acb784cb5e1404bbd084a5b5f76c423835c5c495413504326445989d190 |