A beautiful content wrapper for SENAITE that you will love
Project description
SENAITE.CORE.SUPERMODEL: A beautiful content wrapper for SENAITE that you will love
About
The SENAITE CORE SUPERMODEL is a content wrapper for objects and catalog brains in SENAITE and provides a unified dictionary interface to access the schema fields, methods and metadata.
For what is it needed?
The purpose of the SUPERMODEL is to help coders to access the data from content objects. It also ensures that the most effective and efficient method is used to achieve a task.
How does it work?
A SuperModel can be instantiated with an UID of a content object:
>>> from senaite.core.supermodel import SuperModel >>> supermodel = SuperModel('e37c1b659137414e872c08af410f09b4')
This will give transparent access to all schema fields of the wrapped object as well to all the metadata columns of the primary catalog of this object:
>>> supermodel.MySchemaField' 'Value of MySchemaField'
Please read the full functional doctest to see the super powers of the SuperModel in action.
Changelog
1.1.0 (2018-10-04)
#2 Allow to pass in a catalog brain or instance to initialize a SuperModel
1.0.0 (2018-07-19)
Initial Release
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
Built Distribution
Hashes for senaite.core.supermodel-1.1.0.zip
Algorithm | Hash digest | |
---|---|---|
SHA256 | d4edab42f6038d436ac5d2acf85df05ccb6c67609fb0bc881a625c9b8016434e |
|
MD5 | fd31a8744ca01da138e86da850c8bedd |
|
BLAKE2b-256 | 8aa579b2fcdd907a62e1954598c22f1091e5945132ee2e9d9e9c8bd450761800 |
Hashes for senaite.core.supermodel-1.1.0-py2-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c35ee3213fa47010b9103585ec6202e8d3d2385b9d8fc553756c9d885ca97f5e |
|
MD5 | 290a931d5dabfc26b9bb187ea974063c |
|
BLAKE2b-256 | 61410c20a2c7865ee4a39a24cb71046418742e954e8a2060739b16cb844e988e |