Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

starlark-pyo3

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

starlark-pyo3

Wraps starlark-rust into Python

  • 2024.1.5
  • PyPI
  • Socket score

Maintainers
1

Starlark-PyO3: Python bindings for starlark-rust

.. image:: https://github.com/inducer/starlark-pyo3/workflows/CI/badge.svg?branch=main&event=push :alt: Github Build Status :target: https://github.com/inducer/starlark-pyo3/actions?query=branch%3Amain+workflow%3ACI+event%3Apush .. image:: https://badge.fury.io/py/starlark-pyo3.png :alt: Python Package Index Release Page :target: https://pypi.org/project/starlark-pyo3/

This package provides a sandboxed/restricted Python-like environment by exposing the starlark-rust <https://github.com/facebookexperimental/starlark-rust/>__ interpreter for the Starlark <https://github.com/bazelbuild/starlark/blob/master/spec.md>__ Python-like language to Python via PyO3 <https://pyo3.rs>__.

Starlark <https://github.com/bazelbuild/starlark>__ claims the following design principles:

  • Deterministic evaluation. Executing the same code twice will give the same results.
  • Hermetic execution. Execution cannot access the file system, network, system clock. It is safe to execute untrusted code.
  • Parallel evaluation. Modules can be loaded in parallel. To guarantee a thread-safe execution, shared data becomes immutable.
  • Simplicity. We try to limit the number of concepts needed to understand the code. Users should be able to quickly read and write code, even if they are not expert. The language should avoid pitfalls as much as possible.
  • Focus on tooling. We recognize that the source code will be read, analyzed, modified, by both humans and tools.
  • Python-like. Python is a widely used language. Keeping the language similar to Python can reduce the learning curve and make the semantics more obvious to users.

Status: This is reasonably complete and usable.

  • Documentation <https://documen.tician.de/starlark-pyo3/>__
  • Github <https://github.com/inducer/starlark-pyo3>__ (issues etc.)
  • Package index <https://pypi.org/project/starlark-pyo3>__

Installation

To install, say::

pip install starlark-pyo3

Binary wheels are available for all major platforms. The module is importable as starlark.

Installation for Development

To use this, make sure you have nightly rust available::

curl –proto ‘=https’ –tlsv1.2 -sSf https://sh.rustup.rs \| sh rustup
default nightly

Then, to install into the current Python virtual environment::

pip install maturin
maturin develop

FAQs


Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc