Skip to main content
Lethean lthn .ai
Sign in Open console
lthn.ai Core Py
Python · Bindings · Core Primitives

Core Py

Python bindings for Core primitives. Lightweight scripting with full access to the Core Go framework via embedded gpython.

Python 3.14 target Core Go primitives EUPL-1.2
FEATURES

Features

Core primitives in Python

import core, then call core.fs, core.json, core.options, core.service, core.math and more — the same primitives Go imports from core/go, with a Python syntax surface.

gpython, no host Python

Tier 1 runs on gpython, a pure-Go Python interpreter — no system Python, no virtualenv, no C extensions to manage.

Two-tier escape hatch

Tier 1 is gpython for scripting and Core integration; Tier 2 runs CPython via uv for C extensions and 3.14 features. corepy run -tier2-fallback retries there when Tier 1 hits an unsupported import.

Fourth polyglot corner

Core Go, Core PHP, Core TS, and Core Py share the same contract, the same primitive names, and the same import paths.

QUICKSTART

Quick Start

Use Core primitives from Python:

import core
data = core.json.parse('{"hi": "there"}')
core.fs.write("out.json", core.json.stringify(data))

Run a script, or open a Tier 1 REPL:

$ corepy run app.py --tier2-fallback
$ corepy repl
In Development

Beta Sprint

Core Py is part of the beta.1 sprint alongside Core PHP and Core TS. Python bindings for Core primitives, managed interpreter, and the two-tier architecture are in active development.

Follow on GitHub