Transcrypt


NameTranscrypt JSON
Version 3.9.3 PyPI version JSON
download
home_pagehttps://www.transcrypt.org
SummaryPython to JavaScript transpiler, supporting multiple inheritance and generating lean, highly readable code
upload_time2024-07-28 04:03:23
maintainerNone
docs_urlNone
authorJacques de Hooge
requires_pythonNone
licenseApache 2.0
keywords python javascript transpiler compiler browser web multiple inheritance transcrypt django flask react
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            .. figure:: https://www.transcrypt.org/illustrations/ruler_banner2.png
    :alt: Logo
    :target: https://www.transcrypt.org
        
Python in the browser, precompiled for speed: https://www.transcrypt.org
=========================================================================

- Precompiled into highly readable, efficient JavaScript, downloads kB's rather than MB's
- Multiple inheritance, optional operator overloading, metaclasses, async/await, properties, decorators, hierarchical modules etc.
- Seamless integration with the universe of high-quality web-oriented JavaScript libraries, rather than the desktop-oriented Python ones
- Pure Python 3.9 syntax, using Python's native parser
- Debug directly from Python sourcecode, through integrated sourcemaps
- Generates JavaScript for humans, resembling the Python source line by line, optionally annotated with source line numbers
- Lightning fast JavaScript 6 code: call caching, for-loop optimization, in-line JavaScript etc.
- Integrated static type checking and minification at the tip of a command line switch
- Also runs on top of node.js
- Extensive documentation with many code examples
- Apache 2.0 license
- Pip-install and go!

Latest stable release: Berlin
=============================

`>>> GET STARTED! <https://www.transcrypt.org/#hello>`__
========================================================

Thanks to everyone who contributed!

Readability
===========

As can be seen below, there's a simple parallel between the Python and the JavaScript code.
In combination with the use of sourcemaps, this enables efficient debugging.
Also, code can be tested from the command prompt using stubs.

.. figure:: https://www.transcrypt.org/illustrations/class_compare.png
    :alt: Screenshot of Python versus JavaScript code
    
    **Classic OO with multiple inheritance in JavaScript**

Main differences with CPython
=============================

- Web batteries: Seamless access to any existing JavaScript library has been favored over inclusion of many Python libraries in the distribution. There are some exceptions to this rule, e.g. math, cmath, random, itertools, re, time, datetime and turtle, and some more may follow, but in general the accent is on libraries that are relevant in the browser.
- No eval and exec of Python code. This is again part of the concept. Transcrypt code is compiled, optimized and minified in advance to warant fast page loads. In this respect its design goal is fundamentally different from tools that compile on the fly in the browser. Transcrypt is targeted towards building professional, extensive, real world web applications that load and run as fast as their JavaScript counterparts, but offers Pythonically clean, modular structure and maintainability.

License
=======

Copyright 2014 - 2023 Jacques de Hooge, GEATEC engineering, www.geatec.com

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

    https://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

How to contribute
=================

Transcrypt started out as a personal repo, owned by Jacques de Hooge.
As the project caught on and the number of people contributing issues, ideas and code grew,
the repo was transferred to the QQuick organisation, to be able to form a developer team on GitHub.
Then more recently, to insure its continued development, the GitHub repo has been moved to `TranscryptOrg <https://github.com/TranscryptOrg>`_, where Transcrypt and related projects can be more centrally located.

There was also a clear message in this: Transcrypt isn't owned by anyone in particular.
It is the collective property of everyone using it or contributing to it.
At the same time the need was felt to keep a very firm grip on code quality, especially of the core.

Everything under ../transcrypt/modules/org/transcrypt plus the file ../transcrypt/\_\_main\_\_.py is considered to be part of Transcrypt's core.
A major design goal is to keep the core small and fast. This means that some CPython facilities were deliberately left out or simplified.
Core development is still mainly done by Jacques, but with the input of many great ideas submitted as issues.
If you want to improve something in the core, this is best initiated by first opening an issue for it.
Opening a pull request directly can lead to disappointment, although all effort is made to take good ideas seriously.

