Collection of SQLAlchemy mixins
Project description
Bixomix
bixomix is a collection of SQLAlchemy mixins.
Support
- Python 3.9+
- SQLAlchemy 2.0+
Usage
Add mixins after the Base
class in each model’s parent classes. The order of the mixins doesn’t matter.
from sqlalchemy.orm import DeclarativeBase
from bixomix import CreatedAtMixin
class Base(DeclarativeBase):
pass
class MyModel(Base, CreatedAtMixin):
# Add your own fields here
...
Mixins
CreatedAtMixin
: add acreated_at
datetime field that’s automatically filled with the record’s creation dateUpdatedAtMixin
: add anupdated_at
datetime field that’s automatically filled with the record’s last update dateCreatedUpdatedAtMixin
: combined version of the previous two mixins
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
bixomix-0.1.0.tar.gz
(2.4 kB
view hashes)