Skip to main content

A Calcium language interpreter

Project description

calciumpy

Run JSON like code in Python.

Docs

About Calcium language

Calcium is a programming language that takes a JSON array as input. calciumpy is interoperable with the Python language, allowing you to utilize Python's standard libraries and more. It is primarily designed as a subset of Python.

How to create the interpreter and run code

from calciumpy import Runtime

# Calcium code is given as JSON arrays.
calcium_code = [
  [1, [], "#", "0.4.3"],
  [1, [], "expr", ["call", ["var", "print"], ["Hello, World."]]],
  [1, [], "end"],
]

# The Runtime executes Calcium code.
r = Runtime(calcium_code)
r.run()  # outputs 'Hello, World.'

The code above corresponds to the following Python code:

print("Hello, World.")

Applications of calciumpy

Calcium Editor

is a web application that allows you to create code using visual programming with Blockly and execute it with calciumpy and Pyodide.

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

calciumpy-0.4.3.tar.gz (13.5 kB view details)

Uploaded Source

Built Distribution

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

calciumpy-0.4.3-py3-none-any.whl (22.4 kB view details)

Uploaded Python 3

File details

Details for the file calciumpy-0.4.3.tar.gz.

File metadata

  • Download URL: calciumpy-0.4.3.tar.gz
  • Upload date:
  • Size: 13.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.9.6

File hashes

Hashes for calciumpy-0.4.3.tar.gz
Algorithm Hash digest
SHA256 71e315f3a268b051ca5cfba09e523a7c1d090a4996764ea4a0eed669bbd5ec51
MD5 a466872d71b3e89c03c5d52eb3f88225
BLAKE2b-256 85d3ee3273e61fc8c3d7090be2fcf8addf1006304734b389ce66ff7fb5785031

See more details on using hashes here.

File details

Details for the file calciumpy-0.4.3-py3-none-any.whl.

File metadata

  • Download URL: calciumpy-0.4.3-py3-none-any.whl
  • Upload date:
  • Size: 22.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.9.6

File hashes

Hashes for calciumpy-0.4.3-py3-none-any.whl
Algorithm Hash digest
SHA256 0eaebc282afb222c9a5345fdf02722bfe37490ed6657ce26aa0ad456a0fd2c1e
MD5 63dac0f4b35eaf1cb85426e59a6b144d
BLAKE2b-256 34832501f18056953ab42f864a556cf0c8c3ee24b441cad9fda434a2db856ad1

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