SQLAlchemy versions of Django's get_or_create() and update_or_create()
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.3.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 735be8c760d1d8c66cd2e83c2897dacd88ebfd4078c6cc9fa737915491e121c6 |
|
MD5 | f0cf55894462ee5af139b165382bb551 |
|
BLAKE2b-256 | faa5f343f78336ddb6ca9c91ae4903bd465773c67578b337494f6c8b290e13b2 |
Close
Hashes for sqlalchemy_get_or_create-0.1.3-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ff578a2067ba7f461d7e8d58abfc422ab6f47f8127fcaf1378eb306761483316 |
|
MD5 | 5b3714d7c366f470f9fc8d238774af56 |
|
BLAKE2b-256 | ec8212cfa3a1457fec3778ed7635bea3755926fc85ea80ef1b7c40b8f408edb7 |