Skip to main content

Context manager for default relationship values in SQLAlchemy

Project description

https://img.shields.io/pypi/v/sqla_model_context.svg https://github.com/alexrudy/sqla_model_context/workflows/CI/badge.svg Documentation Status

Context manager for default relationship values in SQLAlchemy

This is primarily a way to ensure that common relationships (e.g. user_id on lots of user generated content) are easy to set via the SQLAlchemy context. It works well in concert with flask_login, where it allows you to leverage flask_login’s current_user to set a default relationship value. See the examples directory for a small usage example.

Credits

This package was created with Cookiecutter and the audreyr/cookiecutter-pypackage project template.

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_model_context-0.2.2.tar.gz (14.5 kB view details)

Uploaded Source

Built Distribution

sqla_model_context-0.2.2-py2.py3-none-any.whl (7.1 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file sqla_model_context-0.2.2.tar.gz.

File metadata

  • Download URL: sqla_model_context-0.2.2.tar.gz
  • Upload date:
  • Size: 14.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/3.10.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.9.3

File hashes

Hashes for sqla_model_context-0.2.2.tar.gz
Algorithm Hash digest
SHA256 40aac10344b97ecf7ec7be9d7c4b231864ebecfe649c3c4995c58bc0a97ed8b3
MD5 1e8195350054a33009481a7136bbcbe3
BLAKE2b-256 f3ef4e01fc09447cfe3bc40ffa5ea5b6af4f2c636d1acf274f1428a946a414ba

See more details on using hashes here.

File details

Details for the file sqla_model_context-0.2.2-py2.py3-none-any.whl.

File metadata

  • Download URL: sqla_model_context-0.2.2-py2.py3-none-any.whl
  • Upload date:
  • Size: 7.1 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/3.10.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.9.3

File hashes

Hashes for sqla_model_context-0.2.2-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 d369f6aff56a61228ed900f0df981f8f9c4c739fb7d77460e6a00f5bbd7ac65f
MD5 d696f9b901ccded74eb65d2b03b5353c
BLAKE2b-256 2c3518b64b0bbd3b93f5d133451c6ed0bfa212040e504263ccac0b79f071aabf

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