Introducing The Sweep: OX’s New Live Security Research Series
Register Now
Breaking: The 2026 Vulnpocalypse Hits PHP: Four Critical RCEs, but How Dangerous Are They?
Read the Report
Are you exposed? Connect your apps in minutes.
Scan your apps free

llmparse-py

Latest version: v0.1.2

Overview

Last scanned
29 Nov 2026
Published
29 Nov 2026
PyPI package Publisher: gptfei
0 Stars
0 Forks
2 Versions
259 Downloads
Python Repo language

Scan summary

llmparse-py was last scanned on 29 Nov 2026 at version 0.1.2. Risk score 0 of 100. No malicious behavior was detected.

  • Releases: 2 versions; the latest was published on 29 Nov 2026.
  • Findings: No rules fired in version 0.1.2.
  • Downloads: 259 downloads.

Versions

2 versions published
Versions and the rules that fired in each
VersionPublishedStatus
0.1.2 LATEST 29 Nov 2026 No rules fired
0.1.1 5 Nov 2026 No rules fired

No rules fired in 0.1.2

Findings

Findings for v0.1.2. The score is a capped sum of the weights of the rules that fired — not CVSS, not exploitability, and not a probability. It is not comparable across packages with different scan coverage.

The score describes 0.1.2; other versions have their own rules, not their own score.

README

The publisher’s own README, as collected from the registry.

llmparse

PyPI CI Python License: MIT

Parse the JSON your LLM meant to send.

LLMs promise JSON and deliver markdown fences, apologies, single quotes, trailing commas, Python literals — and, when the token budget runs out, JSON that stops mid-string. llmparse is a zero-dependency Python library that extracts the JSON from raw model output and repairs the damage, so json.loads stops being the most fragile line in your pipeline.

Try it live in your browser — paste broken JSON and watch it get repaired. The demo runs the real llmparse package in your browser via Pyodide; nothing is sent to a server.

from llmparse import parse

parse('Sure! Here you go:\n```json\n{name: "ada", tags: ["x", "y",], ok: True}\n```')
# {'name': 'ada', 'tags': ['x', 'y'], 'ok': True}

parse('{"name": "ada", "tags": ["x", "y"')   # truncated stream
# {'name': 'ada', 'tags': ['x', 'y']}

Install

pip install llmparse-py
pip install git+https://github.com/gptfei/llmparse

Python 3.9+. No third-party dependencies, ever.

What it fixes

Damage in LLM output Example
Markdown fences ```json ... ```
Prose around the JSON Here is the result: {...} hope it helps
Single-quoted strings {'a': 'b'}
Curly quotes “a”: “b” → "a": "b" (content inside strings untouched)
Unquoted keys {name: "ada"}
Python / JS literals True, None, undefined, NaN
Comments {"a": 1} // note, # note
Missing commas {"a": 1 "b": 2}
Trailing commas {"a": [1, 2,]}
Unescaped quotes / newlines in strings "Ada Lo"velace", raw newline in a value
Truncation {"msg": "hello wor → closed and parsed

Prose around the JSON is handled by the extractor (extract() in core.py, built on scanner.py), which finds the first top-level JSON value in the text; the other ten rows map one-to-one to the ten rules in RULES (repair.py).

Brackets and comment markers inside string values are never touched. A nested fragment is never returned in place of the top-level value: if the top-level JSON cannot be recovered, parse() raises LLMParseError instead of handing you a piece of the document.

API

  • parse(text, *, default=...) — return the recovered Python object. Raises LLMParseError when nothing is recoverable, unless default is given. loads is an alias.
  • extract(text) — return the first recoverable JSON substring, or None.
  • repair(text) — return repaired JSON text (for when you need the string, not the object).

Valid JSON is returned untouched: every repair rule is a no-op on input that already parses.

Why not json_repair?

json_repair is the established library in this space (5,143 stars on GitHub, ~49 million PyPI downloads a month) and the right default for most people. It offers schema-guided repair, streaming support, a CLI, a live demo and a docs site — more features than llmparse will ever have.

llmparse exists for the narrower case where you want the smallest possible dependency and the strictest guarantees:

  • Zero dependencies, ever — one small package, Python 3.9+.
  • Strings are sacred: brackets and comment markers inside string values are never touched, and valid JSON is returned untouched — every repair rule is a no-op on input that already parses.
  • Three-layer API: parse (object), extract (first recoverable JSON substring), repair (repaired JSON text) — pick the layer you need instead of one all-or-nothing call.

What llmparse does not do: no schema-guided repair, no streaming parser, no CLI, no docs site. If you need any of those, use json_repair.

Correctness

  • 54 tests (tests/test_parse.py, tests/test_rules.py), run on every push by CI (Python 3.9, 3.11, 3.12 on Linux, macOS and Windows).
  • Every repair rule is a no-op on valid JSON — the suite asserts that directly (test_rules_do_not_change_valid_json).
  • Benchmarked against json_repair, partialjson and pure-json on 194 hand-built damaged cases (seed 20261129): llmparse 100% success, 78.4% exact, 80.9% prefix — vs json_repair 100% / 77.3% / 79.4%. Full write-up, method, limitations and raw per-case results: the benchmark article and benchmark/ in this repo. The numbers above are for 0.1.2; the round-2 fixes shipped in 0.1.2.

Contributing

The repair pipeline is a list of small, independent rules — adding one is the easiest meaningful contribution in open source right now:

  1. Find a way an LLM broke JSON that llmparse does not fix yet.
  2. Write the rule in src/llmparse/repair.py, register it in RULES.
  3. Add a test with the broken input.

See CONTRIBUTING.md and issues labelled good first issue.

中文简介

大模型说好返回 JSON,实际经常带 markdown 围栏、解释文字、单引号、 尾随逗号、Python 的 True/None,甚至输出到一半被截断。llmparse 是一个零依赖的 Python 库:从原始输出里提取 JSON、逐项修复这些损坏、 再解析成 Python 对象。合法 JSON 不会被改动。

See also

  • devsnap — snapshot and diff your development environment; end "works on my machine" debugging.

License

MIT — see LICENSE.

OX Radar and Response Center

Find threats in your stack.

OX Radar can check high-priority threats, like critical package CVEs, against your context.

Each incident is marked Detected or Not Detected with a remediation plan and proof all tracked in the Response Center.

Where it’s listed

The probe returned only these fields for this server — auth requirement, protocol and tool list weren’t observed, so they’re not shown (never guessed).

  • pypi-releases llmparse-py

References

The publisher’s own links, as the registry reports them. These are not sources for the assessment on this page.

Powered by Read the latest findings

Scan your whole stack

Group 1261154050 1
Group 1261154050
 

From OX Research Newsroom

CVE

Java4Shell (CVE-2026-114938): Easy to Crash, Hard to Exploit — Less Than 0.12% of JVMs Estimated at Risk of RCE

Microsoft's Official agent framework Hijacked
AI & VibeSec

BREAKING: Hijacked Releases of Microsoft’s Official agent-framework Steals Azure and CI Credentials

Cry2Wolf: How to Tell a Real Bug from a Nothingburger
AI & VibeSec

Cry2Wolf: Not Every Branded Bug Deserves a Fire Drill

Frame 2085668439 (1)
Group 1261154229