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.

Source Distribution

sqlalchemy-modelid-0.0.2.tar.gz (1.6 kB view hashes)

Uploaded Source

Built Distribution

sqlalchemy_modelid-0.0.2-py3-none-any.whl (2.9 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page