/sqlalchemy-continuum

Versioning extension for SQLAlchemy.

Primary LanguagePythonOtherNOASSERTION

SQLAlchemy-Continuum

Build Status Version Status Downloads

Versioning and auditing extension for SQLAlchemy.

Features

  • Creates versions for inserts, deletes and updates
  • Does not store updates which don't change anything
  • Supports alembic migrations
  • Can revert objects data as well as all object relations at given transaction even if the object was deleted
  • Transactions can be queried afterwards using SQLAlchemy query syntax
  • Query for changed records at given transaction
  • Temporal relationship reflection. Version object's relationship show the parent objects relationships as they where in that point in time.
  • Supports native versioning for PostgreSQL database (trigger based versioning)

QuickStart

:

pip install SQLAlchemy-Continuum

In order to make your models versioned you need two things:

  1. Call make_versioned() before your models are defined.
  2. Add __versioned__ to all models you wish to add versioning to

Resources

image

More information