SchemaCast 
Short texts in, a labeled property graph out, typed by a GraFlo schema you govern.
SchemaCast reads messages, tickets and notes, and writes what they state as vertices and edges of a GraFlo schema. Each text gets one model call, checked against the schema; what fails is corrected at most twice, then quarantined. Every vertex, edge and property keeps the quote it was read from.
OntoCast builds and evolves an ontology from documents and writes RDF; SchemaCast casts short, frequent texts into a property-graph schema you already govern.
Status: alpha. The API may change between minor releases.
Quick start
uv add schemacast # or: pip install schemacast
Point it at any OpenAI-compatible endpoint:
# OpenAI (the default model is gpt-5.6-luna)
export SCHEMACAST_LLM_API_KEY=sk-...
# or Ollama
export SCHEMACAST_LLM_BASE_URL=http://localhost:11434/v1
export SCHEMACAST_LLM_MODEL=qwen3:8b
export SCHEMACAST_LLM_API_KEY=local
Then, from a clone of the repository, with the example in examples/tickets/:
schemacast sheet --schema examples/tickets/schema.yaml # what the model is shown; no call
schemacast select --schema examples/tickets/schema.yaml --episodes examples/tickets/episodes.jsonl
schemacast cast --schema examples/tickets/schema.yaml --episodes examples/tickets/episodes.jsonl \
--out out/tickets [--db examples/connections/neo4j.yaml] [--replay]
An episodes file holds one JSON object per line:
{"source_id": "mail-1041", "text": "Customer ACC-2291 opened ticket HD-4411 ...", "reference_time": "2026-03-02T09:14:00Z"}
From Python:
import asyncio
from schemacast import SchemaCaster, load_schema, read_episodes
schema = load_schema("examples/tickets/schema.yaml")
result = asyncio.run(
SchemaCaster(schema).cast(read_episodes("examples/tickets/episodes.jsonl"))
)
--out gets the graph, a grounding per assertion, the quarantine, edges waiting for a lookup,
one result per text and a run manifest. --replay serves every reply from the cache and makes no
request; everything but the manifest is byte-identical. Writing upserts by identity, so writing a
cast twice changes nothing in a database that upserts.
Benchmark
schemacast-bench casts a bundled corpus of texts whose graphs are known and scores the result
exactly, with no model as judge: conformance, hallucination, precision and recall, direction,
spans, mention versus mint, injection, selection and re-cast stability, with tokens and cost.
Not yet
Registry mode is planned: selection across the schemas of a GraFlo schema registry, and an HTTP service. Today SchemaCast works on one schema file.
Documentation
growgraph.github.io/SchemaCast: installation, how a cast works, identities and mentions, preparing a schema, replay, writing to a database, the benchmark, and the reference.
uv sync --group dev && uv run pytest # tests
uv run --group docs properdocs serve # the docs site
Licence
Apache-2.0.
Metadata
Release files for schemacast 0.3.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| schemacast-0.3.0.tar.gz | 364.0 kB | Without provenance | Details for schemacast-0.3.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| schemacast-0.3.0-py3-none-any.whl | Python 3 | none | any | Details for schemacast-0.3.0-py3-none-any.whl |
Total release size: 504.9 kB
Release files / schemacast-0.3.0.tar.gz
| Download URL | schemacast-0.3.0.tar.gz |
|---|---|
| Size | 364.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
df6faa2a6c13896a1e636e783504311a9bf8613ac0e96b5fa8228bb36fee89f5
|
|
BLAKE2b-256 checksum How to use checksums |
7d048fd97436efb60ec8da3f1e313115898f5a2016d391e33fb465c76c805801
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.12.21 {"installer":{"name":"uv","version":"0.12.21","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Release files / schemacast-0.3.0-py3-none-any.whl
| Download URL | schemacast-0.3.0-py3-none-any.whl |
|---|---|
| Size | 140.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
5585d16a3e44a63cb40ea110c400a72e064161706efe1228c390d44479ec077a
|
|
BLAKE2b-256 checksum How to use checksums |
df180fade23de14b464fcb5933c7209f10efacde74e99c459bae178c23e6c309
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.12.21 {"installer":{"name":"uv","version":"0.12.21","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Security for schemacast 0.3.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.