trace your model field change log
Project description
sqlatracker
Inspired by django-field-history
Example
from sqlalchemy import BigInteger, Column
from sqlalchemy.ext.declarative import as_declarative
from sqlatracker.field_tracker import FieldTracker
@as_declarative()
class Base:
id = Column(BigInteger, primary_key=True, autoincrement=True)
class Example(Base):
example_field_1 = Column(BigInteger)
example_field_2 = Column(BigInteger)
FieldTracker.listen_for(
Example.example_field_1,
Example.example_field_2,
)
Integrate with your metadata for alembic
from sqlatracker.field_tracker import FieldTracker
from sqlatracker.utils import merge_metadata
target_metadata = merge_metadata(your_metadata, FieldTracker.metadata)
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
sqlatracker-0.0.7.tar.gz
(5.7 kB
view details)
Built Distribution
File details
Details for the file sqlatracker-0.0.7.tar.gz
.
File metadata
- Download URL: sqlatracker-0.0.7.tar.gz
- Upload date:
- Size: 5.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: python-requests/2.26.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 53843c914b39ad588b4822e535d4534be2cf43869f47a82bd33ebc1f2a6e9487 |
|
MD5 | e5597395d565962b407f980b4fa55919 |
|
BLAKE2b-256 | 7dae9e335d98e9270ae56c4045887ca1c1c220e42401bc4394c3baf6ed7d4b2d |
File details
Details for the file sqlatracker-0.0.7-py2.py3-none-any.whl
.
File metadata
- Download URL: sqlatracker-0.0.7-py2.py3-none-any.whl
- Upload date:
- Size: 3.7 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: python-requests/2.26.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | f560199aafb817655db7723395ac4c41a276a9e2186c3963a9522b8ce63adcb4 |
|
MD5 | 7b7e916efbdc2a5871c4f80c11fcd25b |
|
BLAKE2b-256 | aab2560c2a38e1fd77932c32616a74a8fa46dd5853916d592f86cdaa3074b1ab |