Skip to main content

oaknut-exception

PyPI version CI Python versions License: MIT

Categorised exceptions and a CLI error-reporting boundary for the oaknut-* family of packages.

The package defines a small exception hierarchy that every other oaknut-* package's domain errors slot into:

  • OaknutException — root of the hierarchy. Carries an exit_code property derived from the BSD sysexits.h set (via the exit-codes package).
  • DataError — the operation failed because of the data it was given (a user-supplied path, a corrupted on-disc structure, an unsupported filetype). No traceback at the CLI boundary.
  • ConfigurationError — the operation failed because of a runtime environment / configuration issue. No traceback at the CLI boundary.
  • InternalError — the operation failed because something went wrong inside the library. Traceback retained at the CLI boundary so the report-an-issue path is obvious.

Plus a single error-handling boundary helper:

  • handled_errors — a context manager (also usable as a decorator) that catches DataError and ConfigurationError, prints them via a caller-supplied printer, and exits with the most appropriate ExitCode. InternalError and unexpected exceptions propagate so their tracebacks reach the user. KeyboardInterrupt exits with the conventional 128 + SIGINT status.

This package is what every oaknut-disc-like CLI uses to map library errors onto stable exit codes without dropping into try/except in every command.

See the oaknut documentation for the full API reference.

Part of the oaknut monorepo.

Installation

uv add oaknut-exception    # or: pip install oaknut-exception

License

MIT — see LICENSE.

Metadata

Release files for oaknut-exception 13.6.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for oaknut-exception 13.6.1
File Size Uploaded Provenance Actions
oaknut_exception-13.6.1.tar.gz 10.0 kB Without provenance Details for oaknut_exception-13.6.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for oaknut-exception 13.6.1
File Interpreter ABI Platform Actions
oaknut_exception-13.6.1-py3-none-any.whl Python 3 none any Details for oaknut_exception-13.6.1-py3-none-any.whl

Total release size: 17.3 kB

Release files / oaknut_exception-13.6.1.tar.gz

Download URL oaknut_exception-13.6.1.tar.gz
Size 10.0 kB
Tags Source
SHA-256 checksum
How to use checksums
a38d5b54c37bb368517bc73d6f9d8aa520d73f4261be7edd8cf59be66e491d08
BLAKE2b-256 checksum
How to use checksums
53f6c2cae2aa7202b79f142aed2620c0d7e8d850608be2f2f129b4dd31f3dc24
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.13.7 {"installer":{"name":"uv","version":"0.13.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / oaknut_exception-13.6.1-py3-none-any.whl

Download URL oaknut_exception-13.6.1-py3-none-any.whl
Size 7.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
ef979e5c75d5c5288e543fc816e228320dd560cd5db62deab6fe0cbdb3edacbe
BLAKE2b-256 checksum
How to use checksums
f422ce8237f231c3db271a85edc5cad701d438e5fc423ac77e2c47b78bc7f67d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.13.7 {"installer":{"name":"uv","version":"0.13.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Security for oaknut-exception 13.6.1

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.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A 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.

Release history Release notifications | RSS feed

This release

13.6.1 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page