Skip to main content

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for sqlalchemy-modelid, version 0.0.2
Filename, size File type Python version Upload date Hashes
Filename, size sqlalchemy_modelid-0.0.2-py3-none-any.whl (2.9 kB) File type Wheel Python version py3 Upload date Hashes View hashes
Filename, size sqlalchemy-modelid-0.0.2.tar.gz (1.6 kB) File type Source Python version None Upload date Hashes View hashes

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page