Base with a `model_id` property for SQLAlchemy models
Project description
SQLAlchemy-ModelId
SQAlchemy-ModelId defines a base with a model_id
property for SQLAlchemy models.
The model_id
property distinguishes model instances with the same identity from different tables.
Example
After setup, we can access the model_id
property as follows:
my_model = Model()
session.add(my_model)
session.commit()
print(my_model.model_id)
Output:
model-1
Documentation
You can find the latest documentation at https://dsbowen.github.io/sqlalchemy-modelid.
License
This project is licensed under the MIT License LICENSE.
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
Built Distribution
Close
Hashes for sqlalchemy_modelid-0.0.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0a20cf13337686397e2dda6c37b837794cb2a2179f3923b4d52440167a566f10 |
|
MD5 | d06030366de55e8be243553b6c7a7c49 |
|
BLAKE2b-256 | 3790065a32a1067128d6d04cb744321dd080dda228ae7038f03be51e65ea9325 |