Skip to main content

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


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.1.tar.gz (2.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

rfc9290-0.1.1-py3-none-any.whl (3.7 kB view details)

Uploaded Python 3

File details

Details for the file rfc9290-0.1.1.tar.gz.

File metadata

  • Download URL: rfc9290-0.1.1.tar.gz
  • Upload date:
  • Size: 2.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.4

File hashes

Hashes for rfc9290-0.1.1.tar.gz
Algorithm Hash digest
SHA256 95f4e26fe73159f7475db2366edb824a7072ad61a92a9bb8c58c2f45cdf8e138
MD5 ba0e14a415e1c0c087ff8d4bf7758fb6
BLAKE2b-256 832dec4f57bcc04a56623bfe804bc1feabeab0b27f38b7f832c9ae0cccebdf56

See more details on using hashes here.

File details

Details for the file rfc9290-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: rfc9290-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 3.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.4

File hashes

Hashes for rfc9290-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 0880ad63716ca337997d77fb70e22762aa893cd4fadd00e98ffb31051e920566
MD5 22dbdb170a3ec635bbdd10893e8eeb84
BLAKE2b-256 442c811ff744e2c37fdcdf0963e2ae0bf8803318e218e7d666d6b754b1a84641

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page