Skip to main content
senaite.app.supermodel

A beautiful content wrapper for SENAITE that you will love

https://img.shields.io/pypi/v/senaite.app.supermodel.svg?style=flat-square https://img.shields.io/github/issues-pr/senaite/senaite.app.supermodel.svg?style=flat-square https://img.shields.io/github/issues/senaite/senaite.app.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.APP.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.app.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.APP.SUPERMODEL is a dependency of SENAITE.CORE and therefore no additional installation steps are required.

Changelog

2.6.0 (2025-04-04)

  • #25 Compatibility with core#2584 (SampleType to DX)

  • #24 Do not take IARAnalysesField as a uidreference-like field

  • #23 Rely on getRaw for the retrieval of UIDs from reference-like fields

  • #21 Fix error when using Title() or Description() on DX-based types

  • #20 Special handling of title and description attributes

  • #19 Prioritize getters instead of fieldnames on value retrieval from instance

2.5.0 (2024-01-03)

  • #18 Avoid brain lookup for temporary objects

  • #17 Do not fail when no catalog brain was found

2.4.0 (2023-03-10)

  • Version 2.3.0 -> 2.4.0

2.3.0 (2022-10-03)

  • #14 Ignore fields from extensible metadata schema

  • #13 Remove dependency to Products.TextIndexNG3 (test layer)

2.2.0 (2022-06-10)

  • #12 Fix infinite recursion for catalog values containing Missing.Value

2.1.0 (2022-01-05)

  • #11 Do not consider Auditlog catalog as primary catalog

2.0.0 (2021-07-26)

  • Version bump

2.0.0rc3 (2021-01-04)

  • Version bump

2.0.0rc2 (2020-10-13)

  • Version bump

2.0.0rc1 (2020-08-05)

  • Compatibility with senaite.core 2.x

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

Release files for senaite.app.supermodel 2.6.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for senaite.app.supermodel 2.6.0
File Size Uploaded
senaite.app.supermodel-2.6.0.tar.gz 17.2 kB Details

Release files / senaite.app.supermodel-2.6.0.tar.gz

Download URL senaite.app.supermodel-2.6.0.tar.gz
Size 17.2 kB
Tags Source
SHA-256 checksum
How to use checksums
ae25b713183038c282dce6e0e3f5d437301e3ca921b80600f47330d08d402679
BLAKE2b-256 checksum
How to use checksums
8f22c2402373c78484db9267b88090952ece21e50e52bdf4771f87cab9f4b4ee
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.15.0 pkginfo/1.8.3 requests/2.27.1 setuptools/42.0.2 requests-toolbelt/1.0.0 tqdm/4.64.1 CPython/2.7.18
Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page