contractgate 0.2.0__tar.gz → 0.3.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {contractgate-0.2.0 → contractgate-0.3.0}/.gitignore +2 -0
- contractgate-0.3.0/CHANGELOG.md +35 -0
- {contractgate-0.2.0 → contractgate-0.3.0}/LICENSE +1 -1
- {contractgate-0.2.0 → contractgate-0.3.0}/PKG-INFO +4 -4
- {contractgate-0.2.0 → contractgate-0.3.0}/README.md +1 -1
- {contractgate-0.2.0 → contractgate-0.3.0}/pyproject.toml +3 -3
- {contractgate-0.2.0 → contractgate-0.3.0}/src/contractgate/__init__.py +2 -2
- contractgate-0.3.0/src/contractgate/_version.py +1 -0
- {contractgate-0.2.0 → contractgate-0.3.0}/src/contractgate/async_client.py +1 -1
- {contractgate-0.2.0 → contractgate-0.3.0}/src/contractgate/client.py +1 -1
- {contractgate-0.2.0 → contractgate-0.3.0}/src/contractgate/exceptions.py +1 -1
- contractgate-0.3.0/src/contractgate/llm.py +675 -0
- contractgate-0.3.0/tests/test_llm_gate.py +697 -0
- contractgate-0.2.0/CHANGELOG.md +0 -14
- contractgate-0.2.0/src/contractgate/_version.py +0 -1
- contractgate-0.2.0/tests/__init__.py +0 -0
- {contractgate-0.2.0 → contractgate-0.3.0}/src/contractgate/_transport.py +0 -0
- {contractgate-0.2.0 → contractgate-0.3.0}/src/contractgate/contract.py +0 -0
- {contractgate-0.2.0 → contractgate-0.3.0}/src/contractgate/models.py +0 -0
- {contractgate-0.2.0 → contractgate-0.3.0}/src/contractgate/validator.py +0 -0
- {contractgate-0.2.0/contractgate → contractgate-0.3.0/tests}/__init__.py +0 -0
- {contractgate-0.2.0 → contractgate-0.3.0}/tests/conftest.py +0 -0
- {contractgate-0.2.0 → contractgate-0.3.0}/tests/fixtures/contracts/compliance_mode.yaml +0 -0
- {contractgate-0.2.0 → contractgate-0.3.0}/tests/fixtures/contracts/user_events.yaml +0 -0
- {contractgate-0.2.0 → contractgate-0.3.0}/tests/fixtures/contracts/with_transform.yaml +0 -0
- {contractgate-0.2.0 → contractgate-0.3.0}/tests/test_client_async.py +0 -0
- {contractgate-0.2.0 → contractgate-0.3.0}/tests/test_client_sync.py +0 -0
- {contractgate-0.2.0 → contractgate-0.3.0}/tests/test_contract_parse.py +0 -0
- {contractgate-0.2.0 → contractgate-0.3.0}/tests/test_validator.py +0 -0
|
@@ -38,6 +38,8 @@ dashboard/public/llms.txt
|
|
|
38
38
|
dashboard/public/llm-integration.md
|
|
39
39
|
dashboard/public/llms-full.txt
|
|
40
40
|
dashboard/public/mcp-reference.md
|
|
41
|
+
dashboard/public/llm-output-validation.md
|
|
42
|
+
dashboard/public/llm-sdk-reference.md
|
|
41
43
|
# Added by code-review-graph
|
|
42
44
|
.code-review-graph/
|
|
43
45
|
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes to the `contractgate` Python SDK.
|
|
4
|
+
|
|
5
|
+
## 0.3.0 — 2026-10-11
|
|
6
|
+
|
|
7
|
+
RFC-094. Adds the `contractgate.llm` submodule for LLM output
|
|
8
|
+
validation. No breaking changes.
|
|
9
|
+
|
|
10
|
+
- New: `contractgate.llm.LLMGate` and `contractgate.llm.AsyncLLMGate`
|
|
11
|
+
wrap `/egress/{contract_id}` with response-shape extraction and a
|
|
12
|
+
bounded auto-repair re-prompt loop. Caller binds their own LLM
|
|
13
|
+
client (OpenAI / Anthropic / Ollama / vLLM) via `llm=...`; the SDK
|
|
14
|
+
takes no runtime dependency on provider SDKs.
|
|
15
|
+
- New: `contractgate.llm.extract_json(response)` handles OpenAI chat
|
|
16
|
+
JSON mode, OpenAI tool_calls, OpenAI Responses `output_parsed`,
|
|
17
|
+
Anthropic `tool_use` and text-block JSON, raw strings (with
|
|
18
|
+
markdown-fence tolerance), and dict passthrough.
|
|
19
|
+
- New: `contractgate.llm.LLMResponseError` for streaming responses
|
|
20
|
+
(rejected in v1) and unparseable shapes.
|
|
21
|
+
- New: `LLMGate.mask_prompt(payload, prompt_contract_id=...)` returns
|
|
22
|
+
the RFC-004-transformed form of a prompt dict via
|
|
23
|
+
`ingest(dry_run=True)`.
|
|
24
|
+
- Sister alias package `aischemagate` ships at the same cut.
|
|
25
|
+
|
|
26
|
+
## 0.1.0 — 2026-04-28
|
|
27
|
+
|
|
28
|
+
Initial scaffold per RFC-005.
|
|
29
|
+
|
|
30
|
+
- `Client` (sync) + `AsyncClient` (async) over httpx.
|
|
31
|
+
- `ingest`, `audit`, `get_contract`, `get_version`, `playground`.
|
|
32
|
+
- Local validator (`Contract.from_yaml`, `CompiledContract.validate`).
|
|
33
|
+
- Strict parity with Rust validator: same `ViolationKind`, same field
|
|
34
|
+
paths, same message text. Locked via shared fixture corpus.
|
|
35
|
+
- No PII transforms in the local validator (RFC-004 invariant).
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
Metadata-Version: 2.5
|
|
2
2
|
Name: contractgate
|
|
3
|
-
Version: 0.
|
|
4
|
-
Summary: Python SDK for
|
|
3
|
+
Version: 0.3.0
|
|
4
|
+
Summary: Python SDK for DataContractGate — high-performance semantic contract enforcement gateway.
|
|
5
5
|
Project-URL: Homepage, https://datacontractgate.com
|
|
6
6
|
Project-URL: Source, https://github.com/nightmoose/contractgate
|
|
7
|
-
Author:
|
|
7
|
+
Author: NightMoose, Inc.
|
|
8
8
|
License: MIT
|
|
9
9
|
License-File: LICENSE
|
|
10
10
|
Keywords: contract,data-quality,ingestion,schema,validation
|
|
@@ -30,7 +30,7 @@ Description-Content-Type: text/markdown
|
|
|
30
30
|
|
|
31
31
|
# contractgate (Python SDK)
|
|
32
32
|
|
|
33
|
-
First-party Python SDK for [
|
|
33
|
+
First-party Python SDK for [DataContractGate][gw] — a high-performance
|
|
34
34
|
semantic contract enforcement gateway (Patent Pending).
|
|
35
35
|
|
|
36
36
|
[gw]: https://datacontractgate.com
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# contractgate (Python SDK)
|
|
2
2
|
|
|
3
|
-
First-party Python SDK for [
|
|
3
|
+
First-party Python SDK for [DataContractGate][gw] — a high-performance
|
|
4
4
|
semantic contract enforcement gateway (Patent Pending).
|
|
5
5
|
|
|
6
6
|
[gw]: https://datacontractgate.com
|
|
@@ -4,12 +4,12 @@ build-backend = "hatchling.build"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "contractgate"
|
|
7
|
-
version = "0.
|
|
8
|
-
description = "Python SDK for
|
|
7
|
+
version = "0.3.0"
|
|
8
|
+
description = "Python SDK for DataContractGate — high-performance semantic contract enforcement gateway."
|
|
9
9
|
readme = "README.md"
|
|
10
10
|
requires-python = ">=3.9"
|
|
11
11
|
license = { text = "MIT" }
|
|
12
|
-
authors = [{ name = "
|
|
12
|
+
authors = [{ name = "NightMoose, Inc." }]
|
|
13
13
|
keywords = ["contract", "validation", "data-quality", "ingestion", "schema"]
|
|
14
14
|
classifiers = [
|
|
15
15
|
"Development Status :: 3 - Alpha",
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
__version__ = "0.3.0"
|