Skip to main content

secryst — Python crystal

Secryst is coined from scrying + crystal: gazing into an opaque script to reveal its hidden reading. This package is the Python crystal.

The Python crystal — reference implementation of IMF v1 model zips and the models.yaml index (the interscript-ml contract), the phonological layer of Interscript. The Ruby (secryst gem) and TypeScript (npm i secryst) crystals are diffed against this one on shared golden sets. This crystal owns golden generation and numerical adjudication for the family.

Home repo: https://github.com/secryst/secryst-py (this copy in interscript-ml/runtime is the frozen origin; the package now lives there).

from secryst import Model

model = Model.load("khm-latn-1.0")        # id: index resolve -> download
                                          # -> sha256-verify -> cache -> load
model.translate("ភាសា")                   # -> "pheasaea"
model.id                                   # "khm-latn-1.0"

model = Model.load("khm-latn-1.0.zip")    # or: a local zip path directly
  • Byte-level only: the canonical ByT5 table (byte b → id b+3, trailing EOS) — no vocab files, no per-model tokenization code.
  • Greedy KV-cache decode when the zip ships decoder-kv.onnx (default), plain full-recompute fallback otherwise.
  • Every .onnx member is sha256-verified against metadata.yaml before the session is created; corrupt downloads fail loudly.
  • Dynamic fetch per the models.yaml contract (shared with the Ruby and TypeScript runtimes): resolve id -> channel URL, download to temp, verify whole-file sha256 against the index, atomically install into ~/.cache/secryst/models/<id>/. Overrides: SECRYST_INDEX (URL or path), SECRYST_CACHE.

Install: pip install secryst (or pip install -e ".[dev]" from the repo).

Tests: python -m pytest runtime/tests — tiny-graph zips, no torch needed. The end-to-end golden test runs when SECRYST_E2E_ZIP points at a real zip (e.g. models/khm-latn/khm-latn-1.0-fp32.zip) and asserts byte-identical outputs against golden/khm-latn-100.jsonl.

License: BSD-3-Clause.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

secryst-0.1.2.tar.gz (12.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

secryst-0.1.2-py3-none-any.whl (9.9 kB view details)

Uploaded Python 3

File details

Details for the file secryst-0.1.2.tar.gz.

File metadata

  • Download URL: secryst-0.1.2.tar.gz
  • Upload date:
  • Size: 12.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for secryst-0.1.2.tar.gz
Algorithm Hash digest
SHA256 0cc1da70b224b1fd1eb300e7cba628d8076c3ddd92938aae46dfa4fe3a9fb20c
MD5 d27b0c579553ce6165148ef5914e5393
BLAKE2b-256 cda90475da9eb06779f5d3849a6cdccf11d6fdcc3df1f1b4d3360a3a6ea9bc04

See more details on using hashes here.

Provenance

The following attestation bundles were made for secryst-0.1.2.tar.gz:

Publisher: release.yml on secryst/secryst-py

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file secryst-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: secryst-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 9.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for secryst-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 edb5e0afb1b98cfd0a5c0ecb0a293b3144bba506d83785b622a6e5175a96672b
MD5 6751da649705852319a5f1af8c9527a0
BLAKE2b-256 e9729803f5b4304d431827da8911ccf4288f640f177f5070ce44298515381e5f

See more details on using hashes here.

Provenance

The following attestation bundles were made for secryst-0.1.2-py3-none-any.whl:

Publisher: release.yml on secryst/secryst-py

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

0.2.0

2 files

This release

0.1.2 This release

2 files

0.1.1

2 files

0.1.0

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page