{ "info": { "author": "Alessandro Molina", "author_email": "alessandro.molina@axant.it", "bugtrack_url": null, "classifiers": [ "Development Status :: 3 - Alpha", "License :: OSI Approved :: MIT License", "Programming Language :: JavaScript", "Programming Language :: Python :: 2.6", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3.3", "Programming Language :: Python :: 3.4", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3.7" ], "description": "dukpy\n=====\n\n.. image:: https://img.shields.io/travis/amol-/dukpy/master.svg?label=Linux%20build%20%40%20Travis%20CI\n :target: https://travis-ci.org/amol-/dukpy\n\n.. image:: https://img.shields.io/appveyor/ci/amol-/dukpy/master.svg?label=Windows%20build%20%40%20Appveyor\n :target: https://ci.appveyor.com/project/amol-/dukpy\n\n.. image:: https://coveralls.io/repos/amol-/dukpy/badge.png?branch=master\n :target: https://coveralls.io/r/amol-/dukpy?branch=master\n\n.. image:: https://img.shields.io/pypi/v/dukpy.svg\n :target: https://pypi.org/p/dukpy\n\n\nDukPy is a simple javascript interpreter for Python built on top of\nduktape engine **without any external dependency**.\nIt comes with a bunch of common transpilers built-in for convenience:\n\n - *CoffeeScript*\n - *BabelJS*\n - *TypeScript*\n - *JSX*\n - *LESS*\n\nDukpy has been tested on **Python 2.7** and **Python 3.4**, dukpy\nis currently not production ready and might actually crash your\nprogram as it is mostly implemented in C.\n\nCoffeeScript Compiler\n---------------------\n\nUsing the coffeescript compiler is as easy as running:\n\n.. code:: python\n\n >>> import dukpy\n >>> dukpy.coffee_compile('''\n ... fill = (container, liquid = \"coffee\") ->\n ... \"Filling the #{container} with #{liquid}...\"\n ... ''')\n '(function() {\\n var fill;\\n\\n fill = function*(container, liquid) {\\n if (liquid == null) {\\n liquid = \"coffee\";\\n }\\n return \"Filling the \" + container + \" with \" + liquid + \"...\";\\n };\\n\\n}).call(this);\\n'\n\nTypeScript Transpiler\n---------------------\n\nThe TypeScript compiler can be used through the\n``dukpy.typescript_compile`` function:\n\n.. code:: python\n\n >>> import dukpy\n >>> dukpy.typescript_compile('''\n ... class Greeter {\n ... constructor(public greeting: string) { }\n ... greet() {\n ... return \"