Skip to main content

sqlatracker

Inspired by django-field-history

GitHub Build Status codecov PyPI

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)

Release files for sqlatracker 0.0.7

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for sqlatracker 0.0.7
File Size Uploaded
sqlatracker-0.0.7.tar.gz 5.7 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for sqlatracker 0.0.7
File Interpreter ABI Platform
sqlatracker-0.0.7-py2.py3-none-any.whl Python 2, Python 3 none any Details

Total release size: 9.4 kB

Release files / sqlatracker-0.0.7.tar.gz

Download URL sqlatracker-0.0.7.tar.gz
Size 5.7 kB
Tags Source
SHA-256 checksum
How to use checksums
53843c914b39ad588b4822e535d4534be2cf43869f47a82bd33ebc1f2a6e9487
BLAKE2b-256 checksum
How to use checksums
7dae9e335d98e9270ae56c4045887ca1c1c220e42401bc4394c3baf6ed7d4b2d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via python-requests/2.26.0

Release files / sqlatracker-0.0.7-py2.py3-none-any.whl

Download URL sqlatracker-0.0.7-py2.py3-none-any.whl
Size 3.7 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
f560199aafb817655db7723395ac4c41a276a9e2186c3963a9522b8ce63adcb4
BLAKE2b-256 checksum
How to use checksums
aab2560c2a38e1fd77932c32616a74a8fa46dd5853916d592f86cdaa3074b1ab
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via python-requests/2.26.0

Release history Release notifications | RSS feed

This release

0.0.7 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page