Skip to main content

Client for EPICS Archive Appliance

Utilities for interacting with an EPICS Archiver Appliance server.

With the exception of aaget --how plot ... PV name strings are passed through verbatim, and may include AA binning operators. See the Processing of data section for a list.

For fidelity, data is retrieved in the binary protobuf encoding native to AA.

Intended to supplant https://github.com/epicsdeb/carchivetools

Building

Dependencies from the python ecosystem (eg. pip)

  • python >= 3.7
  • aiohttp >= 3.7.0 (and perhaps earlier)
  • numpy >= 1.7
  • Cython >= 0.20
  • setuptools >= 40.9.0
  • h5py (optional)

Dependencies from outside the python ecosystem (eg. rpm, deb, etc.)

  • Working C++11 toolchain
  • protobuf compiler, protobuf-lite library, and headers for >= 3.0
    • These compiler and library versions must match
apt-get install protobuf-compiler libprotobuf-dev

yum install protobuf-compiler libprotobuf-devel

dnf install protobuf-compiler libprotobuf-devel

brew install protobuf

(Getting protobuf on windows is difficult... See for an example using vcpkg.)

Build and install with pip

virtualenv aa
. aa/bin/activate
pip install -U pip
pip install Cython
./setup.py sdist
pip install dist/aaclient-*.tar.gz
aaget -h

Alternately, for in-place usage (eg. evaluation or troubleshooting).

./setup.py build_ext -i
python -m aaclient.cmd.get -h

In either case a configuration file is required.

cp aaclient.conf.example aaclient.conf
# edit aaclient.conf and fill in at least "host="

Command Line Interface

This package provides several CLI tools for interacting with an Archiver Appliance server.

See the example configuration file.

aagrep Searching for PVs

Running aagrep without arguments will attempt to print a full list of PV names being archived. Otherwise query patterns (wildcard or regexp) will be applied. If multiple patterns are provided, the output will be all PV names which matched any pattern.

$ aagrep RH
CO2:RH-I

aaget Printing data

Query data from a set of PV names for a certain time range and print the results.

$ aaget --start='-1 h' --end=now CO2:RH-I
01-30 07:50:11.958813 CO2:RH-I 45.10040283203125
01-30 08:13:04.816086 CO2:RH-I 44.56939697265625
01-30 08:40:41.527406 CO2:RH-I 44.06585693359375

aah5 Extract to HDF5 file

Queries like aaget, with results written to a HDF5 file instead of being printed to screen.

$ aah5 --start='-1 h' --end=now out.h5 CO2:RH-I
INFO:__main__:'CO2:RH-I' : (3, 1)
$ h5ls -r out.h5 
/                        Group
/CO2:RH-I                Group
/CO2:RH-I/meta           Dataset {3/Inf}
/CO2:RH-I/value          Dataset {3/Inf, 1/Inf}

Alternate entry points.

  • aaget -> python -m aaclient.cmd.get
  • aagrep -> python -m aaclient.cmd.grep
  • aah5 -> python -m aaclient.cmd.h5

API

The API behind the CLI executables is (primarily) asyncio based.

import asyncio
from aaclient import getArchive

async def demo():
    A= await getArchive()
    with A:
        V,M = await A.raw('CO2:CO2-I', T0='-12 h')
        print(V.shape, M.shape)

asyncio.run(demo())

The entry point for API usage is aaclient.getArchive(), which returns an object inheriting from aaclient.IArchive.

Streaming

The aaclient.IArchive.raw_iter() method allows for incremental retrieval of arbitrarily large data for long time range. Async. iteration will yield samples in batches.

Blocking API

A blocking (threaded) API is also provided as a convenience for interactive usage.

from matplotlib.pyplot import *
from aaclient.threading import getArchive
A=getArchive()

# Request ~1000 points of "caplotbinning" data
# suitable for quick/efficient visualization of a
# long time range
V,M = A.plot('CO2:CO2-I', T0='-7 d', count=1000)

figure()
plot_date(M.time_mpl, V[:,0], '-')
grid(True)

# Request complete (raw) data for a (shorter)
# time range
figure()
V,M = A.raw('CO2:CO2-I', T0='-12 h')
plot_date(M.time_mpl, V[:,0], '-')
grid(True)

show()

Release files for aaclient 0.0.5

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for aaclient 0.0.5
File Size Uploaded
aaclient-0.0.5.tar.gz 146.5 kB Details

Built distributions (wheels)

