Skip to main content

CAOM-2.3 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.1.tar.gz (30.4 kB view details)

Uploaded Source

Built Distribution

caom2repo-1.5.1-py3-none-any.whl (46.6 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: caom2repo-1.5.1.tar.gz
  • Upload date:
  • Size: 30.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.9.4

File hashes

Hashes for caom2repo-1.5.1.tar.gz
Algorithm Hash digest
SHA256 3faf0369a9e752f1482773d93f435acc3c71aa1dd57b9cbfda1eff7c3912f108
MD5 1ed8b686fbcd802d4e2b11dad7586d3d
BLAKE2b-256 d32e611f01ca7f7bc64bdc7d31b924fe40a8c5cafbf6077c1e276605d43b53a9

See more details on using hashes here.

File details

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

File metadata

  • Download URL: caom2repo-1.5.1-py3-none-any.whl
  • Upload date:
  • Size: 46.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.9.4

File hashes

Hashes for caom2repo-1.5.1-py3-none-any.whl
Algorithm Hash digest
SHA256 9727e1a2391e5cbf10ce27aef730a99be494d774c4f71dc1d6390b0c67cf3fc0
MD5 3ed7a1845ca1940942e3e33f8482cdf8
BLAKE2b-256 946815ca3c1303deb1ad6d13070268b8c97e09e5001d2dcdcd0a74a5ddd6f907

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