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
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 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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
496a75151e20ded6cf0d5338901df317024be1ea106b9bacc71b8fb60fb889de
|
|
| MD5 |
f3ccec748e1688cdcf8d76b73ed64fb0
|
|
| BLAKE2b-256 |
f2e70d7c3a76023d6c3c560d0e4c1483951feac4e054c061f39d8f9c177a0cb7
|
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f544753f4bd0c0c56314f9c4bd37389726c8ae6cdf318b2d6173c93d1e6d6db4
|
|
| MD5 |
038eaedeef686973ea900ca1b9c2671b
|
|
| BLAKE2b-256 |
128a134fc3a04bfc889109a7c133203e4690f0ce368aab99c0ebc7c552aaa497
|