Skip to main content

Sardana Streams

Pypi python versions Pypi version Pypi status License

Sardana data streaming infrastucture. Comprises:

  • redis based sardana scan recorder
  • Client recorders:
    • generic scan stream client (library)
    • SPEC recorder daemon
    • HDF5 recorder daemon
    • Scan GUI

Installation

From within your favorite python environment:

$ pip install sardana-streams

Usage

The name acme used in the following examples represents a fictional corporation that features prominently in the Road Runner cartoons.

Configuration

Activate sardana redis recorder:

  • Put the installation directory where the sardana_streams/recorder resides in RecorderPath tango property of the MacroServer. (ex: /usr/local/lib/python3.5/dist-packages/sardana_streams/recorder)
  • From spock:
    • activate the recorder with: senv DataRecorder "['RedisRecorder']"
    • configure the recorder with senv RedisRecorder "{'host': 'acme.org', 'port': 7379, 'db': 1}" (replace host, port and db with your own)

The RedisRecorder env can be a string or a dictionary identifying the Redis database.

In case a string is given, it recognizes the same format url argument from redis.from_url().

In case a dict is given it recognizes the same keyword arguments as redis.from_url() plus:

  • TTL: scan time to live in seconds (defaults to one week)
  • key_prefix: scan key prefix (defaults to <macro server name>:sardana:scan)

Example

Here is a simple example of a client which simply listens to scan events and prints them on screen:

import contextlib

import redis
from sardana_streams.client import ScanStream

db = redis.from_url('redis://acme.org:7379/1')
prefix = "acme:sardana:scan"
stream = ScanStream(db, prefix)
with contextlib.closing(stream):
    for event in stream:
        print(event)

Metadata

Release files for sardana-streams 0.1.0

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

Source distribution (sdist)

Source distribution for sardana-streams 0.1.0
File Size Uploaded Provenance Actions
sardana-streams-0.1.0.tar.gz 6.6 kB Without provenance Details for sardana-streams-0.1.0.tar.gz

Release files / sardana-streams-0.1.0.tar.gz

Download URL sardana-streams-0.1.0.tar.gz
Size 6.6 kB
Tags Source
SHA-256 checksum
How to use checksums
e7516ba4ebe2ab328450b897feeded18840db832897ca2228e5a0a56f303e0b9
BLAKE2b-256 checksum
How to use checksums
92e54b1010132e2596a6831cec90b04f352dc587036bdfea3359f3802d6464f3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/51.3.3.post20210118 requests-toolbelt/0.9.1 tqdm/4.55.1 CPython/3.7.9

Security for sardana-streams 0.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.0 This release

1 release file No provenance

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