lupa
Python wrapper around Lua and LuaJIT
Install
lupa on PyPI
pip
pip install lupauv
uv add lupapoetry
poetry add lupaPackage facts
| License | MIT style (permissive) |
| Python support | supports the current Python release (>=3.8) |
| Install friction | medium — platform-specific wheel |
| Runtime dependencies | none |
| Maintenance | actively maintained — 120 days since the last release |
| Last repo commit | |
| First released | |
| Popularity | one of the top 1,000 most-downloaded packages on PyPI (30-day window, as of 2026-08-13) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-13) |
Evidence: lupa-2.8-cp310-abi3-win32.whl; lupa-2.8-cp310-abi3-win_arm64.whl; lupa-2.8-cp310-cp310-macosx_11_0_arm64.whl; lupa-2.8-cp310-cp310-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl; lupa-2.8-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl; lupa-2.8-cp310-cp310-win_amd64.whl; lupa-2.8-cp311-cp311-macosx_11_0_arm64.whl; lupa-2.8-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl; lupa-2.8-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl; lupa-2.8-cp311-cp311-win_amd64.whl; lupa-2.8-cp312-abi3-macosx_10_13_x86_64.whl; lupa-2.8-cp312-abi3-manylinux2010_i686.manylinux_2_12_i686.manylinux_2_28_i686.whl; lupa-2.8-cp312-abi3-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl; lupa-2.8-cp312-abi3-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl; lupa-2.8-cp312-abi3-manylinux_2_34_riscv64.manylinux_2_39_riscv64.whl; lupa-2.8-cp312-abi3-musllinux_1_2_aarch64.whl; lupa-2.8-cp312-abi3-musllinux_1_2_armv7l.whl; lupa-2.8-cp312-abi3-musllinux_1_2_i686.whl; lupa-2.8-cp312-abi3-musllinux_1_2_ppc64le.whl; lupa-2.8-cp312-abi3-musllinux_1_2_riscv64.whl
About lupa
from the package's own PyPI description — quoted content, verbatim
Lupa
.. image:: logo/logo-220x200.png
Lupa integrates the runtimes of Lua_ or LuaJIT2_ into CPython. It is a partial rewrite of LunaticPython_ in Cython_ with some additional features such as proper coroutine support.
.. _Lua: http://lua.org/ .. _LuaJIT2: http://luajit.org/ .. _LunaticPython: http://labix.org/lunatic-python .. _Cython: http://cython.org
For questions not answered here, please contact the Lupa mailing list_.
.. _Lupa mailing list: http://www.freelists.org/list/lupa-dev
.. contents:: :local:
Major features
-
separate Lua runtime states through a
LuaRuntimeclass -
Python coroutine wrapper for Lua coroutines
-
iteration support for Python objects in Lua and Lua objects in Python
-
proper encoding and decoding of strings (configurable per runtime, UTF-8 by default)
-
frees the GIL and supports threading in separate runtimes when calling into Lua
-
tested with Python 3.8 and later
-
ships with Lua 5.1, 5.2, 5.3, 5.4 and 5.5 as well as LuaJIT 2.0 and 2.1 on systems that support it.
-
easy to hack on and extend as it is written in Cython, not C
Why the...
Read as markdown · JSON record · Source repository · Homepage
AI interpretation — verify before relying
AI-generated interpretation of the package facts above; every digit, version, license, or vulnerability id it cites is grounded in the facts already shown on this page
Lupa integrates Lua or LuaJIT runtimes into CPython, allowing you to execute Lua code from Python and call Python functions from Lua with full bidirectional interoperability and proper coroutine support.
Installation requires compilation of native C extensions (medium friction), but the package ships pre-built wheels for Python 3.8+ across Windows, macOS, and Linux architectures including ARM variants. The project is actively maintained with recent commits and a stable release cadence, reducing long-term support risk.
Licensed under MIT style terms (permissive), which allows commercial and private use with minimal restrictions, making it suitable for most deployment scenarios.
Usage
pip install lupa
from lupa import LuaRuntime
lua = LuaRuntime()
result = lua.eval('1+1')
print(result) # 2
Requires Python 3.8 or later; native extension compilation may require a C compiler and development headers on systems without pre-built wheels.
Verdict: Lupa is a mature, actively maintained bridge for embedding Lua/LuaJIT in Python applications. With permissive MIT licensing, no known vulnerabilities, and broad platform support via pre-built wheels, it is suitable for production use where you need Lua's speed for compute-intensive tasks alongside Python's ecosystem. Medium install friction is typical for compiled extensions and is mitigated by comprehensive wheel coverage.
Needs verification
- Whether the embedded Lua versions (5.1–5.5 and LuaJIT 2.0–2.1) carry any known security advisories not yet indexed in OSV.
- Performance characteristics and memory overhead when running large numbers of concurrent Lua runtimes.
- Compatibility with async/await patterns in modern Python applications.
Similar packages
permissive · top 1,000 on PyPI
ijsonpermissive · top 1,000 on PyPI
preshedpermissive · top 1,000 on PyPI
greenletpermissive · top 100 on PyPI
more-itertoolspermissive · top 1,000 on PyPI
cyclerpermissive · top 1,000 on PyPI
pgvectorpermissive · top 1,000 on PyPI
snowballstemmerpermissive · top 1,000 on PyPI
msgpackpermissive · top 1,000 on PyPI
orjsoncopyleft · top 1,000 on PyPI