bixomix-0.1.0
توضیحات
Collection of SQLAlchemy mixins
| ویژگی | مقدار |
|---|---|
| سیستم عامل | - |
| نام فایل | bixomix-0.1.0 |
| نام | bixomix |
| نسخه کتابخانه | 0.1.0 |
| نگهدارنده | [] |
| ایمیل نگهدارنده | [] |
| نویسنده | Baptiste Fontaine |
| ایمیل نویسنده | baptiste@bixoto.com |
| آدرس صفحه اصلی | https://github.com/Bixoto/bixomix |
| آدرس اینترنتی | https://pypi.org/project/bixomix/ |
| مجوز | MIT |
# 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.
```python
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 a `created_at` datetime field that’s automatically filled with the record’s creation date
* `UpdatedAtMixin`: add an `updated_at` datetime field that’s automatically filled with the record’s last update date
* `CreatedUpdatedAtMixin`: combined version of the previous two mixins
نیازمندی
| مقدار | نام |
|---|---|
| >=2.0,<3.0 | sqlalchemy |
زبان مورد نیاز
| مقدار | نام |
|---|---|
| >=3.9,<4.0 | Python |
نحوه نصب
نصب پکیج whl bixomix-0.1.0:
pip install bixomix-0.1.0.whl
نصب پکیج tar.gz bixomix-0.1.0:
pip install bixomix-0.1.0.tar.gz