Generic nested mutable objects and iterables for SQLAlchemy
Project description
SQLAlchemy-Mutable
SQLAlchemy-Mutable provides generic nested mutable objects and iterables for SQLAlchemy. Its primary features are:
- Nested mutation tracking
- Mutation tracking for iterables (
list
anddict
) - Support for embedded database models
- Support for common literals and
datetime
objects - Support for custom Mutable classes
- Support for converting existing classes to Mutable classes
Example: Nested mutation tracking with lists and dicts
x = MyModel()
session.add(x)
x.mutable = {'greeting': []}
session.commit()
x.mutable['greeting'].append('hello world')
session.commit()
print(x.mutable['greeting'][0])
Outputs:
hello world
Documentation
You can find the latest documentation at https://dsbowen.github.io/sqlalchemy-mutable.
License
Publications which use this software should include the following citation:
Bowen, D.S. (2019). SQLAlchemy-Mutable [Computer software]. https://dsbowen.github.io/sqlalchemy-mutable.
This project is licensed under the MIT License LICENSE.
Acknowledgements
Much inspiration drawn from SQLAlchemy-JSON
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_mutable-0.0.7-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 98e31dd50260306e21bd1efa710b6293a7d10f9c00d291fa006fbdc2f7776058 |
|
MD5 | 67f1fd5af8440df0768ca6ed5b173e18 |
|
BLAKE2b-256 | 1f754eb1de64c23e852295d4be03d47f2bed6548dd27b412fde7e53c112b25ec |