Context manager for default relationship values in SQLAlchemy
Project description
============================== Model Relative Context Manager
.. image:: https://img.shields.io/pypi/v/sqla_model_context.svg :target: https://pypi.python.org/pypi/sqla_model_context
.. image:: https://github.com/alexrudy/sqla_model_context/workflows/CI/badge.svg :target: https://github.com/alexrudy/sqla_model_context/workflows/CI/
.. image:: https://readthedocs.org/projects/sqla-model-context/badge/?version=latest :target: https://sqla-model-context.readthedocs.io/en/latest/?badge=latest :alt: Documentation Status
Context manager for default relationship values in SQLAlchemy
- Free software: MIT license
- Documentation: https://sqla-model-context.readthedocs.io.
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.
.. _Cookiecutter: https://github.com/audreyr/cookiecutter
.. _audreyr/cookiecutter-pypackage
: https://github.com/audreyr/cookiecutter-pypackage
Project details
Release history Release notifications | RSS feed
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
Hashes for sqla_model_context-0.2.1-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 06733c9a5c255aa12b29aab6bb36eabbadc9ea07dbd66d19142bb9cf80b28093 |
|
MD5 | 2014dedd98a13b130f887741a2556b98 |
|
BLAKE2b-256 | 523a42dc9c9588e9fa80ea04b8efb63b5535899354eddf723b88b2bdde3889cc |