Client SDK for dmstfy-extract: schema-first document extraction with generated Pydantic types
Project description
demystify-extract
Python client SDK for dmstfy-extract — schema-first document extraction with generated Pydantic v2 models for the starter schema library (invoice, bank statement, resume, contract, email).
Not yet published to PyPI. Until then, use it via the monorepo (see the module README's "Use as your own repo" section) or an editable/path install.
pip install demystify-extract # once published — httpx + pydantic v2
What you get
- Generated Pydantic models for each library schema version (
InvoiceV1, …) that validate the API result shape, including the{raw, value}normalization envelope. - Envelope accessors —
field_value/field_raw/is_normalized_field.
The normalization envelope
Fields whose schema carries x-demystify-normalize: date|amount|name come back
as {"raw": ..., "value": ...}. raw is the text exactly as printed; value
is canonical (ISO 8601 date / integer minor units / cleaned name). Amount
envelopes add currency (ISO 4217 or None) and exponent (minor-unit scale —
INR/USD 2, JPY 0, BHD 3), so ¥1234 →
{"raw": "¥1234", "value": 1234, "currency": "JPY", "exponent": 0}.
from demystify_extract.generated import InvoiceV1
from demystify_extract import field_value
invoice = InvoiceV1.model_validate(result["data"])
field_value(invoice.total_amount) # integer minor units
Results carry a top-level result_format: "normalized@1" version tag.
See the module README for the full API, offline quickstart, and architecture.
License
MIT
Project details
Release history Release notifications | RSS feed
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 demystify_extract-0.2.0.tar.gz.
File metadata
- Download URL: demystify_extract-0.2.0.tar.gz
- Upload date:
- Size: 40.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
34b2057ac7748781c615a499bdcd2fad5dd0d983b365251f51a5e71e8100a8af
|
|
| MD5 |
5af2635e189f34b61cc2aa46de3e0101
|
|
| BLAKE2b-256 |
eb17b9896bbd2ae5752b0131ac715131853bc539e7f7d4f91bfb736fba534eb4
|
Provenance
The following attestation bundles were made for demystify_extract-0.2.0.tar.gz:
Publisher:
publish-pypi.yml on demystify-systems/ai-services-tools
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
demystify_extract-0.2.0.tar.gz -
Subject digest:
34b2057ac7748781c615a499bdcd2fad5dd0d983b365251f51a5e71e8100a8af - Sigstore transparency entry: 2171521416
- Sigstore integration time:
-
Permalink:
demystify-systems/ai-services-tools@4dc06acee6676d683f961e82b0fd16cd7d433d27 -
Branch / Tag:
refs/heads/claude/six-services-modular-build-h0faac - Owner: https://github.com/demystify-systems
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-pypi.yml@4dc06acee6676d683f961e82b0fd16cd7d433d27 -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file demystify_extract-0.2.0-py3-none-any.whl.
File metadata
- Download URL: demystify_extract-0.2.0-py3-none-any.whl
- Upload date:
- Size: 13.2 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 |
9f49a1eb82e52d4f419580f8bb07eeb12a719cdcaf5df0f03d7d8cb35976be50
|
|
| MD5 |
4adbdaf3e9de79dba1d3db2d0fbf3180
|
|
| BLAKE2b-256 |
ec40563bc3db3edb3b4db2dac93e70705bc1ff99f38ce07f236a4fefee10f958
|
Provenance
The following attestation bundles were made for demystify_extract-0.2.0-py3-none-any.whl:
Publisher:
publish-pypi.yml on demystify-systems/ai-services-tools
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
demystify_extract-0.2.0-py3-none-any.whl -
Subject digest:
9f49a1eb82e52d4f419580f8bb07eeb12a719cdcaf5df0f03d7d8cb35976be50 - Sigstore transparency entry: 2171521419
- Sigstore integration time:
-
Permalink:
demystify-systems/ai-services-tools@4dc06acee6676d683f961e82b0fd16cd7d433d27 -
Branch / Tag:
refs/heads/claude/six-services-modular-build-h0faac - Owner: https://github.com/demystify-systems
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-pypi.yml@4dc06acee6676d683f961e82b0fd16cd7d433d27 -
Trigger Event:
workflow_dispatch
-
Statement type: