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 ml-models/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.1.tar.gz (11.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.1-py3-none-any.whl (9.6 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: secryst-0.1.1.tar.gz
  • Upload date:
  • Size: 11.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.1.tar.gz
Algorithm Hash digest
SHA256 2d516ebb4f6e7cc8ac4754ed8315e7c0e6a8f6626572a634c3b95e44baa79151
MD5 7c9c323ec1fe3e0816f723b0cb63c5f3
BLAKE2b-256 ac92a51f41996560ee518b2c9a27b582fe9b37372c59ed2d16bdf7f1a1b62ce6

See more details on using hashes here.

Provenance

The following attestation bundles were made for secryst-0.1.1.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.1-py3-none-any.whl.

File metadata

  • Download URL: secryst-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 9.6 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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 7c5885298ab354364a9018e941d1d47002c6eea39dcec471af06b413f4e13160
MD5 ebefd569783e191e91116481b665a45c
BLAKE2b-256 2bcd956a03340bfb6f252e95452b1aed5b59155ea9a7aeb0323ed9aedf867a97

See more details on using hashes here.

Provenance

The following attestation bundles were made for secryst-0.1.1-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

0.1.2

2 files

This release

0.1.1 This release

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