Skip to main content

A Calcium language interpreter

Project description

calciumpy

A Calcium language intepreter on Python

What is Calcium language?

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

How to create the interpreter and run code

from calciumpy.runtime import Runtime

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

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

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.0.tar.gz (13.2 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.0-py3-none-any.whl (22.1 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for calciumpy-0.4.0.tar.gz
Algorithm Hash digest
SHA256 168e1508b5a0d6218ed0c92af962d75c1d811ecd0415887e0f559ccc552bda40
MD5 7c11a975e127381a9c9fd5d5db962667
BLAKE2b-256 fd951b6e85fae4125825b564a66b1cb1a91ca702f1954e6fa69ffc7567a07fa5

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for calciumpy-0.4.0-py3-none-any.whl
Algorithm Hash digest
SHA256 4bc0efebe0d94a82e041b4246a999c0309daf05b7b7bed08f4cd683bde637001
MD5 c35467f6ee90923fd273a930e6e73e26
BLAKE2b-256 cc3b3e3d2f45341f1196ec6e90b972de03a049c7f0dcf8c99a40753432952d2c

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