Skip to main content

Python bindings for the Go implementation of Starlark

Project description

python-starlark-go

PyPI Tests Documentation Status action-bumpr supported

Introduction

This module provides Python bindings for the Starlark programming language.

Starlark is a dialect of Python designed for hermetic execution and deterministic evaluation. That means you can run Starlark code you don't trust without worrying about it being able access any data you did not explicitly supply to it, and that you can count on the same code to always produce the same value when used with the same input data. Starlark was orginally created for the Bazel build system. There are now several implementations of Starlark; this module is built on starlark-go.

This module was originally forked from Kevin Chung's pystarlark.

Features

  • Evalutes Starlark code from Python
  • Translates Starlark exceptions to Python exceptions
  • Converts Starlark values to Python values
  • Converts Python values to Starlark values
  • No runtime dependencies - cgo is used to bundle starlark-go into a Python extension

Installation

pip install starlark-go

Usage

from starlark_go import Starlark

s = Starlark()
fibonacci = """
def fibonacci(n=10):
   res = list(range(n))
   for i in res[2:]:
       res[i] = res[i-2] + res[i-1]
   return res
"""
s.exec(fibonacci)
s.eval("fibonacci(5)")  # [0, 1, 1, 2, 3]

s.set(x=5)
s.eval("x") # 5
s.eval("fibonacci(x)")  # [0, 1, 1, 2, 3]

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

starlark-go-0.1.1.tar.gz (36.4 kB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

starlark_go-0.1.1-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (1.2 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.17+ ARM64

starlark_go-0.1.1-cp311-cp311-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.3 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.17+ x86-64manylinux: glibc 2.5+ x86-64

starlark_go-0.1.1-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl (1.3 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.17+ i686manylinux: glibc 2.5+ i686

starlark_go-0.1.1-cp311-cp311-macosx_10_9_x86_64.whl (1.3 MB view details)

Uploaded CPython 3.11macOS 10.9+ x86-64

starlark_go-0.1.1-cp311-cp311-macosx_10_9_universal2.whl (1.3 MB view details)

Uploaded CPython 3.11macOS 10.9+ universal2 (ARM64, x86-64)

starlark_go-0.1.1-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (1.2 MB view details)

Uploaded CPython 3.10manylinux: glibc 2.17+ ARM64

starlark_go-0.1.1-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.3 MB view details)

Uploaded CPython 3.10manylinux: glibc 2.17+ x86-64manylinux: glibc 2.5+ x86-64

starlark_go-0.1.1-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl (1.3 MB view details)

Uploaded CPython 3.10manylinux: glibc 2.17+ i686manylinux: glibc 2.5+ i686

starlark_go-0.1.1-cp310-cp310-macosx_10_9_x86_64.whl (1.3 MB view details)

Uploaded CPython 3.10macOS 10.9+ x86-64

starlark_go-0.1.1-cp310-cp310-macosx_10_9_universal2.whl (1.3 MB view details)

Uploaded CPython 3.10macOS 10.9+ universal2 (ARM64, x86-64)

starlark_go-0.1.1-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (1.2 MB view details)

Uploaded CPython 3.9manylinux: glibc 2.17+ ARM64

starlark_go-0.1.1-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.3 MB view details)

Uploaded CPython 3.9manylinux: glibc 2.17+ x86-64manylinux: glibc 2.5+ x86-64

starlark_go-0.1.1-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl (1.3 MB view details)

Uploaded CPython 3.9manylinux: glibc 2.17+ i686manylinux: glibc 2.5+ i686

starlark_go-0.1.1-cp39-cp39-macosx_10_9_x86_64.whl (1.3 MB view details)

Uploaded CPython 3.9macOS 10.9+ x86-64

starlark_go-0.1.1-cp39-cp39-macosx_10_9_universal2.whl (1.3 MB view details)

Uploaded CPython 3.9macOS 10.9+ universal2 (ARM64, x86-64)

starlark_go-0.1.1-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (1.2 MB view details)

Uploaded CPython 3.8manylinux: glibc 2.17+ ARM64

starlark_go-0.1.1-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.3 MB view details)

Uploaded CPython 3.8manylinux: glibc 2.17+ x86-64manylinux: glibc 2.5+ x86-64

starlark_go-0.1.1-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl (1.3 MB view details)

Uploaded CPython 3.8manylinux: glibc 2.17+ i686manylinux: glibc 2.5+ i686

starlark_go-0.1.1-cp38-cp38-macosx_10_9_x86_64.whl (1.3 MB view details)

