Skip to main content

geniAi-json-toolkit 🚀

A robust, zero-dependency JSON parser built specifically for LLM streaming, Python-isms, VLM spatial coordinates, and tool calls.

License: MIT

Handling JSON from Large Language Models (LLMs) and Vision-Language Models (VLMs) is notoriously painful. Models often hallucinate Python syntax, inject conversational Markdown, or stream incomplete objects that crash standard parsing libraries.

geniAi-json-toolkit is a drop-in toolkit that seamlessly repairs and normalizes unpredictable AI data into strict, usable Python objects in real-time.


✨ Features

  • ⚡ Streaming & Partial Parsing: Auto-closes quotes, brackets, and dangling colons to parse incomplete JSON strings mid-stream.
  • 🗣️ Yapping & Markdown Filter: Automatically strips conversational filler and markdown code blocks (e.g., ```json).
  • 🐍 Python-ism Auto-Repair: Converts hallucinatory single quotes ('), True, False, and None into valid JSON equivalents.
  • 👁️ Vision Coordinate Normalization: Auto-detects bounding boxes (0-1000 scales) from VLM outputs and rescales them to your physical camera resolution.
  • 🛠️ Unified Tool Calling: Standardizes varying function-call formats (OpenAI, Anthropic) into a single predictable structure.
  • 🛡️ Pydantic Safe-Cast: Streams partial data directly into Pydantic models without throwing AttributeError for missing fields.

📦 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

geniai_json_toolkit-0.1.0.tar.gz (7.9 kB view details)

Uploaded Source

Built Distribution

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

geniai_json_toolkit-0.1.0-py3-none-any.whl (6.3 kB view details)

Uploaded Python 3

File details

Details for the file geniai_json_toolkit-0.1.0.tar.gz.

File metadata

  • Download URL: geniai_json_toolkit-0.1.0.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

Hashes for geniai_json_toolkit-0.1.0.tar.gz
Algorithm Hash digest
SHA256 7f40139ab77db79054e6a03b432bd0f3d9baa1bb7746f47fbf7dedebdec70119
MD5 976b53344a38a5c90d5c16d37d5e7a90
BLAKE2b-256 5293f62439c547352335a881689b855288b21e0c2c1385bafd1cfbdc8b93a7e9

See more details on using hashes here.

File details

Details for the file geniai_json_toolkit-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for geniai_json_toolkit-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 8a89482f3305c3576c00c31bd6c2151998d63e2c9d8b7ea5474030c76b2bf5d8
MD5 d147225c9701c65142651f16df0e6779
BLAKE2b-256 ae1ba319df68f0654d7d962fbb525e72df2e03d6b052ef419158a01acdd92d9a

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 Sentry Error logging StatusPage Status page