Skip to main content

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

  1. Django

  2. Some code cribbed from https://skien.cc/blog/2014/01/15/sqlalchemy-and-race-conditions-implementing-get_one_or_create/

Metadata

Release files for sqlalchemy-get-or-create 0.1.5

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for sqlalchemy-get-or-create 0.1.5
File Size Uploaded Provenance Actions
sqlalchemy_get_or_create-0.1.5.tar.gz 2.7 kB Without provenance Details for sqlalchemy_get_or_create-0.1.5.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for sqlalchemy-get-or-create 0.1.5
File Interpreter ABI Platform Actions
sqlalchemy_get_or_create-0.1.5-py3-none-any.whl Python 3 none any Details for sqlalchemy_get_or_create-0.1.5-py3-none-any.whl

Total release size: 5.6 kB

Release files / sqlalchemy_get_or_create-0.1.5.tar.gz

Download URL sqlalchemy_get_or_create-0.1.5.tar.gz
Size 2.7 kB
Tags Source
SHA-256 checksum
How to use checksums
a203b067c1cb21e31c56ab475a1b7bbdf27451cce8d849785c97f79da95007ef
BLAKE2b-256 checksum
How to use checksums
f8554570d4ab8c7527bb8c767ee1e19adbec9370e17c95c2af1233ffb191113f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.0.10 CPython/3.8.2 Darwin/18.7.0

Release files / sqlalchemy_get_or_create-0.1.5-py3-none-any.whl

Download URL sqlalchemy_get_or_create-0.1.5-py3-none-any.whl
Size 2.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
7219ed18a1db98c92f162caba03e9f8bc82f0b683752d6eed953af110b36cad5
BLAKE2b-256 checksum
How to use checksums
f57dd4deda0a56333ae9ea0ad2265a8b06ba4e57273d68b9f4c9bc3f10dbc6d8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.0.10 CPython/3.8.2 Darwin/18.7.0

Security for sqlalchemy-get-or-create 0.1.5

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page