CAOM-2.4 repo access and tools
Project description
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
Release history Release notifications | RSS feed
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.1.tar.gz
(43.2 kB
view details)
Built Distribution
caom2repo-1.6.1-py3-none-any.whl
(46.6 kB
view details)
File details
Details for the file caom2repo-1.6.1.tar.gz
.
File metadata
- Download URL: caom2repo-1.6.1.tar.gz
- Upload date:
- Size: 43.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.12.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | a43bd38330479cf29234bd31b0d984c8263229f76294821aa07667f284f36c7d |
|
MD5 | dd620f926bc5887d32de10505d7deec8 |
|
BLAKE2b-256 | 1e9b41a68fb19d4f697c80d20c75efb7783f4fdb6c4f74da77876916f289b2ef |
File details
Details for the file caom2repo-1.6.1-py3-none-any.whl
.
File metadata
- Download URL: caom2repo-1.6.1-py3-none-any.whl
- Upload date:
- Size: 46.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.12.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8f7ecb77c2f51f8be9322d453158339e281cacad1fde7f75e5d345eafcb09a23 |
|
MD5 | 70743d0c565fde92fcd3bf48cf189bd3 |
|
BLAKE2b-256 | 8c9e9c017d86fd6d4b9e56c611152afa5165c7e738c72660f3ccae183fc7f274 |