Skip to main content

Tools to query Archiver Appliance and export data

Project description

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
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()

    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()

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

aaclient-0.0.2.tar.gz (101.6 kB view details)

Uploaded Source

Built Distributions

aaclient-0.0.2-cp310-cp310-win_amd64.whl (280.8 kB view details)

Uploaded CPython 3.10 Windows x86-64

aaclient-0.0.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (257.2 kB view details)

Uploaded CPython 3.10 manylinux: glibc 2.17+ x86-64

aaclient-0.0.2-cp310-cp310-macosx_10_9_x86_64.whl (323.0 kB view details)

Uploaded CPython 3.10 macOS 10.9+ x86-64

aaclient-0.0.2-cp39-cp39-win_amd64.whl (280.8 kB view details)

Uploaded CPython 3.9 Windows x86-64

aaclient-0.0.2-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (257.0 kB view details)

Uploaded CPython 3.9 manylinux: glibc 2.17+ x86-64

aaclient-0.0.2-cp39-cp39-macosx_10_9_x86_64.whl (323.0 kB view details)

Uploaded CPython 3.9 macOS 10.9+ x86-64

aaclient-0.0.2-cp38-cp38-win_amd64.whl (280.9 kB view details)

Uploaded CPython 3.8 Windows x86-64

aaclient-0.0.2-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (257.4 kB view details)

Uploaded CPython 3.8 manylinux: glibc 2.17+ x86-64

aaclient-0.0.2-cp38-cp38-macosx_10_9_x86_64.whl (322.7 kB view details)

Uploaded CPython 3.8 macOS 10.9+ x86-64

aaclient-0.0.2-cp37-cp37m-win_amd64.whl (280.3 kB view details)

Uploaded CPython 3.7m Windows x86-64

aaclient-0.0.2-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (255.7 kB view details)

Uploaded CPython 3.7m manylinux: glibc 2.17+ x86-64

aaclient-0.0.2-cp37-cp37m-macosx_10_9_x86_64.whl (323.3 kB view details)

Uploaded CPython 3.7m macOS 10.9+ x86-64

File details

Details for the file aaclient-0.0.2.tar.gz.

File metadata

  • Download URL: aaclient-0.0.2.tar.gz
  • Upload date:
  • Size: 101.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.62.3 importlib-metadata/4.11.1 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.9.10

File hashes

Hashes for aaclient-0.0.2.tar.gz
Algorithm Hash digest
SHA256 d0689f9a5f7d7e0168ae03c4e9f75dc867542c1116567627772276d6b3849618
MD5 3360a03f5a431d0b2c1dd5a2d096c815
BLAKE2b-256 5a317b22ef0805da1e647ade4fa46fba11a2513f5ad6fdae954384b295a08b09

See more details on using hashes here.

File details

Details for the file aaclient-0.0.2-cp310-cp310-win_amd64.whl.

File metadata

  • Download URL: aaclient-0.0.2-cp310-cp310-win_amd64.whl
  • Upload date:
  • Size: 280.8 kB
  • Tags: CPython 3.10, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.62.3 importlib-metadata/4.11.1 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.9.10

File hashes

Hashes for aaclient-0.0.2-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 7ab3301977d052e7fd1d5404103f1f5ce98ca804f8a4ee47deca2f07d43104d6
MD5 6d06efb00d080af14e3f33514e1f3dd4
BLAKE2b-256 bf541c8328ebbff148fc967a976b46c5c1f967f02cf95ab336a6d8dd5e9ffd20

See more details on using hashes here.

File details

Details for the file aaclient-0.0.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

  • Download URL: aaclient-0.0.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
  • Upload date:
  • Size: 257.2 kB
  • Tags: CPython 3.10, manylinux: glibc 2.17+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.62.3 importlib-metadata/4.11.1 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.9.10

File hashes

