[](https://crates.io/crates/ie-schema)
[](https://pypi.org/project/ie-schema/)
[](https://gitlab.com/paul/ie-schema/-/pipelines)
[](https://gitlab.com/paul/ie-schema/-/releases)
[](https://docs.rs/ie-schema)
[](https://deps.rs/repo/gitlab/paul/ie-schema)
[](https://ie-schema.readthedocs.io)
# Information Extraction Schema
A flexible input schema for [GLiNER](https://github.com/fastino-ai/GLiNER2) 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]'
```
``` python
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
```