Skip to main content

Molang to Python Translator & interpreter written in pure Python.

Project description

molang

PyPI Python Downloads Status Code style: black Issues

Molang to Python Translator & interpreter written in pure Python.

Installation

Install the module with pip:

pip3 install molang

Update existing installation: pip3 install molang --upgrade

Requirements

Name Description
pydantic Data validation using Python type hints

Features

  • Decorator to convert a Python function to Molang.
  • Execute .molang files from the command line or using Python. See Road map

See the docs for more information.

Example

Convert my_function to Molang

from molang import molang

@molang
def my_function(a, b):
    return a + b

print(my_function)

>> return t.a+t.b

Command-line interface

usage: molang [-h] [-V]

Run molang files

options:
  -h, --help     show this help message and exit
  -V, --version  print the molang version number and exit.

Road map

  • Python function to Molang
  • Interpreter
  • Lexer
  • Parser
  • cli to convert Python code to Molang code (vice versa)

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

molang-0.0.3.tar.gz (5.5 kB view details)

Uploaded Source

File details

Details for the file molang-0.0.3.tar.gz.

File metadata

  • Download URL: molang-0.0.3.tar.gz
  • Upload date:
  • Size: 5.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.9.20

File hashes

Hashes for molang-0.0.3.tar.gz
Algorithm Hash digest
SHA256 efc779988a2d67615c0e90aeca9ed1f8edc4e35322e2f5add900314ba71c3647
MD5 fd3b5de1fdd0517d60aa724400c1be07
BLAKE2b-256 e22713cc90bbdc82c19129ce0166e3b532c4f665a0c7f6bee1ad3e3da773d832

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