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 hashes)

Uploaded Source

Built Distribution

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

Uploaded Python 2 Python 3

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