Skip to main content

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

https://img.shields.io/pypi/v/senaite.core.supermodel.svg?style=flat-square https://img.shields.io/github/issues-pr/senaite/senaite.core.supermodel.svg?style=flat-square https://img.shields.io/github/issues/senaite/senaite.core.supermodel.svg?style=flat-square https://img.shields.io/badge/README-GitHub-blue.svg?style=flat-square https://img.shields.io/badge/Built%20with-%E2%9D%A4-brightgreen.svg https://img.shields.io/badge/Made%20for%20SENAITE-%E2%AC%A1-lightgrey.svg

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.

Installation

SENAITE.CORE.SUPERMODEL is a dependency of SENAITE.CORE and therefore no additional installation steps are required.

Changelog

1.2.0 (2019-03-30)

  • Compatibility release for SENAITE CORE 1.3.0

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

senaite.core.supermodel-1.2.0.zip (24.8 kB view hashes)

Uploaded Source

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