Skip to main content

transpiler python into other language

Project description

Kithon is a project that provides the ability to translate python and python-family language such as hy-lang and coconut into human-readable code in any other programming languages.

Try out the web demo

or

pip install kithon

echo "print('Hello World')" > test.py

kithon gen --js test.py

Output:

console.log("Hello World");

For what?

For use python where we can't. For example in browser(js), embedded scripting(mostly lua). Or make python program faster by translating to go, c++, rust, nim or julia. Also for supporting program written on in unpopular programming languages (very new or vice versa)

How it works?

Kithon uses a dsl based on yaml and jinja to apply the rules described on it to the nodes of the ast tree. Using this dsl you can add new languages or extensions to those already added.

Status

The project is under active development. Now the ability to add translation of basic python constructs into any other language(in this repo js and go only) is supported.

There are plans to develop a number of supported languages and expand support for python syntax

Similar projects

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

kithon-0.2.1.tar.gz (18.0 kB view details)

Uploaded Source

Built Distribution

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

kithon-0.2.1-py3-none-any.whl (22.9 kB view details)

Uploaded Python 3

File details

Details for the file kithon-0.2.1.tar.gz.

File metadata

  • Download URL: kithon-0.2.1.tar.gz
  • Upload date:
  • Size: 18.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.12 CPython/3.9.9 Linux/5.4.164-1-MANJARO

File hashes

Hashes for kithon-0.2.1.tar.gz
Algorithm Hash digest
SHA256 7b8f2c7d076a83e211598e7a9d5f20164d72a6a9d3b6462c7e078cb41b170057
MD5 cbbd3c7d9a4c35a37333e97fb60ad4c2
BLAKE2b-256 c8a82a8cf51caccdb699b2f7ae7bd4eca1e0886bb57809a6605f70d0aa82509f

See more details on using hashes here.

File details

Details for the file kithon-0.2.1-py3-none-any.whl.

File metadata

  • Download URL: kithon-0.2.1-py3-none-any.whl
  • Upload date:
  • Size: 22.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.12 CPython/3.9.9 Linux/5.4.164-1-MANJARO

File hashes

Hashes for kithon-0.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 2d5cff46ff3cd48d92374704330778eda744a89fde976d9dfde177b3ae13ce00
MD5 e0b71e7a823f3611cac662871a1c79cf
BLAKE2b-256 fa8c5fd4d9a11cbfd2a289953f30ad3948b975a8934f6d94e1a2a2333fc15a76

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