Baloot
Small, focused Python helpers for experiments and day-to-day developer workflows. The package is pure Python, has no required runtime dependencies, and keeps the API flat so you can import most helpers directly from baloot.
Overview
- Lightweight utilities for seeding, file helpers, settings, Torch ergonomics, plotting, and small modules.
- Optional integrations: install the libraries you actually use (e.g.,
torch,numpy,matplotlib). - A simple, readable API surface intended for quick reuse in scripts and research code.
Installation
pip install baloot
API Reference
Constants
import baloot
print(baloot.pi)
# tensor(3.1416)
print(baloot.e)
# tensor(2.7183)
print(baloot.sqrt2)
# tensor(1.4142)
print(baloot.sqrt3)
# tensor(1.7321)
print(baloot.sqrt5)
# tensor(2.2361)
print(baloot.ln2)
# tensor(0.6931)
print(baloot.ln10)
# tensor(2.3026)
print(baloot.c)
# tensor(299792458)
assert baloot.c == baloot.light
print(baloot.golden)
# tensor(1.6180)
Reproducibility
import baloot
assert baloot.seed == baloot.seed_everything
baloot.seed(1234)
Alternatively, you can seed different libraries separately.
import baloot
baloot.seed_python(1)
baloot.seed_numpy(2)
baloot.seed_torch(3)
baloot.seed_cuda(4)
File Management
Saving data:
import baloot
data = {
"name": "John Doe",
"age": 222
}
baloot.funnel("data.json", data)
Later on you can load the data:
import baloot
data = baloot.funnel("data.json")
Triangular
A few exotic triangular functions have been added to Baloot to complete already rich triangular API of PyTorch.
import baloot
baloot.arccot(baloot.pi * 3 / 4)
baloot.arccoth(baloot.pi * 3 / 4)
baloot.cot(baloot.pi * 3 / 4)
baloot.coth(baloot.pi * 3 / 4)
baloot.hacoversin(baloot.pi * 3 / 4)
baloot.haversin(baloot.pi * 3 / 4)
assert baloot.hacoversine == baloot.hacoversin
assert baloot.haversine == baloot.haversin
Tensor Operations
Anti-diagonal:
import torch
import baloot
matrix = torch.randn(10, 10)
baloot.antidiagonal(matrix)
Batched trace operation:
import torch
import baloot
matrices = torch.randn(10, 5, 5)
traces = baloot.trace(matrices)
assert traces.shape == (10, 1)
Copyright
MIT License. Copyright (c) 2025 Taha Shieenavaz. See LICENSE.
Metadata
Release files for baloot 1.0.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 |
|---|---|---|---|---|
| baloot-1.0.0.tar.gz | 16.8 kB | With provenance | Details for baloot-1.0.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| baloot-1.0.0-py3-none-any.whl | Python 3 | none | any | Details for baloot-1.0.0-py3-none-any.whl |
Total release size: 40.6 kB
Release files / baloot-1.0.0.tar.gz
| Download URL | baloot-1.0.0.tar.gz |
|---|---|
| Size | 16.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
f2d6e1b199318a2e06a2d2f9ff8296cb5fdfff148dfd3844a6dc7d556ca34e37
|
|
BLAKE2b-256 checksum How to use checksums |
9b3df3f9900c3d95851979d952ee9c66e834784915c43a90c3d50be400e45761
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jul 5, 2026.
Transparency logRelease files / baloot-1.0.0-py3-none-any.whl
| Download URL | baloot-1.0.0-py3-none-any.whl |
|---|---|
| Size | 23.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
1c566048809b8d63c30e9c8e8ec52ae3d29ce6895dca621a22e2cfca0b98f858
|
|
BLAKE2b-256 checksum How to use checksums |
d5bdfffb962a41153c6560cdbd3fbb1cdfcbbd34d19ba5505ff26f53b5d3e0ea
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jul 5, 2026.
Transparency logSecurity for baloot 1.0.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.
Full provenance
All 2 files in this release have been uploaded with provenance metadata.
Attestation for baloot-1.0.0.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jul 5, 2026.
Transparency logA 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.