vayu
Async-first Python utility library for caching, time operations, parallel execution, and more.
Docs: vayu.aloktripathy.com
pip install vayulib # base: cache, time, retry, aio, log, parallel
pip install 'vayulib[data]' # adds pandas / numpy / plotly helpers
Core names are importable from the top level: from vayu import mem_cached, retry, TimeWindow, L, Interval, FileCache.
What's inside
| Module | Highlights |
|---|---|
cache |
@cached decorator with TTL, FileCache, MemoryCache, pluggable serializers |
aio |
grab_all_urls() with rate limiting, sleep_until_signal(), shutdown signal helpers |
time_utils |
TimeWindow, timeit, to_human_readable_time, timezone-aware datetime helpers |
common |
@retry with exponential backoff, add_jitter, group, camel_or_space_to_snake |
interval |
Interval dataclass with union / intersection / containment algebra |
parallel |
ParallelRunner over thread/process pools with progress tracking, thread-safe collections |
pandas_utils (data) |
slice_frame, select_frame, split_frame, concat_frame_from_dir |
plotly_utils (data) |
Plotly chart helpers |
statistics (data) |
quantile aggregation helper |
log |
Named logger L ("vayu") with L.i, L.d, L.e, L.w, L.c shorthands; opt-in configure_logging() for stdout with timezone-aware timestamps |
Modules marked (data) require the vayulib[data] extra.
Quick examples
from vayu.cache import FileCache, Pickler
from datetime import timedelta
cache = FileCache("/tmp/my_cache", Pickler())
@cache.cached(ttl=timedelta(hours=1))
async def fetch_data(url):
...
from vayu.common import retry
@retry(ConnectionError, tries=3, delay=1, backoff=2)
async def call_api():
...
from vayu import TimeWindow
window = TimeWindow.behind(hours=6) # last 6 hours
print(window.duration, window.start_ms, window.end_ms)
# Opt-in pandas monkey-patch (requires vayulib[data])
import vayu
vayu.install_pandas_extensions() # enables df.select(...) and series.select(...)
# Opt-in logging setup (stdout, timezone-aware timestamps).
# Library imports add no handlers to the root logger.
import vayu
vayu.configure_logging(level="INFO", tz="Asia/Kolkata")
Command-line tool
Base install ships vayu-dir-to-text for concatenating a directory/Git repo into one text file (handy for pasting into LLMs):
vayu-dir-to-text --dir . --extensions .py .md
vayu-dir-to-text --git_url https://github.com/user/repo.git
Development
uv sync # install dependencies
uv run pytest tests/ # run tests
uv run black vayu/ tests/ # format
Release process
- Bump
versioninpyproject.toml - Merge to
main - The publish workflow automatically tags and publishes to PyPI if the version is new
Metadata
Release files for vayulib 0.6.1
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 |
|---|---|---|---|---|
| vayulib-0.6.1.tar.gz | 21.2 kB | Without provenance | Details for vayulib-0.6.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| vayulib-0.6.1-py3-none-any.whl | Python 3 | none | any | Details for vayulib-0.6.1-py3-none-any.whl |
Total release size: 46.2 kB
Release files / vayulib-0.6.1.tar.gz
| Download URL | vayulib-0.6.1.tar.gz |
|---|---|
| Size | 21.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
3beaf3f4695e989a3dbbd45f4ba149a07264282b96b97a49c67ba5d023d96f18
|
|
BLAKE2b-256 checksum How to use checksums |
c26d2f4ef3993b2a3ba78efdd0439cec850b051a111f423c453b4c94c719d5d1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.11.7 {"installer":{"name":"uv","version":"0.11.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Release files / vayulib-0.6.1-py3-none-any.whl
| Download URL | vayulib-0.6.1-py3-none-any.whl |
|---|---|
| Size | 25.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
a8d43e74dec352b6e905ec69b186606f9087c2e8e3e3fac6ae179be8567485a2
|
|
BLAKE2b-256 checksum How to use checksums |
e7e2ef00bf0d15b74b3891a1d9825fefe8ddd9a79adf6eb4a928b277514ed363
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.11.7 {"installer":{"name":"uv","version":"0.11.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Security for vayulib 0.6.1
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.