Information Extraction Schema
A flexible input schema for GLiNER style multi-task models.
Python
uv add ie_schema # or pip install
# To load from dataclasses / Pydantic models, install the optional dependency:
uv add 'ie_schema[model]'
from dataclasses import dataclass
from ie_schema import IESchema
@dataclass
class BusinessRecord:
business_name: str
address_line1: str
address_line2: str | None
email: str | None
website: str | None
phone: str | None
# From raw JSON (native ie-schema format):
schema = IESchema.loads(
'{"json_structures":[{"name":"BusinessRecord","business_name":{"dtype":"str"}}]}'
)
# Or a root JSON Schema string (scalar object properties only in this conversion):
schema_from_js = IESchema.loads(
'{"type":"object","properties":{"business_name":{"type":"string"}}}'
)
# Or pass a dataclass / Pydantic v2 model class or instance
# (requires `pydantic` — use the `model` extra):
from_schema = IESchema.loads(BusinessRecord)
from_instance = IESchema.loads(BusinessRecord("Acme", "Main", None, None, None, None))
print(schema, from_schema, from_instance)
Rust
cargo add ie-schema
Release files for ie_schema 0.1.5
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| ie_schema-0.1.5-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl | CPython 3.10 | abi3 | Linux glibc 2.17+ x86-64 | Details |
Release files / ie_schema-0.1.5-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
| Download URL | ie_schema-0.1.5-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl |
|---|---|
| Size | 727.5 kB |
| Tags | CPython 3.10 Linux glibc 2.17+ x86-64 abi3 |
|
SHA-256 checksum How to use checksums |
e53cfe3a09f08c1575c0f4aa3277480fcff906f6c0deeedd227d6364b96fe3e2
|
|
BLAKE2b-256 checksum How to use checksums |
7584bec1c5bd473ae1ea24413fb8f7a14de9acbdb896ba0436f756e3d097ec34
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.11.6 {"installer":{"name":"uv","version":"0.11.6","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"CachyOS Linux","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|