Hashes for aaclient-0.0.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 35a20eb7d485918761afdbde1819c0116cefbfe875b1bc16e3a8d34161af0abd
MD5 9abe17c5ef6ba815f963b20f020dd4db
BLAKE2b-256 71cb188ca012793907ef779ed1891be9953289eaf91b34686ffa58e6b5abc995

See more details on using hashes here.

File details

Details for the file aaclient-0.0.2-cp310-cp310-macosx_10_9_x86_64.whl.

File metadata

  • Download URL: aaclient-0.0.2-cp310-cp310-macosx_10_9_x86_64.whl
  • Upload date:
  • Size: 323.0 kB
  • Tags: CPython 3.10, macOS 10.9+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.62.3 importlib-metadata/4.11.1 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.9.10

File hashes

Hashes for aaclient-0.0.2-cp310-cp310-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 0679afc00b9228c905cd305f35297bcc9169b3917c859ac00dd6c4469ceb6cbb
MD5 e7c0df70da716eb3e02dcd4edffdc732
BLAKE2b-256 88baeca91c387b0e5ec0205f5c811f75463fa31c5117605a840c5568074b5a85

See more details on using hashes here.

File details

Details for the file aaclient-0.0.2-cp39-cp39-win_amd64.whl.

File metadata

  • Download URL: aaclient-0.0.2-cp39-cp39-win_amd64.whl
  • Upload date:
  • Size: 280.8 kB
  • Tags: CPython 3.9, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.62.3 importlib-metadata/4.11.1 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.9.10

File hashes

Hashes for aaclient-0.0.2-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 ce25eec4ad899738530c7b5e8b6a68bc9d94cb6710677a078be19025207efe95
MD5 c702cfc61880000711ae6dff40a9ceb9
BLAKE2b-256 06cae11ebefd7968bdbb10dc371ddb68144b9d9223ebbd23bdeac3df1c219aea

See more details on using hashes here.

File details

Details for the file aaclient-0.0.2-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

  • Download URL: aaclient-0.0.2-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
  • Upload date:
  • Size: 257.0 kB
  • Tags: CPython 3.9, manylinux: glibc 2.17+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.62.3 importlib-metadata/4.11.1 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.9.10

File hashes

Hashes for aaclient-0.0.2-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 2b1bdfca8a4c3f0b32168b635f82ee4ef3096c91387d5e4075d13bb3ab05240c
MD5 793ca5df2dc67f65a275634664c1e9f8
BLAKE2b-256 ad39e1bfe3316a7a42c826cdd7cfc295bd8f21b3cfef3b9661e504a58df1bea0

See more details on using hashes here.

File details

Details for the file aaclient-0.0.2-cp39-cp39-macosx_10_9_x86_64.whl.

File metadata

  • Download URL: aaclient-0.0.2-cp39-cp39-macosx_10_9_x86_64.whl
  • Upload date:
  • Size: 323.0 kB
  • Tags: CPython 3.9, macOS 10.9+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.62.3 importlib-metadata/4.11.1 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.9.10

File hashes

Hashes for aaclient-0.0.2-cp39-cp39-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 1803a778ced31f2faa0f48158b13fc059ec3cda4fdbdb4c33a74902f3657dd4a
MD5 5d9acb19148c371fd7a866226c8234a4
BLAKE2b-256 446acf39af2f06c505423b3c84da37acbd6b2787446bc9321916880dfdd4863f

See more details on using hashes here.

File details

Details for the file aaclient-0.0.2-cp38-cp38-win_amd64.whl.

File metadata

  • Download URL: aaclient-0.0.2-cp38-cp38-win_amd64.whl
  • Upload date:
  • Size: 280.9 kB
  • Tags: CPython 3.8, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.62.3 importlib-metadata/4.11.1 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.9.10

File hashes

Hashes for aaclient-0.0.2-cp38-cp38-win_amd64.whl
Algorithm Hash digest
SHA256 9d71627d9bc164e3884f322e45e17ce1b834572fe866f34b789085896b6da1f5
MD5 b79c54adb69a2264457110536d44977e
BLAKE2b-256 fb7243ef4824555f27a6e6bc475d23ad1ba87c31fc74eca41b70466b526ee659

See more details on using hashes here.

File details

Details for the file aaclient-0.0.2-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

  • Download URL: aaclient-0.0.2-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
  • Upload date:
  • Size: 257.4 kB
  • Tags: CPython 3.8, manylinux: glibc 2.17+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.62.3 importlib-metadata/4.11.1 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.9.10

File hashes

Hashes for aaclient-0.0.2-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 35b8161a5a4d2bedb8064257bc97727a8c318c86689e719d4a6973a15c9b9d32
MD5 13b7d0c635775121160c6e462b503799
BLAKE2b-256 4989033ff78dc09fd99fa6259b42878375d401d9715818c4bfb6e3ee3b826b55

See more details on using hashes here.

File details

Details for the file aaclient-0.0.2-cp38-cp38-macosx_10_9_x86_64.whl.

File metadata

  • Download URL: aaclient-0.0.2-cp38-cp38-macosx_10_9_x86_64.whl
  • Upload date:
  • Size: 322.7 kB
  • Tags: CPython 3.8, macOS 10.9+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.62.3 importlib-metadata/4.11.1 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.9.10

File hashes

Hashes for aaclient-0.0.2-cp38-cp38-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 5cdf8ecdb659c956ab1ef998d77c442cfcd93fad124c4aec3382a457fc322f5f
MD5 478726688129673e34f02f936e6897b3
BLAKE2b-256 4c359be5db4823aacfac7013db3e813ed5c9e2cbba56f1cb08eaf0ad17b493b0

See more details on using hashes here.

File details

Details for the file aaclient-0.0.2-cp37-cp37m-win_amd64.whl.

File metadata

  • Download URL: aaclient-0.0.2-cp37-cp37m-win_amd64.whl
  • Upload date:
  • Size: 280.3 kB
  • Tags: CPython 3.7m, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.62.3 importlib-metadata/4.11.1 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.9.10

File hashes

Hashes for aaclient-0.0.2-cp37-cp37m-win_amd64.whl
Algorithm Hash digest
SHA256 585c07d9dacb4d9589417a1f1a7f4218146c50f88d564836ee9b4ff1e4e1eac8
MD5 d12864d9354c985ba81f4e73a416067c
BLAKE2b-256 1324bdd8f36532e1ca01577a4ff19590be2f598d53184dd17066679f92396812

See more details on using hashes here.

File details

Details for the file aaclient-0.0.2-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

  • Download URL: aaclient-0.0.2-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
  • Upload date:
  • Size: 255.7 kB
  • Tags: CPython 3.7m, manylinux: glibc 2.17+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.62.3 importlib-metadata/4.11.1 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.9.10

File hashes

Hashes for aaclient-0.0.2-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 23136859d3e692071a0314ca0aa602747e969f3a8c7032670b8343cf8c36725d
MD5 003b1ebeb49fac8ee8a97a022e9dcf6b
BLAKE2b-256 f7849aee835b7647d422a79a5d1a8f71914ccf01362ec3df9af30455f02c8eb9

See more details on using hashes here.

File details

Details for the file aaclient-0.0.2-cp37-cp37m-macosx_10_9_x86_64.whl.

File metadata

  • Download URL: aaclient-0.0.2-cp37-cp37m-macosx_10_9_x86_64.whl
  • Upload date:
  • Size: 323.3 kB
  • Tags: CPython 3.7m, macOS 10.9+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.62.3 importlib-metadata/4.11.1 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.9.10

File hashes

Hashes for aaclient-0.0.2-cp37-cp37m-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 4d8ed42f8ac35ad5fd9c9af101bcb0bbe875094e46a76347c3cb3ff2faa113b5
MD5 72afa615cdb47e6ec1ee40dee472a12d
BLAKE2b-256 ffb244a10a56ae679ca27ed48bb4964c1a2afe0ba3ab6be6b27a9bb66eb38300

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