Skip to main content

aitana-storage

Store time series feature data as NetCDF or Zarr archives, organised in a directory hierarchy, and access them through a FastAPI service.

Installation

pip install aitana-storage

to_pytorch() requires PyTorch, which is an optional dependency:

pip install aitana-storage[pytorch]

Usage

Saving and querying features

Storage organises features in a directory tree (e.g. site/sensor/channel) and stores each feature as a NetCDF or Zarr archive on disk.

from datetime import datetime
from aitana.storage import Storage, generate_test_data

g = Storage('Whakaari', '/tmp', backend='zarr')
c = g.get_substore('WIZ', '00', 'HHZ')
c.save(generate_test_data(dim=1))

g.starttime = datetime(2012, 1, 1)
g.endtime = datetime(2012, 1, 2, 23, 59, 59)
rsam = c('rsam')  # -> xarray.DataArray indexed by datetime

PyTorch dataset

from torch.utils.data import DataLoader

dataset = g.to_pytorch(['rsam', 'dsar'])
dataloader = DataLoader(dataset, batch_size=32, shuffle=True)

FastAPI service

aitana.storage.api.TonikAPI exposes /feature, /inventory and /labels endpoints over HTTP.

tonik_api --rootdir /data --port 8003

Grafana annotations

Post labels stored alongside features as Grafana annotations, or retrieve existing annotations from the Grafana API.

grafana_annotations http://<user>:<pwd>@<grafana-host>:<port> --labels labels.json

License

See the repository root for license information.

Release files for aitana-storage 0.1.1

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

Source distribution (sdist)

Source distribution for aitana-storage 0.1.1
File Size Uploaded
aitana_storage-0.1.1.tar.gz 4.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for aitana-storage 0.1.1
File Interpreter ABI Platform
aitana_storage-0.1.1-py3-none-any.whl Python 3 none any Details

Total release size: 8.7 kB

Release files / aitana_storage-0.1.1.tar.gz

Download URL aitana_storage-0.1.1.tar.gz
Size 4.1 kB
Tags Source
SHA-256 checksum
How to use checksums
08ad38c5a00842078435002b33ffb06e21809f2a9c95d6509c05e2a2a4360faa
BLAKE2b-256 checksum
How to use checksums
c4bae33ef66b3d8183bc124a55cac0fc33300df5800de77fae5f0b85c2080922
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.13

Release files / aitana_storage-0.1.1-py3-none-any.whl

Download URL aitana_storage-0.1.1-py3-none-any.whl
Size 4.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
6ee1a7cdd442f3548fe9515c58461e0510f906ee8b520d6d013e76dacb87f7f3
BLAKE2b-256 checksum
How to use checksums
de1ce1198cb0b5027d6c0389317253e1141eac0536204db05e77a435a3c97b69
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.13

Release history Release notifications | RSS feed

This release

0.1.1 This release

2 release files

0.1.0

2 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