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.5.4.tar.gz (40.9 kB view details)

Uploaded Source

Built Distribution

caom2repo-1.5.4-py3-none-any.whl (46.8 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: caom2repo-1.5.4.tar.gz
  • Upload date:
  • Size: 40.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.10.5

File hashes

Hashes for caom2repo-1.5.4.tar.gz
Algorithm Hash digest
SHA256 19a7784acdfbc4a63269ee6d7ced03b2f16757d70913e3817a1c97dc25f05a61
MD5 46049e410ecacbc395f961804271fd79
BLAKE2b-256 b69141c1f3a40ebfaa9da9befe42198daf0f62f3dad66dbf706d1caa2bbcbe37

See more details on using hashes here.

File details

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

File metadata

  • Download URL: caom2repo-1.5.4-py3-none-any.whl
  • Upload date:
  • Size: 46.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.10.5

File hashes

Hashes for caom2repo-1.5.4-py3-none-any.whl
Algorithm Hash digest
SHA256 5c672a36e6c9f2a14e8cded697d511d00940910b0f9344c98914485b4d19a636
MD5 2640bcef8074f3fb8833d68c7cdb0fd4
BLAKE2b-256 27034f64556e17e135a9935ae734214a9de9db15ea8f85fcddf1522600206d0c

See more details on using hashes here.

Supported by

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