Skip to main content

A small, typed JSON frame (envelope) for API responses and messages.

Project description

jsonframe

A small, typed JSON “frame” (envelope) for API responses and messages.

The goal is boring reliability: a consistent outer structure that separates transport-level metadata from business payload.

Why

APIs, event handlers, and AI-powered services often reinvent the same response shape: payload, metadata, errors, tracing. jsonframe formalizes this pattern without coupling it to a specific framework or transport.

Install

uv:

uv add jsonframe

pip:

pip install jsonframe

Quick start

from jsonframe import Frame

frame = Frame(
    data={"user_id": 123},
    meta={"trace_id": "abc-123"},
)

frame.to_dict()
# {
#   "data": {"user_id": 123},
#   "meta": {"trace_id": "abc-123"},
#   "error": None
# }

Design principles

  • Explicit separation of payload and metadata
  • Minimal surface area
  • Typed by default
  • Framework-agnostic

Status

jsonframe is in early development (0.0.x). The public API may change before 1.0.

License

MIT

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

jsonframe-0.0.1.tar.gz (2.6 kB view details)

Uploaded Source

Built Distribution

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

jsonframe-0.0.1-py3-none-any.whl (3.3 kB view details)

Uploaded Python 3

File details

Details for the file jsonframe-0.0.1.tar.gz.

File metadata

  • Download URL: jsonframe-0.0.1.tar.gz
  • Upload date:
  • Size: 2.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.18 {"installer":{"name":"uv","version":"0.9.18","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for jsonframe-0.0.1.tar.gz
Algorithm Hash digest
SHA256 496a75151e20ded6cf0d5338901df317024be1ea106b9bacc71b8fb60fb889de
MD5 f3ccec748e1688cdcf8d76b73ed64fb0
BLAKE2b-256 f2e70d7c3a76023d6c3c560d0e4c1483951feac4e054c061f39d8f9c177a0cb7

See more details on using hashes here.

File details

Details for the file jsonframe-0.0.1-py3-none-any.whl.

File metadata

  • Download URL: jsonframe-0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 3.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.18 {"installer":{"name":"uv","version":"0.9.18","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for jsonframe-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 f544753f4bd0c0c56314f9c4bd37389726c8ae6cdf318b2d6173c93d1e6d6db4
MD5 038eaedeef686973ea900ca1b9c2671b
BLAKE2b-256 128a134fc3a04bfc889109a7c133203e4690f0ce368aab99c0ebc7c552aaa497

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