geniAi-json-toolkit 🚀
Hey everyone! If you build AI apps, you probably know the pain of getting valid JSON out of an LLM. They "yap" before handing over the data, they hallucinate Python syntax (like using True instead of true), and if you try to parse a live stream, your app crashes because the JSON is incomplete.
I built geniAi-json-toolkit to fix this. It’s a robust, zero-dependency toolkit that takes the messy, broken, or partial JSON from Large Language Models (LLMs) and Vision-Language Models (VLMs) and silently repairs it into clean Python objects in real-time.
✨ Why use this?
- ⚡ Streaming & Partial Parsing: It auto-closes quotes, brackets, and dangling colons so you can parse and render incomplete JSON strings mid-stream.
- 🗣️ Yapping Filter: Automatically strips out conversational filler and markdown blocks (e.g.,
```json). - 🐍 Python-ism Auto-Repair: LLMs love to output single quotes (
'),True,False, andNone. This converts them back into valid JSON equivalents. - 👁️ Vision Coordinate Normalization: Auto-detects bounding boxes (often output on a 0-1000 scale by VLMs) and rescales them to your actual camera resolution.
- 🛠️ Unified Tool Calling: Standardizes the drastically different function-call formats between OpenAI and Anthropic into a single predictable structure.
- 🛡️ Pydantic Safe-Cast: Lets you push partial, streamed data directly into strict Pydantic models without throwing missing-field errors.
📦 Installation
pip install geniAi-json-toolkit
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 geniai_json_toolkit-0.1.1.tar.gz.
File metadata
- Download URL: geniai_json_toolkit-0.1.1.tar.gz
- Upload date:
- Size: 7.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/7.0.0 CPython/3.12.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0c3b33c4dd3343e76ff61f6c79875d8964461e9f40928ea28c04be57693dba49
|
|
| MD5 |
ff0131510d26586adb354d6777748804
|
|
| BLAKE2b-256 |
996f363831bb55d0ae5e74229195109d73009b1bb3bf1ad1ce38f5e19d3cc797
|
File details
Details for the file geniai_json_toolkit-0.1.1-py3-none-any.whl.
File metadata
- Download URL: geniai_json_toolkit-0.1.1-py3-none-any.whl
- Upload date:
- Size: 6.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/7.0.0 CPython/3.12.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
41b461b0607d5f1f550327861e4fd7c5c5cdfca62d4e01db4db8d8484c05db2f
|
|
| MD5 |
0b3a0f7e94b94fd81a50e1e10fa78ee4
|
|
| BLAKE2b-256 |
ba9c485e92d80957ae17e8a4e449ffc130f4cb2cdadbb4a10856ee834c4bf18e
|