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.0.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.0-py3-none-any.whl (9.6 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: secryst-0.1.0.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.0.tar.gz
Algorithm Hash digest
SHA256 3f2509d4789fa6af668025bffab4999745513bee4b2fe4c90edf425addaf8783
MD5 e8125aee9b64e6dade678abf16875de6
BLAKE2b-256 c24a13ce2960be56aa84a8d458c2276b905e4368b4ba6d3fcb7dc5c854295a47

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: secryst-0.1.0-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.0-py3-none-any.whl
Algorithm Hash digest
SHA256 1c9e32aa55c8470c514a7ecd613abc58147c34bb082d9aba0fad7bf6be4cc672
MD5 3cb8022c65af4e24a8a62d75db7bc684
BLAKE2b-256 81c9c74d460cd5f04a9b944ecd66845950a4ba0ac6e8f2e3466db2d3797d87c5

See more details on using hashes here.

Provenance

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

0.1.1

2 files

This release

0.1.0 This release

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