Skip to main content

Koltrast

Koltrast is a very small module that splits a time interval into multiple, shorter intervals.

It was made to help simplify the process of backfilling pipelines.

How to install

pip install koltrast

Example usage

import koltrast

intervals = koltrast.interval.generate_intervals(since="2014-06-01", until="2014-06-04", chunk="day")

for interval in intervals:
    print(interval)
Interval(since=DateTime(2014, 6, 1, 0, 0, 0, tzinfo=Timezone('UTC')), until=DateTime(2014, 6, 2, 0, 0, 0, tzinfo=Timezone('UTC')))
Interval(since=DateTime(2014, 6, 2, 0, 0, 0, tzinfo=Timezone('UTC')), until=DateTime(2014, 6, 3, 0, 0, 0, tzinfo=Timezone('UTC')))
Interval(since=DateTime(2014, 6, 3, 0, 0, 0, tzinfo=Timezone('UTC')), until=DateTime(2014, 6, 4, 0, 0, 0, tzinfo=Timezone('UTC')))

Notes

Accepts the following chunks: day, hour, week, month, year

Koltrast always uses "left", which means for a range from A > D, only A B C are selected.

If you provide a since and until, which cannot be divided evenly by the chunk you provided, the last interval will be shorter.

Metadata

Release files for koltrast 2.0.8

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

Source distribution (sdist)

Source distribution for koltrast 2.0.8
File Size Uploaded Provenance Actions
koltrast-2.0.8.tar.gz 4.6 kB Without provenance Details for koltrast-2.0.8.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for koltrast 2.0.8
File Interpreter ABI Platform Actions
koltrast-2.0.8-py3-none-any.whl Python 3 none any Details for koltrast-2.0.8-py3-none-any.whl

Total release size: 8.7 kB

Release files / koltrast-2.0.8.tar.gz

Download URL koltrast-2.0.8.tar.gz
Size 4.6 kB
Tags Source
SHA-256 checksum
How to use checksums
5b5b7de2c1b379a7645da3121bbd4ce2ad8e91a272b53e28b0aa74a3f1d3ec91
BLAKE2b-256 checksum
How to use checksums
d6f36a2408f360df11747fbfd82ffae79b6edf7f880a05df8e904392481d626b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.12.7

Release files / koltrast-2.0.8-py3-none-any.whl

Download URL koltrast-2.0.8-py3-none-any.whl
Size 4.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
d5af07d01b444a58be1e27a857f3d291d07d277a6670a001874bc77c79a9848b
BLAKE2b-256 checksum
How to use checksums
6192f275fed120937828490f463167ba150395fde52ce19833b6c5961c378b3d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.12.7

Security for koltrast 2.0.8

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.

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