arrakis-python
Arrakis Python client library
Python client library for the Arrakis low-latency timeseries data distribution platform. Query, stream, and publish timeseries data.
Resources
Installation
With pip:
pip install arrakis
With conda:
conda install -c conda-forge arrakis-python
Where to Start
- Tutorial — New to arrakis? Fetch your first timeseries data step by step.
- User Guide — Fetching, streaming, channel discovery, publishing, the CLI, and more.
- Background — How the system works: Arrow Flight, Kafka, multiplexing, and the data model.
- API Reference — Auto-generated documentation from source code.
Features
- Stream live and historical timeseries data
- Describe channel metadata
- Search for channels matching a set of conditions
- Publish timeseries data
- Command-line interface for all operations
Quickstart
Fetch timeseries
import arrakis
start = 1187000000
end = 1187001000
channels = [
"H1:CAL-DELTAL_EXTERNAL_DQ",
"H1:LSC-POP_A_LF_OUT_DQ",
]
block = arrakis.fetch(channels, start, end)
for channel, series in block.items():
print(channel, series)
where block is a [arrakis.block.SeriesBlock][] and series is a
[arrakis.block.Series][].
Stream timeseries
1. Live data
import arrakis
channels = [
"H1:CAL-DELTAL_EXTERNAL_DQ",
"H1:LSC-POP_A_LF_OUT_DQ",
]
for block in arrakis.stream(channels):
print(block)
2. Historical data
import arrakis
start = 1187000000
end = 1187001000
channels = [
"H1:CAL-DELTAL_EXTERNAL_DQ",
"H1:LSC-POP_A_LF_OUT_DQ",
]
for block in arrakis.stream(channels, start, end):
print(block)
Describe metadata
import arrakis
channels = [
"H1:CAL-DELTAL_EXTERNAL_DQ",
"H1:LSC-POP_A_LF_OUT_DQ",
]
metadata = arrakis.describe(channels)
where metadata is a dictionary mapping channel names to
[arrakis.channel.Channel][].
Find channels
import arrakis
for channel in arrakis.find("H1:LSC-*"):
print(channel)
where channel is a [arrakis.channel.Channel][].
Count channels
import arrakis
count = arrakis.count("H1:LSC-*")
Publish timeseries
from arrakis import Channel, Publisher, SeriesBlock, Time
import numpy
# admin-assigned ID
publisher_id = "my_producer"
# define channel metadata
metadata = {
"H1:FKE-TEST_CHANNEL1": Channel(
"H1:FKE-TEST_CHANNEL1",
data_type=numpy.float64,
sample_rate=64,
),
"H1:FKE-TEST_CHANNEL2": Channel(
"H1:FKE-TEST_CHANNEL2",
data_type=numpy.int32,
sample_rate=32,
),
}
publisher = Publisher(publisher_id)
publisher.register()
with publisher:
# create block to publish
series = {
"H1:FKE-TEST_CHANNEL1": numpy.array([0.1, 0.2, 0.3, 0.4], dtype=numpy.float64),
"H1:FKE-TEST_CHANNEL2": numpy.array([1, 2], dtype=numpy.int32),
}
block = SeriesBlock(
1234567890 * Time.SECONDS, # time in nanoseconds for first sample
series, # the data to publish
metadata, # the channel metadata
)
# publish timeseries
publisher.publish(block)
Metadata
Release files for arrakis 0.21.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| arrakis-0.21.0.tar.gz | 178.7 kB | Without provenance | Details for arrakis-0.21.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| arrakis-0.21.0-py3-none-any.whl | Python 3 | none | any | Details for arrakis-0.21.0-py3-none-any.whl |
Total release size: 345.3 kB
Release files / arrakis-0.21.0.tar.gz
| Download URL | arrakis-0.21.0.tar.gz |
|---|---|
| Size | 178.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
1c278e36db82d3b09f37f7a91bae0aeae0df6c2d2840ac8bbb5097f03d39fa4f
|
|
BLAKE2b-256 checksum How to use checksums |
5420aee19f65906fd21065836a8dbf2d4ba37304f676c3a30ad0afd8dfcc8b62
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
Hatch/1.16.5 cpython/3.13.12 HTTPX/0.28.1
|
Release files / arrakis-0.21.0-py3-none-any.whl
| Download URL | arrakis-0.21.0-py3-none-any.whl |
|---|---|
| Size | 166.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
cbba173fcae092c2eab0cf23cca75bdc0ab5987adbb0692f99aad5294a230c13
|
|
BLAKE2b-256 checksum How to use checksums |
3f22c1e424a4b350c7764752ccd403fb58df67693655924b307cfeb991312889
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
Hatch/1.16.5 cpython/3.13.12 HTTPX/0.28.1
|
Security for arrakis 0.21.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.