Skip to content
For the complete documentation index, see llms.txt. This page is also available as Markdown.

Runtime

Reference for telys.runtime — load_runtime, runtime_available, the RuntimeHandle interface, FORMAT_VERSION, RuntimeNotInstalled, and the TELYS_RUNTIME switch.

Every collection operation runs inside the signed native runtime. Use telys.runtime to load and probe it. The runtime is not part of this package.

from telys.runtime import load_runtime, runtime_available, RuntimeHandle, RuntimeNotInstalled
from telys import FORMAT_VERSION

Functions

Signature
Returns
Description

load_runtime()

RuntimeHandle

Load and return the active runtime. Raises RuntimeNotInstalled if it cannot be imported.

runtime_available()

bool

True if a runtime can be loaded, without raising.

load_runtime()

The TELYS_RUNTIME environment variable selects the runtime:

TELYS_RUNTIME

Runtime loaded

"native"

The signed native runtime.

"local"

The local runtime.

"" (default, auto)

Native when a verified install is present (native-only, fail-closed); otherwise local.

If the selection cannot be imported, load_runtime() raises RuntimeNotInstalled.

from telys.runtime import load_runtime, runtime_available, RuntimeNotInstalled

if runtime_available():
    rt = load_runtime()
else:
    print("Install the runtime: telys runtime install")

try:
    rt = load_runtime()
except RuntimeNotInstalled:
    ...  # guide the user to install + verify

You rarely call load_runtime() yourself — Telys(...) loads the runtime lazily on the first collection operation. Use these functions for capability checks and diagnostics.

RuntimeHandle

The stable interface the SDK programs against; the signed runtime supplies the implementations. You don't instantiate it — load_runtime() returns the concrete handle for the selected runtime.

Constants

Constant
Value
Meaning

telys.FORMAT_VERSION

1

On-disk format contract for saved collections. Also exposed as telys.runtime.FORMAT_VERSION.

Exceptions

Exception
Raised when

RuntimeNotInstalled

load_runtime() cannot import the selected runtime.

Environment

Variable
Default
Effect

TELYS_RUNTIME

"" (auto)

Force "native" or "local" runtime selection.

TELYS_KERNEL

—

Force the native kernel library path (highest priority).

AME_KERNEL

—

Legacy kernel path override.

A verified install lives under $TELYS_HOME/runtime/<platform>/ (default ~/.telys), containing libty_runtime, libame_kernel, telys_manifest.json, telys_manifest.sig, license.jwt, installed.json, and pysite/. Importing telys prepends that pysite/ to sys.path when the install is verified.

Installing & verifying the runtime

Install and verify through the CLI, not this API:

See also

Last updated

Was this helpful?