Skip to main content

CAOM-2.4 repo access and tools

Project description

https://img.shields.io/pypi/v/caom2repo.svg

Client caom2-repo

caom2Repo provides a client (caom2-repo) to perform CRUD (Create, Read, Update, Delete) on an observation in a collection in a repository.

Visitor Plugin

The client also provides a visitor function which accepts a plugin. The visitor function iterates the observations of a collection and updates them according to the algorithm of the plugin function. The following is an example plugin to add a ‘PREVIEW’ Plane to an observation. More plugin examples can be found in caom2repo/tests/.

from __future__ import (absolute_import, division, print_function,
                        unicode_literals)

from caom2.observation import Observation
from caom2.plane import Plane


class ObservationUpdater(object):
    """ObservationUpdater that adds a plane to the observation."""

    def update(self, observation, **kwargs):
        """
        Processes an observation and updates it
        """
        assert isinstance(observation, Observation), (
            "observation %s is not an Observation".format(observation))
        observation.planes.add(Plane('PREVIEW'))

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

caom2repo-1.6.3.tar.gz (45.0 kB view details)

Uploaded Source

Built Distribution

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

caom2repo-1.6.3-py3-none-any.whl (46.9 kB view details)

Uploaded Python 3

File details

Details for the file caom2repo-1.6.3.tar.gz.

File metadata

  • Download URL: caom2repo-1.6.3.tar.gz
  • Upload date:
  • Size: 45.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for caom2repo-1.6.3.tar.gz
Algorithm Hash digest
SHA256 313edf2063a2c147163618605f3600f133b2f0581158f5da92fe0dcd89ec9aae
MD5 361d8bec1e9cbb7f11954380c5399a42
BLAKE2b-256 61ca2f8a2c2644b1840a771c75b4e97632ffbf4ddfc50d4d8327521924905da6

See more details on using hashes here.

Provenance

The following attestation bundles were made for caom2repo-1.6.3.tar.gz:

Publisher: cibuild.yml on opencadc/caom2tools

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file caom2repo-1.6.3-py3-none-any.whl.

File metadata

  • Download URL: caom2repo-1.6.3-py3-none-any.whl
  • Upload date:
  • Size: 46.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for caom2repo-1.6.3-py3-none-any.whl
Algorithm Hash digest
SHA256 c922191ac51902937493a9cdc0b9e3a43d120c018946a2067b36e02779014920
MD5 36f981a7a9e1a6685e1ad702f162e8fc
BLAKE2b-256 9305fececc24eecad09488f958c9456aba10ea79715c24181094f63a4891fd0f

See more details on using hashes here.

Provenance

The following attestation bundles were made for caom2repo-1.6.3-py3-none-any.whl:

Publisher: cibuild.yml on opencadc/caom2tools

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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