Model Relative Context Manager

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.