Uploaded CPython 3.8macOS 10.9+ x86-64

starlark_go-0.1.1-cp38-cp38-macosx_10_9_universal2.whl (1.3 MB view details)

Uploaded CPython 3.8macOS 10.9+ universal2 (ARM64, x86-64)

starlark_go-0.1.1-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (1.2 MB view details)

Uploaded CPython 3.7mmanylinux: glibc 2.17+ ARM64

starlark_go-0.1.1-cp37-cp37m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.3 MB view details)

Uploaded CPython 3.7mmanylinux: glibc 2.17+ x86-64manylinux: glibc 2.5+ x86-64

starlark_go-0.1.1-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl (1.3 MB view details)

Uploaded CPython 3.7mmanylinux: glibc 2.17+ i686manylinux: glibc 2.5+ i686

starlark_go-0.1.1-cp37-cp37m-macosx_10_9_x86_64.whl (1.3 MB view details)

Uploaded CPython 3.7mmacOS 10.9+ x86-64

File details

Details for the file starlark-go-0.1.1.tar.gz.

File metadata

  • Download URL: starlark-go-0.1.1.tar.gz
  • Upload date:
  • Size: 36.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.9.13

File hashes

Hashes for starlark-go-0.1.1.tar.gz
Algorithm Hash digest
SHA256 8133d161e17306ff1376330dc5bdd33d19cc6b2cc5dd5497c5e018da928ef6c9
MD5 c2ff64f87122c2f582fbe262a7bc96ed
BLAKE2b-256 db8afdd9c15b57cfbab3ce2021ebd5a9dcee4ab1b412e1db4078967689930df7

See more details on using hashes here.

File details

Details for the file starlark_go-0.1.1-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for starlark_go-0.1.1-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 4f93ec3812bed15109cfbe8185c3ea872607f53e4a85a82f18c7c779c7a35c25
MD5 e3be190f6bb9d579540efd9623ef10dc
BLAKE2b-256 39d595e0ccdd1d8e164119ea9858c1bf796a7043235e7e5c3eb045bf72133f2b

See more details on using hashes here.

File details

Details for the file starlark_go-0.1.1-cp311-cp311-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for starlark_go-0.1.1-cp311-cp311-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 2c85d54587ef045b3f4a1099fbddd27c88709d4d41cf7c1cd0489afa036f1832
MD5 f158ab87ce88a2f1fd88665e8d4994bc
BLAKE2b-256 9804792ae03b4a42e4bcb48a85658fe7f1404c9d88488cfdfbb0ae9ab9adaa85

See more details on using hashes here.

File details

Details for the file starlark_go-0.1.1-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl.

File metadata

File hashes

Hashes for starlark_go-0.1.1-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl
Algorithm Hash digest
SHA256 d12a87ef46139214d54025a4e08ec849f38df7e11f44f83daa11937ffc70088a
MD5 ed9e2719de3e1ba607916a7c2acf1114
BLAKE2b-256 34372d6ee8170b5b91b6894966f3bd817c623572024b75237a4cdc46742b6366

See more details on using hashes here.

File details

Details for the file starlark_go-0.1.1-cp311-cp311-macosx_10_9_x86_64.whl.

File metadata

File hashes

Hashes for starlark_go-0.1.1-cp311-cp311-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 90535dc186e8d901ea85f172206c4e13d81ae5bb77eeb96076f52412b09e4f93
MD5 8bd413fc52fd24d8f33c598638bde0f9
BLAKE2b-256 dd159c081af0f40f2c3fcac068296935b95368ddb162cfe5f71e5bd6151bae97

See more details on using hashes here.

File details

Details for the file starlark_go-0.1.1-cp311-cp311-macosx_10_9_universal2.whl.

File metadata

File hashes

Hashes for starlark_go-0.1.1-cp311-cp311-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 fcd7fb19135f5ffe62c7373b0a5d065793abccee14ab06950a1149ad89d2988a
MD5 61f531b7bd6e2c2c4faf8e864b977954
BLAKE2b-256 cd5a340329240a608fdf8e29a492c5598a15448dff1085946bb53df66907571e

See more details on using hashes here.

File details

Details for the file starlark_go-0.1.1-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for starlark_go-0.1.1-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 dfccd723efce3b42ea30ca655cddb27b218a878931f31660eca3a2abdffaf325
MD5 50efbe583a62c14e5691ea9c5a81e63d
BLAKE2b-256 f90c94db74332d9b8efaa639c0769e0c620222b72be58eae4e45f94336bc2d01

