Skip to main content

No project description provided

Project description

vayu

Async-first Python utility library for caching, time operations, parallel execution, distributed locks, and more.

pip install vayulib

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 TimeWindow, timeit, to_human_readable_time, timezone-aware datetime helpers
common Interval with set operations, @retry with exponential backoff, add_jitter, group
parallel ParallelRunner over thread/process pools with progress tracking, thread-safe collections
lock Redis-based LongLivedLock (auto-renewing), RedisSemaphore
pandas_utils slice_frame, select_frame, split_frame, concat_frame_from_dir
log Global logger L with L.i, L.d, L.e, L.w, L.c shorthands

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.time import TimeWindow

window = TimeWindow.behind(hours=6)  # last 6 hours
print(window.duration, window.start_ms, window.end_ms)

Development

uv sync                      # install dependencies
uv run pytest tests/         # run tests
uv run black vayu/ tests/    # format

Release process

  1. Bump version in pyproject.toml
  2. Merge to main
  3. The publish workflow automatically tags and publishes to PyPI if the version is new

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

vayulib-0.4.0.tar.gz (17.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

vayulib-0.4.0-py3-none-any.whl (20.1 kB view details)

Uploaded Python 3

File details

Details for the file vayulib-0.4.0.tar.gz.

File metadata

  • Download URL: vayulib-0.4.0.tar.gz
  • Upload date:
  • Size: 17.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.10.2 {"installer":{"name":"uv","version":"0.10.2","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}

File hashes

Hashes for vayulib-0.4.0.tar.gz
Algorithm Hash digest
SHA256 da87c15cc72bf0d31e4596ad9cd8e94acb628b3cf33267273f61001a40b7df76
MD5 51a931d2c22f49f6ab73e1e554f92c83
BLAKE2b-256 edceb93e366e938bff31ffd6b6865ff954f06224ce86b7c2e67fee029602de6f

See more details on using hashes here.

File details

Details for the file vayulib-0.4.0-py3-none-any.whl.

File metadata

  • Download URL: vayulib-0.4.0-py3-none-any.whl
  • Upload date:
  • Size: 20.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.10.2 {"installer":{"name":"uv","version":"0.10.2","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}

File hashes

Hashes for vayulib-0.4.0-py3-none-any.whl
Algorithm Hash digest
SHA256 cbd6a18596fca7c8234a36c8926e6b8ca6c2395a263aa1297e7b164c9abd0ffd
MD5 88a9d4a2654a3c8f4799636212cfd939
BLAKE2b-256 47baaedc1562e9e56ae806506aee1f86e67105fbccc62b2044b29ed8fab805ef

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page