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.2.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.2-py3-none-any.whl (46.9 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: caom2repo-1.6.2.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.2.tar.gz
Algorithm Hash digest
SHA256 2892f4152d726fb00ff3030e7793301221fc3cbf5efe618211aa9c0cb1af99fa
MD5 825946919fa800a46e66b68ce2651b3f
BLAKE2b-256 79513b706ed2590b34dc157f28380adc2587df7e2cf836b3c134c1a32df43e43

See more details on using hashes here.

Provenance

The following attestation bundles were made for caom2repo-1.6.2.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.2-py3-none-any.whl.

File metadata

  • Download URL: caom2repo-1.6.2-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.2-py3-none-any.whl
Algorithm Hash digest
SHA256 21eeb1d215b8d58bac84de9d440085e9137a75a23867d3e95d3ff9ea5187ec79
MD5 c49b80c9b0b896ed547ce5ad3d142a7c
BLAKE2b-256 1e925439b138ae3181d9b6fe97466eaaa22bd03a4075515b0227444d95a636ad

See more details on using hashes here.

Provenance

The following attestation bundles were made for caom2repo-1.6.2-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