A beautiful content wrapper for SENAITE that you will love
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.
SENAITE.CORE.SUPERMODEL is a dependency of SENAITE.CORE and therefore no additional installation steps are required.
- version bump
- version bump
- #10 Fix API import
- #9 Support Dexterity Fields
- #8 Do not process “0” values to Portal-SuperModels
- #7 Fix traceback when initializing a supermodel with a catalog brain
- #6 Added Destructor and further improvements
- #5 Fix UID->SuperModel conversion of UIDReferenceFields
- #4 Skip private fields starting with _
- Compatibility release for SENAITE CORE 1.3.0
- #2 Allow to pass in a catalog brain or instance to initialize a SuperModel
- Initial Release
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
|Filename, size||File type||Python version||Upload date||Hashes|
|Filename, size senaite.core.supermodel-1.2.5.zip (26.8 kB)||File type Source||Python version None||Upload date||Hashes View|
Hashes for senaite.core.supermodel-1.2.5.zip