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.0.1
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.0.1.tar.gz | 1.5 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| exceptions_with_structure-1.0.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 3.6 kB
Release files / exceptions_with_structure-1.0.1.tar.gz
| Download URL | exceptions_with_structure-1.0.1.tar.gz |
|---|---|
| Size | 1.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
5ba610fac709c91383ce4b6c95704f7be28dfcf091f7b341c91be8a16a67982f
|
|
BLAKE2b-256 checksum How to use checksums |
3962a137cbf00ccebe2b945e330bce6ab931e70555b97a82467aa5d61b7a5016
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.12.19 {"installer":{"name":"uv","version":"0.12.19","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":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.0.1-py3-none-any.whl
| Download URL | exceptions_with_structure-1.0.1-py3-none-any.whl |
|---|---|
| Size | 2.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
1e63e7caef55e982bcdf55eeb227aad21d1eeb084e3d78d4ac9f7f9c87ce9e5f
|
|
BLAKE2b-256 checksum How to use checksums |
d405fd25abeff1a4e17146f3e0ca242e7890795616e89fe59eb01095ca1e1080
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.12.19 {"installer":{"name":"uv","version":"0.12.19","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|