Skip to main content

A beautiful content wrapper for VALER LIS 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.4 (2020-08-04)

  • version bump

1.2.3 (2020-03-02)

  • #10 Fix API import

1.2.2 (2020-03-01)

  • #9 Support Dexterity Fields

1.2.1 (2019-07-01)

  • #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 _

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

valer.core.supermodel-1.2.4rc11.zip (26.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

valer.core.supermodel-1.2.4rc11-py2-none-any.whl (16.9 kB view details)

Uploaded Python 2

File details

Details for the file valer.core.supermodel-1.2.4rc11.zip.

File metadata

  • Download URL: valer.core.supermodel-1.2.4rc11.zip
  • Upload date:
  • Size: 26.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.15.0 pkginfo/1.6.1 requests/2.25.1 setuptools/39.0.1 requests-toolbelt/0.9.1 tqdm/4.54.1 CPython/2.7.17

File hashes

Hashes for valer.core.supermodel-1.2.4rc11.zip
Algorithm Hash digest
SHA256 5c3ce9d621a27966f6bcec08e1cd4571d4ba2bd93f1d1003458969ac360948a8
MD5 c963310e5e3ff0f6b410c73803a4e646
BLAKE2b-256 97b8cb3a6f50232226f717d4c89a8c6f1142a5577a8cd9095fa0ac046475da6d

See more details on using hashes here.

File details

Details for the file valer.core.supermodel-1.2.4rc11-py2-none-any.whl.

File metadata

  • Download URL: valer.core.supermodel-1.2.4rc11-py2-none-any.whl
  • Upload date:
  • Size: 16.9 kB
  • Tags: Python 2
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.15.0 pkginfo/1.6.1 requests/2.25.1 setuptools/39.0.1 requests-toolbelt/0.9.1 tqdm/4.54.1 CPython/2.7.17

File hashes

Hashes for valer.core.supermodel-1.2.4rc11-py2-none-any.whl
Algorithm Hash digest
SHA256 5798f6e4803bf2ed885dfc445fd2bba5dfe281bf42f7af3390acdd8f5ed528c9
MD5 54496282fbe7d304097f6b3e873a2af8
BLAKE2b-256 79fa2a1b53377a51fd53cc5ed8b00b4dc243a627ce38a66d4aee6a2d4fada242

See more details on using hashes here.

Supported by

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