Validate, repair, retry LLM structured output (JSON/YAML/TOML/python-literal)
Project description
arcanada-output-guard
Python sibling of @arcanada/output-guard. Mirror surface, shared golden fixtures, byte-equal parity gate.
See repository root README for full design.
Install
pip install arcanada-output-guard
# or
uv add arcanada-output-guard
Status
v0.1.0 — 15 strategies, two-pass orchestrator, pydantic + JSON-Schema adapters, guarded_generate async wrapper, batch + class API, 253 tests (including parity gate against fixtures-shared and hypothesis property tests).
Quick start
from output_guard import OutputGuard, pydantic_adapter, repair
from pydantic import BaseModel
class User(BaseModel):
name: str
age: int
# Functional API
result = repair('{"name": "Alice", "age": 30,}', "json", pydantic_adapter(User))
print(result.data) # User(name='Alice', age=30)
print(result.pass_) # "A"
print(result.strategies_applied) # ["fix-commas"]
# Stateful API
guard = OutputGuard(schema=User)
result = guard.repair('```json\n{"name": "Bob", "age": 25}\n```')
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 arcanada_output_guard-0.1.0.tar.gz.
File metadata
- Download URL: arcanada_output_guard-0.1.0.tar.gz
- Upload date:
- Size: 47.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
51b6edcc3229dee2002a5dcde0bac393313060d1294edda68e72699e1d636adf
|
|
| MD5 |
0ccb8809d27f8d73b4a4bb3f318e34a5
|
|
| BLAKE2b-256 |
a71db7aa83f08a511e5e319bda740fc5e63e4ef68b8b4cf886b144bc42280d31
|
Provenance
The following attestation bundles were made for arcanada_output_guard-0.1.0.tar.gz:
Publisher:
publish-pypi.yml on Arcanada-one/output-guard
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
arcanada_output_guard-0.1.0.tar.gz -
Subject digest:
51b6edcc3229dee2002a5dcde0bac393313060d1294edda68e72699e1d636adf - Sigstore transparency entry: 1519494953
- Sigstore integration time:
-
Permalink:
Arcanada-one/output-guard@50403efc18cd5e5283f3ee18570853a860acfa67 -
Branch / Tag:
refs/tags/py-v0.1.0 - Owner: https://github.com/Arcanada-one
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-pypi.yml@50403efc18cd5e5283f3ee18570853a860acfa67 -
Trigger Event:
push
-
Statement type:
File details
Details for the file arcanada_output_guard-0.1.0-py3-none-any.whl.
File metadata
- Download URL: arcanada_output_guard-0.1.0-py3-none-any.whl
- Upload date:
- Size: 24.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
27a12a2cd8de91df774af64165a702108840408ba24487cef765f833f7b8a57b
|
|
| MD5 |
f95f89a0ee87098259c47f7e4a52e8bc
|
|
| BLAKE2b-256 |
bec20e3acbcf669316ff0e69ff9634c40b9f3a9d9207c3cd578f7121868b8a42
|
Provenance
The following attestation bundles were made for arcanada_output_guard-0.1.0-py3-none-any.whl:
Publisher:
publish-pypi.yml on Arcanada-one/output-guard
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
arcanada_output_guard-0.1.0-py3-none-any.whl -
Subject digest:
27a12a2cd8de91df774af64165a702108840408ba24487cef765f833f7b8a57b - Sigstore transparency entry: 1519495005
- Sigstore integration time:
-
Permalink:
Arcanada-one/output-guard@50403efc18cd5e5283f3ee18570853a860acfa67 -
Branch / Tag:
refs/tags/py-v0.1.0 - Owner: https://github.com/Arcanada-one
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-pypi.yml@50403efc18cd5e5283f3ee18570853a860acfa67 -
Trigger Event:
push
-
Statement type: