grrr
Fast, colorful logging and a small collection of practical tools for modern Python.
grrr combines a Fond-backed native logger with lightweight shell-command helpers
and JSON settings. It requires CPython 3.15 or newer.
Installation
uv pip install grrr
Logging
from grrr import Logger, LogLevel
with Logger("app", level=LogLevel.DEBUG, console="split") as log:
log.debug("starting")
log.info("ready")
log.warning("check the configuration")
Console output supports color and can be routed to stdout, stderr, or split by severity. File, buffer, and queued loggers use the same API:
from grrr import Logger
with Logger.file_logger("logs/app.log") as log:
log.info("written to a rotating file")
with Logger.buffer_logger() as log:
log.success("captured in memory")
record = log.records()[0]
print(record.level, record.message, record.timestamp)
with Logger.queue_logger(console="split") as log:
log.info("handled by the native listener")
log.flush()
Child loggers share their parent's sinks while adding a qualified name:
with Logger("service") as log:
database = log.child("database")
database.info("connected")
Exception tracking is opt-in and stores text snapshots rather than live frames:
with Logger("worker", track_exceptions=True) as log:
try:
raise RuntimeError("something growled")
except RuntimeError:
log.exception("job failed")
print(log.exceptions)
Shell commands
Command factories preserve argument boundaries and execute without an implicit shell by default:
import sys
from grrr.cli import BaseShellCommand
command = BaseShellCommand.adhoc(sys.executable, "-c", "print('hello')")
print(command.get())
Synchronous and asynchronous shell sessions are available when explicit shell interpretation or streaming output is needed.
JSON settings
from grrr.config import SimpleSettingsManager
with SimpleSettingsManager("my-app") as settings:
settings.set("theme", "dark")
print(settings.get("theme"))
Settings are stored in one JSON file, with access serialized by a file lock and resources released through the context-managed API.
Native hashing
Fond's deterministic hash implementations are available for any contiguous
bytes-like object without first copying it to bytes:
from grrr.hashing import crc64_xz, murmur3_32, siphash24
checksum = crc64_xz(memoryview(payload))
bucket = murmur3_32(payload, 42)
digest = siphash24(payload, secret_key) # an exact 16-byte key
The module also exposes CRC-32/CKSUM and FNV-1a 32/64. Algorithm names include their precise variants so serialized hashes remain unambiguous.
Generational registries
SlotMap owns values behind compact, immutable handles. Removing a value makes
its handle permanently stale, even after the native slot is reused:
from grrr import SlotMap
tasks = SlotMap[str](max_size=1024)
handle = tasks.insert("compile shaders")
print(tasks[handle])
tasks.remove(handle)
assert tasks.get(handle) is None
Handles belong to one map incarnation and cannot resolve against another map.
Clearing or reinitializing a map invalidates all of its outstanding handles.
Iteration and handles(), values(), and items() operate on snapshots, so
they remain safe if the map is mutated afterward.
Struct plugins
PluginStruct is an experimental composition layer over Fond's native
Struct. Plugins can prepare the class namespace, augment the finished class,
or wrap construction without affecting ordinary Fond structs:
from grrr import PluginStruct
from grrr.structs import StructCall
class CountCalls:
calls = 0
def call(self, call: StructCall, /) -> object:
self.calls += 1
return call.proceed()
counter = CountCalls()
class Event(PluginStruct, plugins=(counter,)):
name: str
Plugins inherit in declaration order. Reusing the same plugin object through a
diamond runs it once; a plugin can define __struct_plugin_key__ when locally
declared replacements should resolve independently created feature bases.
The included SingletonStruct convenience base caches one successfully built
instance per concrete class:
from grrr import SingletonStruct
class Settings(SingletonStruct):
profile: str
settings = Settings("production")
assert Settings("ignored") is settings
Settings.reset_instance()
Plugin-enabled reified Structs are deliberately rejected until Fond provides a native planning hook for them.
Version
python -c "import grrr; print(grrr.__version__)"
Metadata
Release files for grrr 0.7.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distributions (wheels)
| File | Actions Reset | |||
|---|---|---|---|---|
| grrr-0.7.2-cp315-cp315-win_amd64.whl | CPython 3.15 | CPython 3.15 | Windows x86-64 | Details for grrr-0.7.2-cp315-cp315-win_amd64.whl |
| grrr-0.7.2-cp315-cp315-manylinux_2_26_x86_64.manylinux_2_28_x86_64.whl | CPython 3.15 | CPython 3.15 | Linux glibc 2.26+ x86-64, Linux glibc 2.28+ x86-64 | Details for grrr-0.7.2-cp315-cp315-manylinux_2_26_x86_64.manylinux_2_28_x86_64.whl |
| grrr-0.7.2-cp315-cp315-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl | CPython 3.15 | CPython 3.15 | Linux glibc 2.24+ ARM64, Linux glibc 2.28+ ARM64 | Details for grrr-0.7.2-cp315-cp315-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl |
| grrr-0.7.2-cp315-cp315-macosx_15_0_arm64.whl | CPython 3.15 | CPython 3.15 | macOS 15.0+ ARM64 | Details for grrr-0.7.2-cp315-cp315-macosx_15_0_arm64.whl |
Total release size: 1.2 MB
Release files / grrr-0.7.2-cp315-cp315-win_amd64.whl
| Download URL | grrr-0.7.2-cp315-cp315-win_amd64.whl |
|---|---|
| Size | 416.8 kB |
| Tags | CPython 3.15 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
76a378887780d18f0b24358edda71a2fa46c807f1fae9507462e59d8e271b146
|
|
BLAKE2b-256 checksum How to use checksums |
0eaa6bef1e5fcaa8c5f216dd2ad4ed40391f4e61c19f4441bf999d51147bfd1d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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 Nov 13, 2026.
Transparency logRelease files / grrr-0.7.2-cp315-cp315-manylinux_2_26_x86_64.manylinux_2_28_x86_64.whl
| Download URL | grrr-0.7.2-cp315-cp315-manylinux_2_26_x86_64.manylinux_2_28_x86_64.whl |
|---|---|
| Size | 321.1 kB |
| Tags | CPython 3.15 Linux glibc 2.26+ x86-64 Linux glibc 2.28+ x86-64 |
|
SHA-256 checksum How to use checksums |
8a2512a45e04c30be1ca5c5574b1115fd59baddd0b94fcadde18ab3c05b091f2
|
|
BLAKE2b-256 checksum How to use checksums |
6388266343c65738ebd4145501bed2dd6e26d7d44ec0d71d8075bd37cc6e3efa
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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 Nov 13, 2026.
Transparency logRelease files / grrr-0.7.2-cp315-cp315-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl
| Download URL | grrr-0.7.2-cp315-cp315-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl |
|---|---|
| Size | 298.3 kB |
| Tags | CPython 3.15 Linux glibc 2.24+ ARM64 Linux glibc 2.28+ ARM64 |
|
SHA-256 checksum How to use checksums |
8b235cb974558b49008703cd8a364b98fcefdd3b9f80d9990128ab69c1ec5a1d
|
|
BLAKE2b-256 checksum How to use checksums |
fbc3e2a2b3302a1bc72a80a874207eb290e31acdbd5f64692b12ee20648692aa
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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 Nov 13, 2026.
Transparency logRelease files / grrr-0.7.2-cp315-cp315-macosx_15_0_arm64.whl
| Download URL | grrr-0.7.2-cp315-cp315-macosx_15_0_arm64.whl |
|---|---|
| Size | 124.9 kB |
| Tags | CPython 3.15 macOS 15.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
9d82a654233c30613e1b59bf21bb31ea3425a73fccd6e0d8b38c0a213af9672b
|
|
BLAKE2b-256 checksum How to use checksums |
8efd72ba2eac8363d4875c7884269b8ad1c11370e08f15a271f1a4bf8d7118a0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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 Nov 13, 2026.
Transparency logSecurity for grrr 0.7.2
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 4 files in this release have been uploaded with provenance metadata.
Attestation for grrr-0.7.2-cp315-cp315-win_amd64.whl
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 Nov 13, 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.