ChronoSeq
ChronoSeq is a Python library for time-indexed streams of sampled data. It provides exact integer-nanosecond timestamps, rational sampling rates, regular and irregular time axes, nearest-sample lookup, and half-open time-window slicing. Data may be stored in memory, a file, a database, a video container, an external API, or any custom backend.
ChronoSeq has no time-zone, calendar, or wall-clock semantics. Timestamps are exact integer nanosecond offsets on a user-defined timeline.
Installation
pip install chronoseq
Core model
ChronoSeq has three main concepts:
TimeAxis: converts between timestamps and integer sample indices.Reader: reads values by integer sample index.Stream: combines aTimeAxisandReaderinto a time-queryable stream.
The common constructors are concise:
from fractions import Fraction
from chronoseq import Rate, Stream, timestamp
frames = Stream.regular(
start=timestamp(0),
rate=Rate(30),
values=[f"frame_{i:03d}" for i in range(300)],
)
# Rate(n, d) means n / d hertz, i.e. samples per second.
# For example, Rate(30000, 1001) is an exact 29.97 fps-style rate.
# Decimal rates can be represented exactly with Fraction.
rate_2856 = Rate(Fraction("28.56"))
frame = frames.nearest(timestamp("0.101"))
print(frame.index)
print(frame.time)
print(frame.value)
For irregular sampled data:
from chronoseq import Rate, Stream, timestamp
speed = Stream.irregular(
timestamps=[
timestamp("0.000"),
timestamp("0.047"),
timestamp("0.101"),
timestamp("0.153"),
],
values=[10.0, 10.3, 10.8, 11.1],
)
sample = speed.nearest(timestamp("0.100"))
More documentation
docs/semantics.md: formal timestamp, lookup, window, and reader rules.docs/custom_readers.md: custom backend and stream extension patterns.docs/performance.md: complexity notes, batching guidance, and benchmark snapshots.samples/: dependency-free usage patterns.benchmarks/: local benchmark scripts for large regular and irregular axes.
Licence
MIT
Metadata
Release files for chronoseq 0.4.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 |
|---|---|---|---|---|
| chronoseq-0.4.0.tar.gz | 16.1 kB | Without provenance | Details for chronoseq-0.4.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| chronoseq-0.4.0-py3-none-any.whl | Python 3 | none | any | Details for chronoseq-0.4.0-py3-none-any.whl |
Total release size: 26.9 kB
Release files / chronoseq-0.4.0.tar.gz
| Download URL | chronoseq-0.4.0.tar.gz |
|---|---|
| Size | 16.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
1fb5dbbfeae1298e391465e235aab8b02c5f3317c37b4c7508d6b757ebc320ca
|
|
BLAKE2b-256 checksum How to use checksums |
f0f1c82c973545003f5ab812b68fbeb713fcc63eeb1e104bcb5306242b3ef6b4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.10.11
|
Release files / chronoseq-0.4.0-py3-none-any.whl
| Download URL | chronoseq-0.4.0-py3-none-any.whl |
|---|---|
| Size | 10.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
e1d75834a3c1004c27c2d86ba80ec7ec6231bb47c66b7ad6e0923e08a9830d58
|
|
BLAKE2b-256 checksum How to use checksums |
e70047f84c29f83e27db55ea10fbdac34dde1c417493f964b5ba6f03673017c7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.10.11
|
Security for chronoseq 0.4.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.