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.4.tar.gz (42.8 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.4-py3-none-any.whl (45.2 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for caom2repo-1.6.4.tar.gz
Algorithm Hash digest
SHA256 6436f1065ca5ae83790e64f7fd26897a80ccef570c479b69510f1a540cf0243f
MD5 04d80e3fbd5f4122c1d5b1eecaeac469
BLAKE2b-256 21e4bc531bcd44d6c7e2b105f1908729c550e694f27373064131a77c816713a7

See more details on using hashes here.

Provenance

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

File metadata

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

File hashes

Hashes for caom2repo-1.6.4-py3-none-any.whl
Algorithm Hash digest
SHA256 2b1b49bef2f5b04404b1ef0e149d9de49553190993222f68e4d67cd781d72b6f
MD5 5139de5cbcae1cc6784bd255b9231e8b
BLAKE2b-256 fbd40307ef5d257c8641ce93f1db550c1b817ed67350278b39f7a81f5d2dd5ff

See more details on using hashes here.

Provenance

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