See more details on using hashes here.

File details

Details for the file starlark_go-0.1.1-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for starlark_go-0.1.1-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 7e9a4a5315c709cfd44e757494c174d8c48a21deef72d579e3810b49650ab3e6
MD5 a0685421c97baa5d7b6c1cd885bb16dc
BLAKE2b-256 4138b98f9e66886fc65b1d0916c22d04d2c997c301998546aea2b31a3bc77039

See more details on using hashes here.

File details

Details for the file starlark_go-0.1.1-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl.

File metadata

File hashes

Hashes for starlark_go-0.1.1-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl
Algorithm Hash digest
SHA256 3932a4ced8f817e3b76a43281fcdae52e903de15501eee0c50ea264e40a7d124
MD5 de94aa9402d558feea5c11b56c03de16
BLAKE2b-256 1a08575c5444e4cf450c3d96aa445eabaf43c3448b774b148a81871ab4a6234e

See more details on using hashes here.

File details

Details for the file starlark_go-0.1.1-cp310-cp310-macosx_10_9_x86_64.whl.

File metadata

File hashes

Hashes for starlark_go-0.1.1-cp310-cp310-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 f5ba83d4f8f106bbf4ca4f3594ef8b3f39e49bfba97afbee77c636060842ba8e
MD5 5f2e49fa2e9bca2aa4dca00cea2c2c9d
BLAKE2b-256 a1c0d2f632ca2f349b36267d822063ccac5fa2b28cab2a6acf6e6d035379e9ef

See more details on using hashes here.

File details

Details for the file starlark_go-0.1.1-cp310-cp310-macosx_10_9_universal2.whl.

File metadata

File hashes

Hashes for starlark_go-0.1.1-cp310-cp310-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 12e520803b126b8cb90b12f5f19da66625fa1125505def0a28b64afe0fca9ac9
MD5 9346aa5c6c0055e30286b649ef80a320
BLAKE2b-256 e72cd9f699a0dc9592e757734c4510703af08357dde4bf9be623afe9061424de

See more details on using hashes here.

File details

Details for the file starlark_go-0.1.1-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for starlark_go-0.1.1-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 1e9728a0f06499a2380a3d5b5b42d161330beaec0eb72d513fe52791497b9784
MD5 2aa21a2128aa1d38464f5b4e622001aa
BLAKE2b-256 c1900d449cedea327b11237a681cde0b3edf04a9abc3161717ad8eae1e4a9231

See more details on using hashes here.

File details

Details for the file starlark_go-0.1.1-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for starlark_go-0.1.1-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 6ddba6bb7c4c60cf6d0a2da4509acbb303bf0b514e3d9c4e5eac92b77b5352bd
MD5 aebc6e42d4d17493587f420cd922f320
BLAKE2b-256 f2ede19ade55287815f351c1c3f378f986019842c48232be4f535ed771158873

See more details on using hashes here.

File details

Details for the file starlark_go-0.1.1-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl.

File metadata

File hashes

Hashes for starlark_go-0.1.1-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl
Algorithm Hash digest
SHA256 6dd3f15a057b15f8cd930d66139e1896bf0ba8faf9c181e013fc44f2d2a64b5e
MD5 243e0fe52d5de250c7b5d9e6fce79e41
BLAKE2b-256 e1d5933ed5f8c3a4f532c2ebd59a2035d54eb52152f1af8976a101e15a553480

See more details on using hashes here.

File details

Details for the file starlark_go-0.1.1-cp39-cp39-macosx_10_9_x86_64.whl.

File metadata

File hashes

Hashes for starlark_go-0.1.1-cp39-cp39-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 ae108245bbf9c447034cc9088fce5fc1f36ab76100bb8f6f20b7b791cd84ab1b
MD5 1e5e29d728f74cf897a54a34aabf0861
BLAKE2b-256 6c49c33b4e8f531a2746ae758fcdc51ec70b982c2d498c2067387100da00af99

See more details on using hashes here.

File details

Details for the file starlark_go-0.1.1-cp39-cp39-macosx_10_9_universal2.whl.

File metadata

File hashes

Hashes for starlark_go-0.1.1-cp39-cp39-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 cf6de47018d76c80e432862c700c3b09eaeb0726b0343e9d8f24d7e29fb31d08
MD5 7f53c62351918d55eb40d841fb439984
BLAKE2b-256 351d7a3104a0038e5a77b20faec9cd2b110053304f8706369f6aa3db57ee0d11

