Skip to main content

Shared utility library for the terok-* sibling packages

Project description

terok-util

Shared utility library for the terok-* sibling packages.

terok-util sits at the bottom of the terok dependency chain: every sibling package depends on it, and it depends on nothing else in the ecosystem. It collects the small set of cross-cutting bits that would otherwise be duplicated (or quietly diverge) across terok-shield, terok-clearance, terok-sandbox, terok-executor, and terok.

What's in the box

Module Use case
cli_types CommandDef / ArgDef / CommandTree — argparse-driven CLI registry types used by every sibling that exposes a CLI tree.
fs ensure_dir, ensure_dir_writable, write_sensitive_file (atomic O_CREAT | O_EXCL 0o600 writer).
paths namespace_state_dir, namespace_config_dir, namespace_runtime_dir — XDG-aware path resolution for a per-namespace deployment.
config_stack ConfigStack + deep_merge — layered round-trip YAML config merge engine.
security sanitize_tty — strips C0 / C1 / ANSI sequences from untrusted strings before rendering to the operator's terminal (CWE-150 mitigation).
podman podman_userns_args — rootless --userns=keep-id:uid=1000,gid=1000 builder.

Installation

pip install terok-util

The package is published as a Python wheel; siblings pin to a specific GitHub-release wheel URL via pyproject.toml.

Convention

The rule for what belongs here: if two or more terok-* packages need it, it lives in terok-util. Single-package helpers stay in the package that owns them. The __all__ declaration in src/terok_util/__init__.py is the contract — symbols listed there are stable across minor releases.

License

Apache-2.0. See LICENSE.

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

terok_util-0.1.0.tar.gz (21.9 kB view details)

Uploaded Source

Built Distribution

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

terok_util-0.1.0-py3-none-any.whl (28.0 kB view details)

Uploaded Python 3

File details

Details for the file terok_util-0.1.0.tar.gz.

File metadata

  • Download URL: terok_util-0.1.0.tar.gz
  • Upload date:
  • Size: 21.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.13

File hashes

Hashes for terok_util-0.1.0.tar.gz
Algorithm Hash digest
SHA256 27bcb70b41fd86bc54b529120a7c53ca8bc4bf7b5d332478e80035b746526199
MD5 0a390380727b645925570c24138aba09
BLAKE2b-256 3b57d17446bcaef3ca57ce618ea2c5f8d002a2a36af6de2f69b3d100cbf9f248

See more details on using hashes here.

Provenance

The following attestation bundles were made for terok_util-0.1.0.tar.gz:

Publisher: release.yml on terok-ai/terok-util

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file terok_util-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: terok_util-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 28.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.13

File hashes

Hashes for terok_util-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 2e1dfa321bb1a574460a07caf578ed8020bb6aab01ce44158ed41528bf1ae577
MD5 0d65a479af024959c4343575699402d6
BLAKE2b-256 b964be2cbf1784f7314640b9e5c9b38f5690fc57af19f52b8b280006791e26aa

See more details on using hashes here.

Provenance

The following attestation bundles were made for terok_util-0.1.0-py3-none-any.whl:

Publisher: release.yml on terok-ai/terok-util

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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