Simple encoder/decoder for RFC 9290 Concise Problem Details
Project description
rfc9290
Simple encoder/decoder for RFC 9290 Concise Problem Details
Usage
from rfc9290 import encode_problem_details, decode_problem_details
# Build Problem Details as a dictionary
problem_details = {
"type": "https://example.com/error/validation-error",
"title": "Validation Error",
"detail": "Missing required field 'username'.",
"instance": "/requests/12345",
"response-code": 400
}
# Encode to CBOR
cbor_encoded = encode_problem_details(problem_details)
print("CBOR Encoded:", cbor_encoded)
# Decode back to dictionary
decoded_details = decode_problem_details(cbor_encoded)
print("Decoded Details:", decoded_details)
Contributing
If you like CBOR/COSE please join the party and contribute code/tools!
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
rfc9290-0.1.0.tar.gz
(2.2 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file rfc9290-0.1.0.tar.gz.
File metadata
- Download URL: rfc9290-0.1.0.tar.gz
- Upload date:
- Size: 2.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3027a306ee064ffd28f6de213e8c7589fab9f27bfb632493256aee18816506ab
|
|
| MD5 |
bd1799da15f1325676c720b7a56654dd
|
|
| BLAKE2b-256 |
3d2ae9c1b8f55e4600320791be2682deae25a7b706c87f608eba27d1137f0985
|
File details
Details for the file rfc9290-0.1.0-py3-none-any.whl.
File metadata
- Download URL: rfc9290-0.1.0-py3-none-any.whl
- Upload date:
- Size: 2.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
80bd20528408a328d13c33a5ce78d70d3fcfbee1630f01c7369cf4737d45abd3
|
|
| MD5 |
ccd3ef0950f6dd6dfd7d08ba7dd7c54b
|
|
| BLAKE2b-256 |
fe1be7e238b74982e63105ffd0625650f89d89fc9dc4c2a9875a7267892b0732
|