Metadata-Version: 2.3
Name: jsonframe
Version: 0.0.1
Summary: A small, typed JSON frame (envelope) for API responses and messages.
Keywords: json,api,envelope,frame,schema,pydantic
Author: Rinat Advaer
Author-email: Rinat Advaer <rinat.advaer@gmail.com>
License: MIT License
         
         Copyright (c) 2026 Rinat Advaer
         
         Permission is hereby granted, free of charge, to any person obtaining a copy
         of this software and associated documentation files (the "Software"), to deal
         in the Software without restriction, including without limitation the rights
         to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
         copies of the Software, and to permit persons to whom the Software is
         furnished to do so, subject to the following conditions:
         
         The above copyright notice and this permission notice shall be included in all
         copies or substantial portions of the Software.
         
         THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
         IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
         FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
         AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
         LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
         OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
         SOFTWARE.
Classifier: Development Status :: 2 - Pre-Alpha
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Typing :: Typed
Requires-Python: >=3.10
Project-URL: Homepage, https://github.com/advaer/jsonframe
Project-URL: Issues, https://github.com/advaer/jsonframe/issues
Project-URL: Repository, https://github.com/advaer/jsonframe
Description-Content-Type: text/markdown

# 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
