Common Lisp for Python, powered by Embeddable Common Lisp (ECL) running as a packaged WebAssembly runtime.
eclpy exposes a cl4py-inspired Lisp API for evaluating Lisp forms,
calling functions, accessing packages, and converting common Lisp values to
Python values. Normal users can start with eclpy.syntax; heavier users can
drop down to explicit SExp trees or the raw EclSession bridge.
The bridge is bidirectional: Lisp code can evaluate Python through
ecl-python:py-eval / py-exec, and the automatically loaded PY DSL
(eclpy/python.lisp) gives Lisp code a Pythonic object protocol (imports,
attributes, calls, operators, context managers) on top of that bridge.
After the package is published to PyPI:
pip install eclpyThe wheel is expected to include the ECL WebAssembly runtime, so normal users do not need a local ECL installation or an Emscripten toolchain.
import eclpy
import eclpy.syntax as L
with eclpy.Lisp() as lisp:
assert lisp.eval(L.expr(("+", 1, 1))) == 2See docs/quickstart.md for the syntax API, the command-line REPL, Pythonic package proxies, and the full public API.
- docs/quickstart.md -- install, quick start, CLI, Pythonic proxies, strings/symbols/lists, public API.
- docs/api-guide.md -- strict
SExpevaluation, references, conses, evaluating Python from Lisp, thePYDSL, low-level session API, errors, security model. - docs/python-in-lisp.md -- automatically loaded
PYDSL for calling Python from Lisp. - docs/asdf.md -- loading ASDF and local source systems.
- docs/swank.md -- SWANK/SLIME server and its WASM sandbox limitations.
- docs/architecture.md -- module layering and the Python<->Lisp value protocol.
- docs/development.md -- running tests, building the WASM runtime, building wheels, and building Sphinx docs.
- docs/api-reference.md -- Sphinx autodoc page for the Python modules.
- docs/lisp-source.md -- Sphinx literalinclude page for
the bundled Lisp runtime and
PYDSL source.
Build the Sphinx site locally with:
uv run sphinx-build -b html docs docs/_build/htmlCopyright (c) 2026 Masaya Taniguchi masaya.taniguchi@tani.cc.
This project uses the same license terms as ECL: GNU LGPL 2.1 or later. See
LICENSE for eclpy and ECL copyright notices and COPYING for the LGPL 2.1
text.