All other parts of Transcrypt are referred to as periphery.
While a good quality pull request for the periphery stands a reasonable chance of being accepted,
still it is wise to start an issue beforehand, allowing coordination and preventing waste of effort.

A special place is taken by implementing standard libraries. While Transcrypt mostly relies on browser-centric JavaScript libraries,
availability of a limited number of standard libraries will help acceptance by Python programmers. So you're most welcome to make a contribution here.
The design goal again is: better 90% complete, fast, small, and reliable, than 100% complete, slow, bulky and buggy.
If you contribute a library, please also contribute an autotest (see docs) and some documentation for it.
The supported platforms are Windows and Linux (and, with that, OSX).

While being open and respectful to any good ideas, the final say as to what gets in and what doesn't, is with Jacques.
So this is a dictatorial rather than a democratic project.
Being a sailer himself, Jacques values the notion of having one captain on a ship.
The captain doesn't own the ship, but he serves the passengers by consulting with the crew and plotting one stable course.

Another possibility to contribute libraries to Transcrypt is by submitting them as separate packages to PyPi.
In that case be sure to add the keyword Transcrypt to allow people to find your package.
Making your package pip-installable will also help it to catch on.
Contributing packages via PyPi of course means total freedom for the developer.

Deployment testing
========================
The full set of testlets is described in the documentation and comes with the distribution.
Each release is preceded by at least the following tests:

- The automated back to back test described above, not only on Linux but also on Windows and, in case of relevant issues, on OSX.
- Automated compilation of the manual tests, human exercising of the resulting applications and a visual check of the results.
- Automated compilation of the demo's, human exercising of the resulting applications and a visual check of the results.
- A documentation build, followed by a visual sample check.

What's new in the latest commits
================================

- Code generator adapted to Python 3.9 parser
- Updated README and packaging configuration

Known bugs in latest commits
============================

None

Other packages you might like
=============================

- Numscrypt - port of a microscopic part of NumPy to Transcrypt, using JavaScript typed arrays: https://github.com/QQuick/Numscrypt
- SimPyLC - PLC simulator with Arduino code generation: https://github.com/QQuick/SimPyLC

            