See more details on using hashes here.

File details

Details for the file starlark_go-0.1.1-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for starlark_go-0.1.1-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 d168a9b5d4ff6ff0aa0015473543e1308f30cd0dc13b5bbfc135c8e8d58e9146
MD5 04adf134543bfeb7d11820f1052a4d19
BLAKE2b-256 3d65887296e6cde8e858f03cdb76b5bf36ee9170a09da4eee40c01555fd50084

See more details on using hashes here.

File details

Details for the file starlark_go-0.1.1-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for starlark_go-0.1.1-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 3a9c843f5038bf80108cc7b207bb8138cf0304b55f32d5cc9030cb31dbbad1b8
MD5 8716d74dc586a7221ee950c73f145ac4
BLAKE2b-256 c5387d57e898419434f0b234486224a11f70497a739a505d5f36fd6c200017a0

See more details on using hashes here.

File details

Details for the file starlark_go-0.1.1-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl.

File metadata

File hashes

Hashes for starlark_go-0.1.1-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl
Algorithm Hash digest
SHA256 8181ba9e56c8295727886b5053060d1eafcdae82d2c63b29b2aaa194faa45baa
MD5 8d1572172358c29026e9636a1e7e918f
BLAKE2b-256 4a96e04632f97b39b2a356ab3fe25372b1129339e24e49e42149bbf7c39344bc

See more details on using hashes here.

File details

Details for the file starlark_go-0.1.1-cp38-cp38-macosx_10_9_x86_64.whl.

File metadata

File hashes

Hashes for starlark_go-0.1.1-cp38-cp38-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 36d65a5f4e004d95cbc5760acaadb72e6d077a6c4eca6b41dabdba27f7283e97
MD5 fea61d7b6a4ecf96d98950f40cad2936
BLAKE2b-256 66ee967a606498b6dd7d84a3e5577ef9a3a31c2846e8ce5cfbeebe1922849cf6

See more details on using hashes here.

File details

Details for the file starlark_go-0.1.1-cp38-cp38-macosx_10_9_universal2.whl.

File metadata

File hashes

Hashes for starlark_go-0.1.1-cp38-cp38-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 a38c2825c5fd6045a2edbbde67ea24f6ffd3426ba9f14892abedcbb4f5f669e9
MD5 40da307c1ab158d2e821a8f58da3615c
BLAKE2b-256 c35e62fe2cfd2c5afac65d7d5f630899c619f5c8962e37823f177731047109a7

See more details on using hashes here.

File details

Details for the file starlark_go-0.1.1-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for starlark_go-0.1.1-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 4b4c0963f3b0afde8614a681929ad92dd2748908a47b57229de953dcacc183f8
MD5 cc3d241984a40afdc3b05bfdedb3072f
BLAKE2b-256 580c772fd754e3fdbf5eac7bf8ca7893854dfa4d2bc101cd453454ee47f62404

See more details on using hashes here.

File details

Details for the file starlark_go-0.1.1-cp37-cp37m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for starlark_go-0.1.1-cp37-cp37m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 bd1761969ab38b1ed2725dacef4b8a443b6c54016f22644377861bcd795887a4
MD5 bb2ddd67bd09aeea948e59def186b894
BLAKE2b-256 e17ab0bfb57dfa5b515122a540727ef247ea3c4c3aeaa14087468f63ec40b84e

See more details on using hashes here.

File details

Details for the file starlark_go-0.1.1-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl.

File metadata

File hashes

Hashes for starlark_go-0.1.1-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl
Algorithm Hash digest
SHA256 0f71eff403e207340b62d95ba12ecd4df2bcf600244fffad8cdb56cfbcc14715
MD5 ba6a7cefebf8905e749b0b7609e36987
BLAKE2b-256 25f03f56ad89f69c06cb5a06273c2069e46fc73d14e70d5a37018b260da50de5

See more details on using hashes here.

File details

Details for the file starlark_go-0.1.1-cp37-cp37m-macosx_10_9_x86_64.whl.

File metadata

File hashes

Hashes for starlark_go-0.1.1-cp37-cp37m-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 bbf697ac2f7eb68bb1b6d05598a658be630605880869273a7659543895359060
MD5 5f27a03bb683993f58e0edefe44b33c5
BLAKE2b-256 35fc7ed3980a201e519bb2b143fc331a6f51d94fdfd2dc204ac5f1a4cf99d89a

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page