Skip to main content

exceptions_with_structure

A small Python package providing StructuredException, an exception with a machine-readable error code and an ISO-8601 creation timestamp.

Installation

pip install exceptions_with_structure

Usage

from py import StructuredException

try:
    raise StructuredException("File not found", "IO_ERR_404")
except StructuredException as error:
    print(error)
    print(error.error_code)
    print(error.timestamp)

StructuredException accepts a human-readable message and an error_code. The timestamp field is generated when the exception is created.

Development

From this directory, install the package in editable mode:

pip install -e .

Build distributable archives with:

python -m build

The package requires Python 3.8 or newer and is licensed under EUPL-1.2.

Metadata

Release files for exceptions_with_structure 1.2.0.post1

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

Source distribution (sdist)

Source distribution for exceptions_with_structure 1.2.0.post1
File Size Uploaded
exceptions_with_structure-1.2.0.post1.tar.gz 1.9 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for exceptions_with_structure 1.2.0.post1
File Interpreter ABI Platform
exceptions_with_structure-1.2.0.post1-py3-none-any.whl Python 3 none any Details

Total release size: 4.5 kB

Release files / exceptions_with_structure-1.2.0.post1.tar.gz

Download URL exceptions_with_structure-1.2.0.post1.tar.gz
Size 1.9 kB
Tags Source
SHA-256 checksum
How to use checksums
245cc8730a7c5eb4a3019b6da01fb911f241fe0786d65e269bd065b8f6d31b80
BLAKE2b-256 checksum
How to use checksums
077811ca2d688632dcff9fc944c59ef51cf5b5ecf831d757290dcab8a1a53714
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.13.1 {"installer":{"name":"uv","version":"0.13.1","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Debian GNU/Linux","version":"13","id":"trixie","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Release files / exceptions_with_structure-1.2.0.post1-py3-none-any.whl

Download URL exceptions_with_structure-1.2.0.post1-py3-none-any.whl
Size 2.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
2d756e419a638b2618ef596d8fdc0a8995a39bf6f3b02ae58416e446bf6a9797
BLAKE2b-256 checksum
How to use checksums
6d2e62fdd85471312ed48b8096ad9fc40652b48447068d21a2ace72ae3d10e0c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.13.1 {"installer":{"name":"uv","version":"0.13.1","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Debian GNU/Linux","version":"13","id":"trixie","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Release history Release notifications | RSS feed

1.4.0

2 release files

1.3.0

2 release files

This release

1.2.0.post1 This release

2 release files

1.2.0

2 release files

1.1.0

2 release files

1.0.2

2 release files

1.0.1

2 release files

1.0.0

2 release files

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