Raw data

            {
    "_id": null,
    "home_page": "https://www.transcrypt.org",
    "name": "Transcrypt",
    "maintainer": null,
    "docs_url": null,
    "requires_python": null,
    "maintainer_email": null,
    "keywords": "python, javascript, transpiler, compiler, browser, web, multiple inheritance, transcrypt, django, flask, react",
    "author": "Jacques de Hooge",
    "author_email": "info@transcrypt.org",
    "download_url": "https://files.pythonhosted.org/packages/96/ff/e5e7b8edae47ab7ba2e0f2358cca2e7321621132b68f87436a66688a66d3/transcrypt-3.9.3.tar.gz",
    "platform": null,
    "description": ".. figure:: https://www.transcrypt.org/illustrations/ruler_banner2.png\n    :alt: Logo\n    :target: https://www.transcrypt.org\n        \nPython in the browser, precompiled for speed: https://www.transcrypt.org\n=========================================================================\n\n- Precompiled into highly readable, efficient JavaScript, downloads kB's rather than MB's\n- Multiple inheritance, optional operator overloading, metaclasses, async/await, properties, decorators, hierarchical modules etc.\n- Seamless integration with the universe of high-quality web-oriented JavaScript libraries, rather than the desktop-oriented Python ones\n- Pure Python 3.9 syntax, using Python's native parser\n- Debug directly from Python sourcecode, through integrated sourcemaps\n- Generates JavaScript for humans, resembling the Python source line by line, optionally annotated with source line numbers\n- Lightning fast JavaScript 6 code: call caching, for-loop optimization, in-line JavaScript etc.\n- Integrated static type checking and minification at the tip of a command line switch\n- Also runs on top of node.js\n- Extensive documentation with many code examples\n- Apache 2.0 license\n- Pip-install and go!\n\nLatest stable release: Berlin\n=============================\n\n`>>> GET STARTED! <https://www.transcrypt.org/#hello>`__\n========================================================\n\nThanks to everyone who contributed!\n\nReadability\n===========\n\nAs can be seen below, there's a simple parallel between the Python and the JavaScript code.\nIn combination with the use of sourcemaps, this enables efficient debugging.\nAlso, code can be tested from the command prompt using stubs.\n\n.. figure:: https://www.transcrypt.org/illustrations/class_compare.png\n    :alt: Screenshot of Python versus JavaScript code\n    \n    **Classic OO with multiple inheritance in JavaScript**\n\nMain differences with CPython\n=============================\n\n- Web batteries: Seamless access to any existing JavaScript library has been favored over inclusion of many Python libraries in the distribution. There are some exceptions to this rule, e.g. math, cmath, random, itertools, re, time, datetime and turtle, and some more may follow, but in general the accent is on libraries that are relevant in the browser.\n- No eval and exec of Python code. This is again part of the concept. Transcrypt code is compiled, optimized and minified in advance to warant fast page loads. In this respect its design goal is fundamentally different from tools that compile on the fly in the browser. Transcrypt is targeted towards building professional, extensive, real world web applications that load and run as fast as their JavaScript counterparts, but offers Pythonically clean, modular structure and maintainability.\n\nLicense\n=======\n\nCopyright 2014 - 2023 Jacques de Hooge, GEATEC engineering, www.geatec.com\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n    https://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n\nHow to contribute\n=================\n\nTranscrypt started out as a personal repo, owned by Jacques de Hooge.\nAs the project caught on and the number of people contributing issues, ideas and code grew,\nthe repo was transferred to the QQuick organisation, to be able to form a developer team on GitHub.\nThen more recently, to insure its continued development, the GitHub repo has been moved to `TranscryptOrg <https://github.com/TranscryptOrg>`_, where Transcrypt and related projects can be more centrally located.\n\nThere was also a clear message in this: Transcrypt isn't owned by anyone in particular.\nIt is the collective property of everyone using it or contributing to it.\nAt the same time the need was felt to keep a very firm grip on code quality, especially of the core.\n\nEverything under ../transcrypt/modules/org/transcrypt plus the file ../transcrypt/\\_\\_main\\_\\_.py is considered to be part of Transcrypt's core.\nA major design goal is to keep the core small and fast. This means that some CPython facilities were deliberately left out or simplified.\nCore development is still mainly done by Jacques, but with the input of many great ideas submitted as issues.\nIf you want to improve something in the core, this is best initiated by first opening an issue for it.\nOpening a pull request directly can lead to disappointment, although all effort is made to take good ideas seriously.\n\nAll other parts of Transcrypt are referred to as periphery.\nWhile a good quality pull request for the periphery stands a reasonable chance of being accepted,\nstill it is wise to start an issue beforehand, allowing coordination and preventing waste of effort.\n\nA special place is taken by implementing standard libraries. While Transcrypt mostly relies on browser-centric JavaScript libraries,\navailability of a limited number of standard libraries will help acceptance by Python programmers. So you're most welcome to make a contribution here.\nThe design goal again is: better 90% complete, fast, small, and reliable, than 100% complete, slow, bulky and buggy.\nIf you contribute a library, please also contribute an autotest (see docs) and some documentation for it.\nThe supported platforms are Windows and Linux (and, with that, OSX).\n\nWhile being open and respectful to any good ideas, the final say as to what gets in and what doesn't, is with Jacques.\nSo this is a dictatorial rather than a democratic project.\nBeing a sailer himself, Jacques values the notion of having one captain on a ship.\nThe captain doesn't own the ship, but he serves the passengers by consulting with the crew and plotting one stable course.\n\nAnother possibility to contribute libraries to Transcrypt is by submitting them as separate packages to PyPi.\nIn that case be sure to add the keyword Transcrypt to allow people to find your package.\nMaking your package pip-installable will also help it to catch on.\nContributing packages via PyPi of course means total freedom for the developer.\n\nDeployment testing\n========================\nThe full set of testlets is described in the documentation and comes with the distribution.\nEach release is preceded by at least the following tests:\n\n- The automated back to back test described above, not only on Linux but also on Windows and, in case of relevant issues, on OSX.\n- Automated compilation of the manual tests, human exercising of the resulting applications and a visual check of the results.\n- Automated compilation of the demo's, human exercising of the resulting applications and a visual check of the results.\n- A documentation build, followed by a visual sample check.\n\nWhat's new in the latest commits\n================================\n\n- Code generator adapted to Python 3.9 parser\n- Updated README and packaging configuration\n\nKnown bugs in latest commits\n============================\n\nNone\n\nOther packages you might like\n=============================\n\n- Numscrypt - port of a microscopic part of NumPy to Transcrypt, using JavaScript typed arrays: https://github.com/QQuick/Numscrypt\n- SimPyLC - PLC simulator with Arduino code generation: https://github.com/QQuick/SimPyLC\n",
    "bugtrack_url": null,
    "license": "Apache 2.0",
    "summary": "Python to JavaScript transpiler, supporting multiple inheritance and generating lean, highly readable code",
    "version": "3.9.3",
    "project_urls": {
        "Homepage": "https://www.transcrypt.org"
    },
    "split_keywords": [
        "python",
        " javascript",
        " transpiler",
        " compiler",
        " browser",
        " web",
        " multiple inheritance",
        " transcrypt",
        " django",
        " flask",
        " react"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "469256b6844a5cc2bc744fe45bd402690c8590b2da3c7c7829dd8bdb7d1baa0b",
                "md5": "b0cd8eebe6e772390871ce66d2b468ce",
                "sha256": "04d7b92b9035be11c4aa7b4d6a3a97459bcb957d893b4d1cfda6e5472b7bdcfe"
            },
            "downloads": -1,
            "filename": "Transcrypt-3.9.3-py2.py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "b0cd8eebe6e772390871ce66d2b468ce",
            "packagetype": "bdist_wheel",
            "python_version": "py2.py3",
            "requires_python": null,
            "size": 19385459,
            "upload_time": "2024-07-28T04:03:12",
            "upload_time_iso_8601": "2024-07-28T04:03:12.897865Z",
            "url": "https://files.pythonhosted.org/packages/46/92/56b6844a5cc2bc744fe45bd402690c8590b2da3c7c7829dd8bdb7d1baa0b/Transcrypt-3.9.3-py2.py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "96ffe5e7b8edae47ab7ba2e0f2358cca2e7321621132b68f87436a66688a66d3",
                "md5": "bd84f69f0efc10b2f3cace724402e3ca",
                "sha256": "cd25cc6017a88a178816773c668f3cb73cd6026e168cb57be23c746fdb1d0920"
            },
            "downloads": -1,
            "filename": "transcrypt-3.9.3.tar.gz",
            "has_sig": false,
            "md5_digest": "bd84f69f0efc10b2f3cace724402e3ca",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 21349366,
            "upload_time": "2024-07-28T04:03:23",
            "upload_time_iso_8601": "2024-07-28T04:03:23.095931Z",
            "url": "https://files.pythonhosted.org/packages/96/ff/e5e7b8edae47ab7ba2e0f2358cca2e7321621132b68f87436a66688a66d3/transcrypt-3.9.3.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-07-28 04:03:23",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "lcname": "transcrypt"
}
        
Elapsed time: 0.27407s