Table of built distributions (wheels) for aaclient 0.0.5
File
aaclient-0.0.5-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl CPython 3.13 CPython 3.13 Linux glibc 2.17+ x86-64 Details
aaclient-0.0.5-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl CPython 3.12 CPython 3.12 Linux glibc 2.17+ x86-64 Details
aaclient-0.0.5-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl CPython 3.11 CPython 3.11 Linux glibc 2.17+ x86-64 Details
aaclient-0.0.5-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl CPython 3.10 CPython 3.10 Linux glibc 2.17+ x86-64 Details
aaclient-0.0.5-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl CPython 3.9 CPython 3.9 Linux glibc 2.17+ x86-64 Details
aaclient-0.0.5-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl CPython 3.8 CPython 3.8 Linux glibc 2.17+ x86-64 Details
aaclient-0.0.5-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl CPython 3.7 CPython 3.7 pymalloc Linux glibc 2.17+ x86-64 Details

Total release size:2.0 MB

Release files / aaclient-0.0.5.tar.gz

Download URL aaclient-0.0.5.tar.gz
Size 146.5 kB
Tags Source
SHA-256 checksum
How to use checksums
db5d50de677dd7fffb7686593a4aa3a11ef3fdba20c16bf9314a086fb2e05421
BLAKE2b-256 checksum
How to use checksums
6ea4c2cffc81d79a2650febe70b6343d54e6caa94abe23f0169608d5c35c0107
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.11.13

Release files / aaclient-0.0.5-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL aaclient-0.0.5-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 269.6 kB
Tags CPython 3.13 Linux glibc 2.17+ x86-64
SHA-256 checksum
How to use checksums
695412f44f9956d32cf64786c6985d06c20d8ce9f67f02e37c4216e0679ba238
BLAKE2b-256 checksum
How to use checksums
10a1b1da96a49cc2a4a4a352860c47de1d95d2b718f46742ab125a7278d38841
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.11.13

Release files / aaclient-0.0.5-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL aaclient-0.0.5-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 269.7 kB
Tags CPython 3.12 Linux glibc 2.17+ x86-64
SHA-256 checksum
How to use checksums
e9459f5c5d33079efdf0ab1d2044141835719f46cfe1994aa4fa69faefb89a11
BLAKE2b-256 checksum
How to use checksums
b9f5fb13f0de0d134e0b207691dadb8b174ae361118256156b6b57862a0aa226
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.11.13

Release files / aaclient-0.0.5-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL aaclient-0.0.5-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 270.6 kB
Tags CPython 3.11 Linux glibc 2.17+ x86-64
SHA-256 checksum
How to use checksums
46e549ca096ed3656b737fadab67342d5ac89421883df449c9e7ee19815a65b3
BLAKE2b-256 checksum
How to use checksums
eec1b46c85485da6051e87b9e469bc490b186c23846806d70ec4edc21ff87659
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.11.13

Release files / aaclient-0.0.5-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL aaclient-0.0.5-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 269.4 kB
Tags CPython 3.10 Linux glibc 2.17+ x86-64
SHA-256 checksum
How to use checksums
9cebab09d4b358f91e9276341d17c792497fef8047d1f46952eff544faf47d8f
BLAKE2b-256 checksum
How to use checksums
1a97cf83a58dd9cbbe58673f9b9440941f15e58b60c7b1fdb5a76c8f8aa4d9ea
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.11.13

Release files / aaclient-0.0.5-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL aaclient-0.0.5-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 270.0 kB
Tags CPython 3.9 Linux glibc 2.17+ x86-64
SHA-256 checksum
How to use checksums
d0255b4b6ff819153122d8cd8c4716a1dbd25a2d365095c3dc32d4a72c91623d
BLAKE2b-256 checksum
How to use checksums
71d30f0329aac7d9eaaf461a210d75e4114c54f5538a2e0da18002e36cdf0a1c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.11.13

Release files / aaclient-0.0.5-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL aaclient-0.0.5-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 269.1 kB
Tags CPython 3.8 Linux glibc 2.17+ x86-64
SHA-256 checksum
How to use checksums
ddc6980c09266c6096418623f14da1ca621f89123101004d959ff8b5004fc8ba
BLAKE2b-256 checksum
How to use checksums
d1c3df0592796ca433b14027d72b515d6ff2f6e3207241b45de282b872fa5d05
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.11.13

Release files / aaclient-0.0.5-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL aaclient-0.0.5-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 271.1 kB
Tags CPython 3.7 CPython 3.7 pymalloc Linux glibc 2.17+ x86-64
SHA-256 checksum
How to use checksums
cbcbdb955ac0fbe46ad820dca3e17c46e28432718c654b511f4c9a23f9efcf82
BLAKE2b-256 checksum
How to use checksums
2b7993bc6959278144b03746fe51d22eaf2fec8c89aadbccad9aafb64e3330a1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.11.13

Release history Release notifications | RSS feed

This release

0.0.5 This release

8 release files

0.0.3

8 release files

0.0.2

13 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page