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.3.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| exceptions_with_structure-1.3.0.tar.gz | 1.9 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| exceptions_with_structure-1.3.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 4.5 kB
Release files / exceptions_with_structure-1.3.0.tar.gz
| Download URL | exceptions_with_structure-1.3.0.tar.gz |
|---|---|
| Size | 1.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
322877f6ced8713fe6fe10d19ebf2d7031cb837491c10ae374e0b3ef9746cc41
|
|
BLAKE2b-256 checksum How to use checksums |
44fbbe2b8130e4f73113ad7d1800dff43b5f39cddb9871b5f15f4e582275d8d8
|
| 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.3.0-py3-none-any.whl
| Download URL | exceptions_with_structure-1.3.0-py3-none-any.whl |
|---|---|
| Size | 2.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
5577a00c92ab67543dbfe0dc9fcc03f7e052fad03221b81fb438089d6e6df390
|
|
BLAKE2b-256 checksum How to use checksums |
cac12e40110759b5a1ee56324d9b38ca2bde935d8e7c15d556d6f8b8a3cd73bb
|
| 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}
|