--- id: lupa version: "2.8" license: MIT style license_treatment: permissive maintenance: active --- # lupa — Python wrapper around Lua and LuaJIT License: permissive · Maintenance: active · Popularity: top 1,000 on PyPI ## Install pip install lupa uv add lupa poetry add lupa ## Description 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 ``LuaRuntime`` class * 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... ## AI interpretation — verify before relying 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. 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. [View on SkillFed](https://skillfed.io/packages/lupa) · [View on PyPI](https://pypi.org/project/lupa/)