--- id: starlark-pyo3 version: "2026.1" license: unclear license_treatment: unclear maintenance: active --- # starlark-pyo3 — Wraps starlark-rust into Python License: unclear · Maintenance: active · Downloads: 356.7K/mo ## What it is and what it does Starlark-pyo3 wraps the starlark-rust interpreter, bringing Starlark—a Python-like language designed for safe, deterministic execution—into Python. Starlark is built around hermetic execution (no filesystem, network, or clock access), deterministic evaluation (same code always produces the same result), and parallel-safe immutable data. This makes it suitable for running untrusted code safely, configuration languages, and build system scripting. The package provides Python bindings via PyO3, so you can instantiate a Starlark interpreter from Python and evaluate Starlark code within a sandboxed context. It ships with prebuilt wheels for Linux (x86_64, aarch64, armv7l), Windows, and macOS, making installation straightforward. The single runtime dependency is typing-extensions, keeping the footprint minimal. Use it for: - Execute untrusted user scripts or plugins safely without filesystem or network access - Implement a configuration or domain-specific language (DSL) that is Python-like but deterministic and sandboxed - Build system or task automation where reproducibility and parallel evaluation are required - Evaluate expressions or code snippets from external sources with guaranteed hermetic isolation - Prototyping or embedding a restricted scripting layer in a larger Python application ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Exposes the Starlark interpreter (a Python-like language) to Python via PyO3 bindings, enabling sandboxed execution of untrusted code with deterministic, hermetic evaluation. Yes, if you need sandboxed, deterministic code execution with a Python-like syntax. The package is actively maintained, has no known vulnerabilities, and offers prebuilt wheels for easy installation. However, verify the license terms first—the package metadata does not declare an explicit license, which could be a blocker for commercial or restricted-license projects. Start with the documentation and a small proof-of-concept to confirm the API and performance meet your use case. ## Install pip install starlark-pyo3 uv add starlark-pyo3 poetry add starlark-pyo3 ## Installing starlark-pyo3 Before you install: Medium install friction due to compiled wheels, but prebuilt binaries are available for all major platforms and Python versions (3.9+). Repository is active with recent commits and no known vulnerabilities. License in practice: License treatment is unclear—no SPDX identifier or raw license text is declared in package metadata. Verify the actual license terms in the repository before use in proprietary or restricted-license contexts. Quickstart: pip install starlark-pyo3 import starlark # Create and evaluate Starlark code in a sandboxed environment result = starlark.eval("x = 1 + 2\nprint(x)") Requires Python 3.9 or later. Development builds require nightly Rust and maturin. Verify before relying: - Exact API surface and available built-in functions in the sandboxed environment - Performance characteristics and execution limits for large or complex Starlark programs - Compatibility guarantees between starlark-pyo3 versions and the underlying starlark-rust library ## Package facts - License: not declared (unclear) - Python support: supports_current - Install friction: medium - Maintenance: active - Downloads: 356.7K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags sandboxed python execution, starlark interpreter python, restricted code evaluation, hermetic scripting environment, deterministic code sandbox, untrusted code runner, python-like dsl, sandboxing, dsl, rust-binding [View on SkillFed](https://skillfed.io/packages/starlark-pyo3) · [View on PyPI](https://pypi.org/project/starlark-pyo3/)