Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

ecmapy

This project is intended to explore a proof-of-concept for how one might develop a (partial) bi-directional transpiler for python <-> JavaScript that would allow developers to use some of the most convenient syntactic features of modern JS in python (such as optional chaining, nullish coalescing, etc.), and also enable Javascript developers to use various python patterns (e.g. list comprehension). This project is in the exploratory phase. Functionality will be added incrementally, with the initial goal of enabling the optional chaining syntax (foo?.bar?.baz()) in python, and designing a transpilation workflow. Guiding constraints include:

  • Avoid the need for wrapper functions like:
class MyClass:
    def __init__(self):
        self.foo = "bar"

c = MyClass()
x = c.foo # x = "bar"
x = c.baz # raises `AttributeError`
# JAVASCRIPT WRAPPER APPROACH ❌
to_js("x = c?.baz") # x = None

Instead, prefer:

c = MyClass()
x = c.foo # x = "bar"
# TRANSPILE THE BELOW TO SOMETHING LIKE:
x = c.foo # x = "bar"
x = c?.baz # x = c.get("baz", None); x = None
x = c.baz # raises `AtrributeError
  • Enable the ecmapy code to work with linters, type-checkers, and IDE extensions.

  • Enable seamless integration with existing CI/CD workflows.

License

This project is licensed under the GNU Affero General Public License (AGPLv3).

Release files for ecmapy 0.0.1.dev0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for ecmapy 0.0.1.dev0
File Size Uploaded
ecmapy-0.0.1.dev0.tar.gz 26.2 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for ecmapy 0.0.1.dev0
File Interpreter ABI Platform
ecmapy-0.0.1.dev0-py3-none-any.whl Python 3 none any Details

Total release size: 52.7 kB

Release files / ecmapy-0.0.1.dev0.tar.gz

Download URL ecmapy-0.0.1.dev0.tar.gz
Size 26.2 kB
Tags Source
SHA-256 checksum
How to use checksums
7e3985b655db19948dc48430e4efdab8cd32f22a869e34684f3bbadba34d48cf
BLAKE2b-256 checksum
How to use checksums
b4b2ac0b4da2e759e76d2db02d6d1e05d6f46de8e50f5dcbdfaa91a854ff8bbc
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.12.8

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Feb 13, 2025.

Transparency log

Release files / ecmapy-0.0.1.dev0-py3-none-any.whl

Download URL ecmapy-0.0.1.dev0-py3-none-any.whl
Size 26.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
b2921298dd9d48cdef3d052656d8120fa9d79ff6b6e97b5d368f7d5a31f0a6b9
BLAKE2b-256 checksum
How to use checksums
6b197a4c90f5ebe6de10ce8b0887e8330389d65089808e233e238804ea3d7f28
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.12.8

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Feb 13, 2025.

Transparency log

Release history Release notifications | RSS feed

This release

0.0.1.dev0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page