Metadata-Version: 2.5
Name: zootella-ergo
Version: 0.1.3
Summary: Simple helper functions, the same in JavaScript, Python, Rust, and Go.
Project-URL: Homepage, https://zootella.com
Project-URL: Repository, https://github.com/zootella/ergo
Author-email: zootella <zootella@zootella.com>
License-Expression: MIT
License-File: LICENSE
Keywords: base32,base62,blake3,ergonomic,hash,helpers,sha256,size,tag,time
Requires-Python: >=3.12
Requires-Dist: blake3>=1.0.11
Description-Content-Type: text/markdown

# zootella-ergo

Simple helper functions, the same in JavaScript, Python, Rust, and Go. This is the Python edition, on the standard library, plus the official blake3 package for BLAKE3.

```
uv add zootella-ergo
```

```python
from zootella.ergo import (
    Data,
    Size,
    Time,
    say_size4,
    sha256,
    tag,
    tick_to_iso,
    tick_to_text,
)

t = tag()  # a new tag, like "AgKxru95C7jFp5iPuK9O7": 21 letters and numerals
buffer = bytearray(64 * Size.KB)  # a buffer of 64 kibibytes, rather than a bare 65536
say_size4(123456789)  # "117 MB": four digits or less, with a unit
deadline = now + 2 * Time.HOUR  # two hours after a tick, in milliseconds
tick_to_text(deadline)  # "2026oct15.2041.7125", a tick's short exact text
tick_to_iso(deadline)  # "2026-10-15T20:41:07.125Z", the same tick's iso text
d = Data(text="hello")  # bytes, out as base16, base32, base62, base64, or text
sha256(d).base32()  # the SHA-256 hash, as a Data; sha1 and blake3 the same
```

Documentation for every function, in all four languages, is at [zootella.com](https://zootella.com). The source and the shared test suite are at [github.com/zootella/ergo](https://github.com/zootella/ergo).
