Skip to main content

Shared utility library for the terok-* sibling packages

Project description

terok-util

terok-util

PyPI License: Apache-2.0 REUSE status

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.2.0.tar.gz (24.5 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.2.0-py3-none-any.whl (31.4 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: terok_util-0.2.0.tar.gz
  • Upload date:
  • Size: 24.5 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.2.0.tar.gz
Algorithm Hash digest
SHA256 8fc285c4fdcfc6a2c3aeb04236f85c49093cb60c8602fe0e43d1e8b9a6f3e7cd
MD5 41a2dafceb974a88229690dba7bc8355
BLAKE2b-256 1ae81571965c07ed47c18bfafea73f7245975515cd44d16f9b52a535d7704a0d

See more details on using hashes here.

Provenance

The following attestation bundles were made for terok_util-0.2.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.2.0-py3-none-any.whl.

File metadata

  • Download URL: terok_util-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 31.4 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.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 74f047643962ff64e62e354958fe37caa91f04dc811eb61f6af41220f8311ef8
MD5 8cfb0af506b770aa46b746b104f68847
BLAKE2b-256 cc3278c7cf2b9e3aed716e0c31799608836325c55cb05b4c114025e028fbc8a2

See more details on using hashes here.

Provenance

The following attestation bundles were made for terok_util-0.2.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