Skip to main content

Python wrapper around Lua and LuaJIT

Project description

Lupa

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.

For questions not answered here, please contact the Lupa mailing list.

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 2.6/3.2 and later

  • written for LuaJIT2 (tested with LuaJIT 2.0.2), but also works with the normal Lua interpreter (5.1 and 5.2)

  • easy to hack on and extend as it is written in Cython, not C

Why the name?

In Latin, “lupa” is a female wolf, as elegant and wild as it sounds. If you don’t like this kind of straight forward allegory to an endangered species, you may also happily assume it’s just an amalgamation of the phonetic sounds that start the words “Lua” and “Python”, two from each to keep the balance.

Why use it?

It complements Python very well. Lua is a language as dynamic as Python, but LuaJIT compiles it to very fast machine code, sometimes faster than many statically compiled languages for computational code. The language runtime is very small and carefully designed for embedding. The complete binary module of Lupa, including a statically linked LuaJIT2 runtime, only weighs some 700KB on a 64 bit machine. With standard Lua 5.1, it’s less than 400KB.

However, the Lua ecosystem lacks many of the batteries that Python readily includes, either directly in its standard library or as third party packages. This makes real-world Lua applications harder to write than equivalent Python applications. Lua is therefore not commonly used as primary language for large applications, but it makes for a fast, high-level and resource-friendly backup language inside of Python when raw speed is required and the edit-compile-run cycle of binary extension modules is too heavy and too static for agile development or hot-deployment.

Lupa is a very fast and thin wrapper around Lua or LuaJIT. It makes it easy to write dynamic Lua code that accompanies dynamic Python code by switching between the two languages at runtime, based on the tradeoff between simplicity and speed.

Examples

>>> import lupa
>>> from lupa import LuaRuntime
>>> lua = LuaRuntime(unpack_returned_tuples=True)

>>> lua.eval('1+1')
2

>>> lua_func = lua.eval('function(f, n) return f(n) end')

>>> def py_add1(n): return n+1
>>> lua_func(py_add1, 2)
3

>>> lua.eval('python.eval(" 2 ** 2 ")') == 4
True
>>> lua.eval('python.builtins.str(4)') == '4'
True

The function lua_type(obj) can be used to find out the type of a wrapped Lua object in Python code, as provided by Lua’s type() function:

>>> lupa.lua_type(lua_func)
'function'
>>> lupa.lua_type(lua.eval('{}'))
'table'

To help in distinguishing between wrapped Lua objects and normal Python objects, it returns None for the latter:

>>> lupa.lua_type(123) is None
True
>>> lupa.lua_type('abc') is None
True
>>> lupa.lua_type({}) is None
True

Note the flag unpack_returned_tuples=True that is passed to create the Lua runtime. It is new in Lupa 0.21 and changes the behaviour of tuples that get returned by Python functions. With this flag, they explode into separate Lua values:

>>> lua.execute('a,b,c = python.eval("(1,2)")')
>>> g = lua.globals()
>>> g.a
1
>>> g.b
2
>>> g.c is None
True

When set to False, functions that return a tuple pass it through to the Lua code:

>>> non_explode_lua = lupa.LuaRuntime(unpack_returned_tuples=False)
>>> non_explode_lua.execute('a,b,c = python.eval("(1,2)")')
>>> g = non_explode_lua.globals()
>>> g.a
(1, 2)
>>> g.b is None
True
>>> g.c is None
True

Since the default behaviour (to not explode tuples) might change in a later version of Lupa, it is best to always pass this flag explicitly.

Python objects in Lua

Python objects are either converted when passed into Lua (e.g. numbers and strings) or passed as wrapped object references.

>>> wrapped_type = lua.globals().type     # Lua's own type() function
>>> wrapped_type(1) == 'number'
True
>>> wrapped_type('abc') == 'string'
True

Wrapped Lua objects get unwrapped when they are passed back into Lua, and arbitrary Python objects get wrapped in different ways:

>>> wrapped_type(wrapped_type) == 'function'  # unwrapped Lua function
True
>>> wrapped_type(len) == 'userdata'       # wrapped Python function
True
>>> wrapped_type([]) == 'userdata'        # wrapped Python object
True

Lua supports two main protocols on objects: calling and indexing. It does not distinguish between attribute access and item access like Python does, so the Lua operations obj[x] and obj.x both map to indexing. To decide which Python protocol to use for Lua wrapped objects, Lupa employs a simple heuristic.

Pratically all Python objects allow attribute access, so if the object also has a __getitem__ method, it is preferred when turning it into an indexable Lua object. Otherwise, it becomes a simple object that uses attribute access for indexing from inside Lua.

Obviously, this heuristic will fail to provide the required behaviour in many cases, e.g. when attribute access is required to an object that happens to support item access. To be explicit about the protocol that should be used, Lupa provides the helper functions as_attrgetter() and as_itemgetter() that restrict the view on an object to a certain protocol, both from Python and from inside Lua:

>>> lua_func = lua.eval('function(obj) return obj["get"] end')
>>> d = {'get' : 'value'}

>>> value = lua_func(d)
>>> value == d['get'] == 'value'
True

>>> value = lua_func( lupa.as_itemgetter(d) )
>>> value == d['get'] == 'value'
True

>>> dict_get = lua_func( lupa.as_attrgetter(d) )
>>> dict_get == d.get
True
>>> dict_get('get') == d.get('get') == 'value'
True

>>> lua_func = lua.eval(
...     'function(obj) return python.as_attrgetter(obj)["get"] end')
>>> dict_get = lua_func(d)
>>> dict_get('get') == d.get('get') == 'value'
True

Note that unlike Lua function objects, callable Python objects support indexing in Lua:

>>> def py_func(): pass
>>> py_func.ATTR = 2

>>> lua_func = lua.eval('function(obj) return obj.ATTR end')
>>> lua_func(py_func)
2
>>> lua_func = lua.eval(
...     'function(obj) return python.as_attrgetter(obj).ATTR end')
>>> lua_func(py_func)
2
>>> lua_func = lua.eval(
...     'function(obj) return python.as_attrgetter(obj)["ATTR"] end')
>>> lua_func(py_func)
2

Iteration in Lua

Iteration over Python objects from Lua’s for-loop is fully supported. However, Python iterables need to be converted using one of the utility functions which are described here. This is similar to the functions like pairs() in Lua.

To iterate over a plain Python iterable, use the python.iter() function. For example, you can manually copy a Python list into a Lua table like this:

>>> lua_copy = lua.eval('''
...     function(L)
...         local t, i = {}, 1
...         for item in python.iter(L) do
...             t[i] = item
...             i = i + 1
...         end
...         return t
...     end
... ''')

>>> table = lua_copy([1,2,3,4])
>>> len(table)
4
>>> table[1]   # Lua indexing
1

Python’s enumerate() function is also supported, so the above could be simplified to:

>>> lua_copy = lua.eval('''
...     function(L)
...         local t = {}
...         for index, item in python.enumerate(L) do
...             t[ index+1 ] = item
...         end
...         return t
...     end
... ''')

>>> table = lua_copy([1,2,3,4])
>>> len(table)
4
>>> table[1]   # Lua indexing
1

For iterators that return tuples, such as dict.iteritems(), it is convenient to use the special python.iterex() function that automatically explodes the tuple items into separate Lua arguments:

>>> lua_copy = lua.eval('''
...     function(d)
...         local t = {}
...         for key, value in python.iterex(d.items()) do
...             t[key] = value
...         end
...         return t
...     end
... ''')

>>> d = dict(a=1, b=2, c=3)
>>> table = lua_copy( lupa.as_attrgetter(d) )
>>> table['b']
2

Note that accessing the d.items method from Lua requires passing the dict as attrgetter. Otherwise, attribute access in Lua would use the getitem protocol of Python dicts and look up d['items'] instead.

None vs. nil

While None in Python and nil in Lua differ in their semantics, they usually just mean the same thing: no value. Lupa therefore tries to map one directly to the other whenever possible:

>>> lua.eval('nil') is None
True
>>> is_nil = lua.eval('function(x) return x == nil end')
>>> is_nil(None)
True

The only place where this cannot work is during iteration, because Lua considers a nil value the termination marker of iterators. Therefore, Lupa special cases None values here and replaces them by a constant python.none instead of returning nil:

>>> _ = lua.require("table")
>>> func = lua.eval('''
...     function(items)
...         local t = {}
...         for value in python.iter(items) do
...             table.insert(t, value == python.none)
...         end
...         return t
...     end
... ''')

>>> items = [1, None ,2]
>>> list(func(items).values())
[False, True, False]

Lupa avoids this value escaping whenever it’s obviously not necessary. Thus, when unpacking tuples during iteration, only the first value will be subject to python.none replacement, as Lua does not look at the other items for loop termination anymore. And on enumerate() iteration, the first value is known to be always a number and never None, so no replacement is needed.

>>> func = lua.eval('''
...     function(items)
...         for a, b, c, d in python.iterex(items) do
...             return {a == python.none, a == nil,   -->  a == python.none
...                     b == python.none, b == nil,   -->  b == nil
...                     c == python.none, c == nil,   -->  c == nil
...                     d == python.none, d == nil}   -->  d == nil ...
...         end
...     end
... ''')

>>> items = [(None, None, None, None)]
>>> list(func(items).values())
[True, False, False, True, False, True, False, True]

>>> items = [(None, None)]   # note: no values for c/d => nil in Lua
>>> list(func(items).values())
[True, False, False, True, False, True, False, True]

Note that this behaviour changed in Lupa 1.0. Previously, the python.none replacement was done in more places, which made it not always very predictable.

Lua Tables

Lua tables mimic Python’s mapping protocol. For the special case of array tables, Lua automatically inserts integer indices as keys into the table. Therefore, indexing starts from 1 as in Lua instead of 0 as in Python. For the same reason, negative indexing does not work. It is best to think of Lua tables as mappings rather than arrays, even for plain array tables.

>>> table = lua.eval('{10,20,30,40}')
>>> table[1]
10
>>> table[4]
40
>>> list(table)
[1, 2, 3, 4]
>>> list(table.values())
[10, 20, 30, 40]
>>> len(table)
4

>>> mapping = lua.eval('{ [1] = -1 }')
>>> list(mapping)
[1]

>>> mapping = lua.eval('{ [20] = -20; [3] = -3 }')
>>> mapping[20]
-20
>>> mapping[3]
-3
>>> sorted(mapping.values())
[-20, -3]
>>> sorted(mapping.items())
[(3, -3), (20, -20)]

>>> mapping[-3] = 3     # -3 used as key, not index!
>>> mapping[-3]
3
>>> sorted(mapping)
[-3, 3, 20]
>>> sorted(mapping.items())
[(-3, 3), (3, -3), (20, -20)]

To simplify the table creation from Python, the LuaRuntime comes with a helper method that creates a Lua table from Python arguments:

>>> t = lua.table(1, 2, 3, 4)
>>> lupa.lua_type(t)
'table'
>>> list(t)
[1, 2, 3, 4]

>>> t = lua.table(1, 2, 3, 4, a=1, b=2)
>>> t[3]
3
>>> t['b']
2

A second helper method, .table_from(), is new in Lupa 1.1 and accepts any number of mappings and sequences/iterables as arguments. It collects all values and key-value pairs and builds a single Lua table from them. Any keys that appear in multiple mappings get overwritten with their last value (going from left to right).

>>> t = lua.table_from([1, 2, 3], {'a': 1, 'b': 2}, (4, 5), {'b': 42})
>>> t['b']
42
>>> t[5]
5

A lookup of non-existing keys or indices returns None (actually nil inside of Lua). A lookup is therefore more similar to the .get() method of Python dicts than to a mapping lookup in Python.

>>> table[1000000] is None
True
>>> table['no such key'] is None
True
>>> mapping['no such key'] is None
True

Note that len() does the right thing for array tables but does not work on mappings:

>>> len(table)
4
>>> len(mapping)
0

This is because len() is based on the # (length) operator in Lua and because of the way Lua defines the length of a table. Remember that unset table indices always return nil, including indices outside of the table size. Thus, Lua basically looks for an index that returns nil and returns the index before that. This works well for array tables that do not contain nil values, gives barely predictable results for tables with ‘holes’ and does not work at all for mapping tables. For tables with both sequential and mapping content, this ignores the mapping part completely.

Note that it is best not to rely on the behaviour of len() for mappings. It might change in a later version of Lupa.

Similar to the table interface provided by Lua, Lupa also supports attribute access to table members:

>>> table = lua.eval('{ a=1, b=2 }')
>>> table.a, table.b
(1, 2)
>>> table.a == table['a']
True

This enables access to Lua ‘methods’ that are associated with a table, as used by the standard library modules:

>>> string = lua.eval('string')    # get the 'string' library table
>>> print( string.lower('A') )
a

Python Callables

As discussed earlier, Lupa allows Lua scripts to call Python functions and methods:

>>> def add_one(num):
...     return num + 1
>>> lua_func = lua.eval('function(num, py_func) return py_func(num) end')
>>> lua_func(48, add_one)
49

>>> class MyClass():
...     def my_method(self):
...         return 345
>>> obj = MyClass()
>>> lua_func = lua.eval('function(py_obj) return py_obj:my_method() end')
>>> lua_func(obj)
345

Lua doesn’t have a dedicated syntax for named arguments, so by default Python callables can only be called using positional arguments.

A common pattern for implementing named arguments in Lua is passing them in a table as the first and only function argument. See http://lua-users.org/wiki/NamedParameters for more details. Lupa supports this pattern by providing two decorators: lupa.unpacks_lua_table for Python functions and lupa.unpacks_lua_table_method for methods of Python objects.

Python functions/methods wrapped in these decorators can be called from Lua code as func(foo, bar), func{foo=foo, bar=bar} or func{foo, bar=bar}. Example:

>>> @lupa.unpacks_lua_table
... def add(a, b):
...     return a + b
>>> lua_func = lua.eval('function(a, b, py_func) return py_func{a=a, b=b} end')
>>> lua_func(5, 6, add)
11
>>> lua_func = lua.eval('function(a, b, py_func) return py_func{a, b=b} end')
>>> lua_func(5, 6, add)
11

If you do not control the function implementation, you can also just manually wrap a callable object when passing it into Lupa:

>>> import operator
>>> wrapped_py_add = lupa.unpacks_lua_table(operator.add)

>>> lua_func = lua.eval('function(a, b, py_func) return py_func{a, b} end')
>>> lua_func(5, 6, wrapped_py_add)
11

There are some limitations:

  1. Avoid using lupa.unpacks_lua_table and lupa.unpacks_lua_table_method for functions where the first argument can be a Lua table. In this case py_func{foo=bar} (which is the same as py_func({foo=bar}) in Lua) becomes ambiguous: it could mean either “call py_func with a named foo argument” or “call py_func with a positional {foo=bar} argument”.

  2. One should be careful with passing nil values to callables wrapped in lupa.unpacks_lua_table or lupa.unpacks_lua_table_method decorators. Depending on the context, passing nil as a parameter can mean either “omit a parameter” or “pass None”. This even depends on the Lua version.

    It is possible to use python.none instead of nil to pass None values robustly. Arguments with nil values are also fine when standard braces func(a, b, c) syntax is used.

Because of these limitations lupa doesn’t enable named arguments for all Python callables automatically. Decorators allow to enable named arguments on a per-callable basis.

Lua Coroutines

The next is an example of Lua coroutines. A wrapped Lua coroutine behaves exactly like a Python coroutine. It needs to get created at the beginning, either by using the .coroutine() method of a function or by creating it in Lua code. Then, values can be sent into it using the .send() method or it can be iterated over. Note that the .throw() method is not supported, though.

>>> lua_code = '''\
...     function(N)
...         for i=0,N do
...             coroutine.yield( i%2 )
...         end
...     end
... '''
>>> lua = LuaRuntime()
>>> f = lua.eval(lua_code)

>>> gen = f.coroutine(4)
>>> list(enumerate(gen))
[(0, 0), (1, 1), (2, 0), (3, 1), (4, 0)]

An example where values are passed into the coroutine using its .send() method:

>>> lua_code = '''\
...     function()
...         local t,i = {},0
...         local value = coroutine.yield()
...         while value do
...             t[i] = value
...             i = i + 1
...             value = coroutine.yield()
...         end
...         return t
...     end
... '''
>>> f = lua.eval(lua_code)

>>> co = f.coroutine()   # create coroutine
>>> co.send(None)        # start coroutine (stops at first yield)

>>> for i in range(3):
...     co.send(i*2)

>>> mapping = co.send(None)   # loop termination signal
>>> sorted(mapping.items())
[(0, 0), (1, 2), (2, 4)]

It also works to create coroutines in Lua and to pass them back into Python space:

>>> lua_code = '''\
...   function f(N)
...         for i=0,N do
...             coroutine.yield( i%2 )
...         end
...   end ;
...   co1 = coroutine.create(f) ;
...   co2 = coroutine.create(f) ;
...
...   status, first_result = coroutine.resume(co2, 2) ;   -- starting!
...
...   return f, co1, co2, status, first_result
... '''

>>> lua = LuaRuntime()
>>> f, co, lua_gen, status, first_result = lua.execute(lua_code)

>>> # a running coroutine:

>>> status
True
>>> first_result
0
>>> list(lua_gen)
[1, 0]
>>> list(lua_gen)
[]

>>> # an uninitialised coroutine:

>>> gen = co(4)
>>> list(enumerate(gen))
[(0, 0), (1, 1), (2, 0), (3, 1), (4, 0)]

>>> gen = co(2)
>>> list(enumerate(gen))
[(0, 0), (1, 1), (2, 0)]

>>> # a plain function:

>>> gen = f.coroutine(4)
>>> list(enumerate(gen))
[(0, 0), (1, 1), (2, 0), (3, 1), (4, 0)]

Threading

The following example calculates a mandelbrot image in parallel threads and displays the result in PIL. It is based on a benchmark implementation for the Computer Language Benchmarks Game.

lua_code = '''\
    function(N, i, total)
        local char, unpack = string.char, table.unpack
        local result = ""
        local M, ba, bb, buf = 2/N, 2^(N%8+1)-1, 2^(8-N%8), {}
        local start_line, end_line = N/total * (i-1), N/total * i - 1
        for y=start_line,end_line do
            local Ci, b, p = y*M-1, 1, 0
            for x=0,N-1 do
                local Cr = x*M-1.5
                local Zr, Zi, Zrq, Ziq = Cr, Ci, Cr*Cr, Ci*Ci
                b = b + b
                for i=1,49 do
                    Zi = Zr*Zi*2 + Ci
                    Zr = Zrq-Ziq + Cr
                    Ziq = Zi*Zi
                    Zrq = Zr*Zr
                    if Zrq+Ziq > 4.0 then b = b + 1; break; end
                end
                if b >= 256 then p = p + 1; buf[p] = 511 - b; b = 1; end
            end
            if b ~= 1 then p = p + 1; buf[p] = (ba-b)*bb; end
            result = result .. char(unpack(buf, 1, p))
        end
        return result
    end
'''

image_size = 1280   # == 1280 x 1280
thread_count = 8

from lupa import LuaRuntime
lua_funcs = [ LuaRuntime(encoding=None).eval(lua_code)
              for _ in range(thread_count) ]

results = [None] * thread_count
def mandelbrot(i, lua_func):
    results[i] = lua_func(image_size, i+1, thread_count)

import threading
threads = [ threading.Thread(target=mandelbrot, args=(i,lua_func))
            for i, lua_func in enumerate(lua_funcs) ]
for thread in threads:
    thread.start()
for thread in threads:
    thread.join()

result_buffer = b''.join(results)

# use Pillow to display the image
from PIL import Image
image = Image.fromstring('1', (image_size, image_size), result_buffer)
image.show()

Note how the example creates a separate LuaRuntime for each thread to enable parallel execution. Each LuaRuntime is protected by a global lock that prevents concurrent access to it. The low memory footprint of Lua makes it reasonable to use multiple runtimes, but this setup also means that values cannot easily be exchanged between threads inside of Lua. They must either get copied through Python space (passing table references will not work, either) or use some Lua mechanism for explicit communication, such as a pipe or some kind of shared memory setup.

Restricting Lua access to Python objects

Lupa provides a simple mechanism to control access to Python objects. Each attribute access can be passed through a filter function as follows:

>>> def filter_attribute_access(obj, attr_name, is_setting):
...     if isinstance(attr_name, unicode):
...         if not attr_name.startswith('_'):
...             return attr_name
...     raise AttributeError('access denied')

>>> lua = lupa.LuaRuntime(
...           register_eval=False,
...           attribute_filter=filter_attribute_access)
>>> func = lua.eval('function(x) return x.__class__ end')
>>> func(lua)
Traceback (most recent call last):
 ...
AttributeError: access denied

The is_setting flag indicates whether the attribute is being read or set.

Note that the attributes of Python functions provide access to the current globals() and therefore to the builtins etc. If you want to safely restrict access to a known set of Python objects, it is best to work with a whitelist of safe attribute names. One way to do that could be to use a well selected list of dedicated API objects that you provide to Lua code, and to only allow Python attribute access to the set of public attribute/method names of these objects.

Since Lupa 1.0, you can alternatively provide dedicated getter and setter function implementations for a LuaRuntime:

>>> def getter(obj, attr_name):
...     if attr_name == 'yes':
...         return getattr(obj, attr_name)
...     raise AttributeError(
...         'not allowed to read attribute "%s"' % attr_name)

>>> def setter(obj, attr_name, value):
...     if attr_name == 'put':
...         setattr(obj, attr_name, value)
...         return
...     raise AttributeError(
...         'not allowed to write attribute "%s"' % attr_name)

>>> class X(object):
...     yes = 123
...     put = 'abc'
...     noway = 2.1

>>> x = X()

>>> lua = lupa.LuaRuntime(attribute_handlers=(getter, setter))
>>> func = lua.eval('function(x) return x.yes end')
>>> func(x)  # getting 'yes'
123
>>> func = lua.eval('function(x) x.put = "ABC"; end')
>>> func(x)  # setting 'put'
>>> print(x.put)
ABC
>>> func = lua.eval('function(x) x.noway = 42; end')
>>> func(x)  # setting 'noway'
Traceback (most recent call last):
 ...
AttributeError: not allowed to write attribute "noway"

Importing Lua binary modules

This will usually work as is, but here are the details, in case anything goes wrong for you.

To use binary modules in Lua, you need to compile them against the header files of the LuaJIT sources that you used to build Lupa, but do not link them against the LuaJIT library.

Furthermore, CPython needs to enable global symbol visibility for shared libraries before loading the Lupa module. This can be done by calling sys.setdlopenflags(flag_values). Importing the lupa module will automatically try to set up the correct dlopen flags if it can find the platform specific DLFCN Python module that defines the necessary flag constants. In that case, using binary modules in Lua should work out of the box.

If this setup fails, however, you have to set the flags manually. When using the above configuration call, the argument flag_values must represent the sum of your system’s values for RTLD_NEW and RTLD_GLOBAL. If RTLD_NEW is 2 and RTLD_GLOBAL is 256, you need to call sys.setdlopenflags(258).

Assuming that the Lua luaposix (posix) module is available, the following should work on a Linux system:

>>> import sys
>>> orig_dlflags = sys.getdlopenflags()
>>> sys.setdlopenflags(258)
>>> import lupa
>>> sys.setdlopenflags(orig_dlflags)

>>> lua = lupa.LuaRuntime()
>>> posix_module = lua.require('posix')     # doctest: +SKIP

Installing lupa

Building with LuaJIT2

  1. Download and unpack lupa

    http://pypi.python.org/pypi/lupa

  2. Download LuaJIT2

    http://luajit.org/download.html

  3. Unpack the archive into the lupa base directory, e.g.:

    .../lupa-0.1/LuaJIT-2.0.2
  4. Build LuaJIT:

    cd LuaJIT-2.0.2
    make
    cd ..

    If you need specific C compiler flags, pass them to make as follows:

    make CFLAGS="..."

    For trickier target platforms like Windows and MacOS-X, please see the official installation instructions for LuaJIT.

    NOTE: When building on Windows, make sure that lua51.lib is made in addition to lua51.dll. The MSVC build produces this file, MinGW does NOT.

  5. Build lupa:

    python setup.py install

    Or any other distutils target of your choice, such as build or one of the bdist targets. See the distutils documentation for help, also the hints on building extension modules.

    Note that on 64bit MacOS-X installations, the following additional compiler flags are reportedly required due to the embedded LuaJIT:

    -pagezero_size 10000 -image_base 100000000

    You can find additional installation hints for MacOS-X in this somewhat unclear blog post, which may or may not tell you at which point in the installation process to provide these flags.

    Also, on 64bit MacOS-X, you will typically have to set the environment variable ARCHFLAGS to make sure it only builds for your system instead of trying to generate a fat binary with both 32bit and 64bit support:

    export ARCHFLAGS="-arch x86_64"

    Note that this applies to both LuaJIT and Lupa, so make sure you try a clean build of everything if you forgot to set it initially.

Building with Lua 5.1

Reportedly, it also works to use Lupa with the standard (non-JIT) Lua runtime. To that end, install Lua 5.1 instead of LuaJIT2, including any development packages (header files etc.).

On systems that use the “pkg-config” configuration mechanism, Lupa’s setup.py will pick up either LuaJIT2 or Lua automatically, with a preference for LuaJIT2 if it is found. Pass the --no-luajit option to the setup.py script if you have both installed but do not want to use LuaJIT2.

On other systems, you may have to supply the build parameters externally, e.g. using environment variables or by changing the setup.py script manually. Pass the --no-luajit option to the setup.py script in order to ignore the failure you get when neither LuaJIT2 nor Lua are found automatically.

For further information, read this mailing list post:

http://article.gmane.org/gmane.comp.python.lupa.devel/31

Installing lupa from packages

Debian/Ubuntu + Lua 5.2

  1. Install Lua 5.2 development package:

    $ apt-get install liblua5.2-dev
  2. Install lupa:

    $ pip install lupa

Debian/Ubuntu + LuaJIT2

  1. Install LuaJIT2 development package:

    $ apt-get install libluajit-5.1-dev
  2. Install lupa:

    $ pip install lupa

Depending on OS version, you might get an older LuaJIT2 version.

OS X + Lua 5.2 + Homebrew

  1. Install Lua:

    $ brew install lua
  2. Install pkg-config:

    $ brew install pkg-config
  3. Install lupa:

    $ pip install lupa

Lupa change log

1.9 (2019-12-21)

  • Build against Lua 5.3 if available.

  • Use Lua 5.3.5 in binary wheels and as bundled Lua.

  • GH#129: Fix Lua module loading in Python 3.x.

  • GH#126: Fix build on Linux systems that install Lua as “lua52” package.

  • Built with Cython 0.29.14 for better Py3.8 compatibility.

1.8 (2019-02-01)

  • GH#107: Fix a deprecated import in Py3.

  • Built with Cython 0.29.3 for better Py3.7 compatibility.

1.7 (2018-08-06)

  • GH#103: Provide wheels for MS Windows and fix MSVC build on Py2.7.

1.6 (2017-12-15)

  • GH#95: Improved compatibility with Lua 5.3. (patch by TitanSnow)

1.5 (2017-09-16)

  • GH#93: New method LuaRuntime.compile() to compile Lua code without executing it. (patch by TitanSnow)

  • GH#91: Lua 5.3 is bundled in the source distribution to simplify one-shot installs. (patch by TitanSnow)

  • GH#87: Lua stack trace is included in output in debug mode. (patch by aaiyer)

  • GH#78: Allow Lua code to intercept Python exceptions. (patch by Sergey Dobrov)

  • Built with Cython 0.26.1.

1.4 (2016-12-10)

  • GH#82: Lua coroutines were using the wrong runtime state (patch by Sergey Dobrov)

  • GH#81: copy locally provided Lua DLL into installed package on Windows (patch by Gareth Coles)

  • built with Cython 0.25.2

1.3 (2016-04-12)

  • GH#70: eval() and execute() accept optional positional arguments (patch by John Vandenberg)

  • GH#65: calling str() on a Python object from Lua could fail if the LuaRuntime is set up without auto-encoding (patch by Mikhail Korobov)

  • GH#63: attribute/keyword names were not properly encoded if the LuaRuntime is set up without auto-encoding (patch by Mikhail Korobov)

  • built with Cython 0.24

1.2 (2015-10-10)

  • callbacks returned from Lua coroutines were incorrectly mixing coroutine state with global Lua state (patch by Mikhail Korobov)

  • availability of python.builtins in Lua can be disabled via LuaRuntime option.

  • built with Cython 0.23.4

1.1 (2014-11-21)

  • new module function lupa.lua_type() that returns the Lua type of a wrapped object as string, or None for normal Python objects

  • new helper method LuaRuntime.table_from(...) that creates a Lua table from one or more Python mappings and/or sequences

  • new lupa.unpacks_lua_table and lupa.unpacks_lua_table_method decorators to allow calling Python functions from Lua using named arguments

  • fix a hang on shutdown where the LuaRuntime failed to deallocate due to reference cycles

  • Lupa now plays more nicely with other Lua extensions that create userdata objects

1.0.1 (2014-10-11)

  • fix a crash when requesting attributes of wrapped Lua coroutine objects

  • looking up attributes on Lua objects that do not support it now always raises an AttributeError instead of sometimes raising a TypeError depending on the attribute name

1.0 (2014-09-28)

  • NOTE: this release includes the major backwards incompatible changes listed below. It is believed that they simplify the interaction between Python code and Lua code by more strongly following idiomatic Lua on the Lua side.

    • Instead of passing a wrapped python.none object into Lua, None return values are now mapped to nil, making them more straight forward to handle in Lua code. This makes the behaviour more consistent, as it was previously somewhat arbitrary where none could appear and where a nil value was used. The only remaining exception is during iteration, where the first returned value must not be nil in Lua, or otherwise the loop terminates prematurely. To prevent this, any None value that the iterator returns, or any first item in exploded tuples that is None, is still mapped to python.none. Any further values returned in the same iteration will be mapped to nil if they are None, not to none. This means that only the first argument needs to be manually checked for this special case. For the enumerate() iterator, the counter is never None and thus the following unpacked items will never be mapped to python.none.

    • When unpack_returned_tuples=True, iteration now also unpacks tuple values, including enumerate() iteration, which yields a flat sequence of counter and unpacked values.

    • When calling bound Python methods from Lua as “obj:meth()”, Lupa now prevents Python from prepending the self argument a second time, so that the Python method is now called as “obj.meth()”. Previously, it was called as “obj.meth(obj)”. Note that this can be undesired when the object itself is explicitly passed as first argument from Lua, e.g. when calling “func(obj)” where “func” is “obj.meth”, but these constellations should be rare. As a work-around for this case, user code can wrap the bound method in another function so that the final call comes from Python.

  • garbage collection works for reference cycles that span both runtimes, Python and Lua

  • calling from Python into Lua and back into Python did not clean up the Lua call arguments before the innermost call, so that they could leak into the nested Python call or its return arguments

  • support for Lua 5.2 (in addition to Lua 5.1 and LuaJIT 2.0)

  • Lua tables support Python’s “del” statement for item deletion (patch by Jason Fried)

  • Attribute lookup can use a more fine-grained control mechanism by implementing explicit getter and setter functions for a LuaRuntime (attribute_handlers argument). Patch by Brian Moe.

  • item assignments/lookups on Lua objects from Python no longer special case double underscore names (as opposed to attribute lookups)

0.21 (2014-02-12)

  • some garbage collection issues were cleaned up using new Cython features

  • new LuaRuntime option unpack_returned_tuples which automatically unpacks tuples returned from Python functions into separate Lua objects (instead of returning a single Python tuple object)

  • some internal wrapper classes were removed from the module API

  • Windows build fixes

  • Py3.x build fixes

  • support for building with Lua 5.1 instead of LuaJIT (setup.py –no-luajit)

  • no longer uses Cython by default when building from released sources (pass --with-cython to explicitly request a rebuild)

  • requires Cython 0.20+ when building from unreleased sources

  • built with Cython 0.20.1

0.20 (2011-05-22)

  • fix “deallocating None” crash while iterating over Lua tables in Python code

  • support for filtering attribute access to Python objects for Lua code

  • fix: setting source encoding for Lua code was broken

0.19 (2011-03-06)

  • fix serious resource leak when creating multiple LuaRuntime instances

  • portability fix for binary module importing

0.18 (2010-11-06)

  • fix iteration by returning Py_None object for None instead of nil, which would terminate the iteration

  • when converting Python values to Lua, represent None as a Py_None object in places where nil has a special meaning, but leave it as nil where it doesn’t hurt

  • support for counter start value in python.enumerate()

  • native implementation for python.enumerate() that is several times faster

  • much faster Lua iteration over Python objects

0.17 (2010-11-05)

  • new helper function python.enumerate() in Lua that returns a Lua iterator for a Python object and adds the 0-based index to each item.

  • new helper function python.iterex() in Lua that returns a Lua iterator for a Python object and unpacks any tuples that the iterator yields.

  • new helper function python.iter() in Lua that returns a Lua iterator for a Python object.

  • reestablished the python.as_function() helper function for Lua code as it can be needed in cases where Lua cannot determine how to run a Python function.

0.16 (2010-09-03)

  • dropped python.as_function() helper function for Lua as all Python objects are callable from Lua now (potentially raising a TypeError at call time if they are not callable)

  • fix regression in 0.13 and later where ordinary Lua functions failed to print due to an accidentally used meta table

  • fix crash when calling str() on wrapped Lua objects without metatable

0.15 (2010-09-02)

  • support for loading binary Lua modules on systems that support it

0.14 (2010-08-31)

  • relicensed to the MIT license used by LuaJIT2 to simplify licensing considerations

0.13.1 (2010-08-30)

  • fix Cython generated C file using Cython 0.13

0.13 (2010-08-29)

  • fixed undefined behaviour on str(lua_object) when the object’s __tostring() meta method fails

  • removed redundant “error:” prefix from LuaError messages

  • access to Python’s python.builtins from Lua code

  • more generic wrapping rules for Python objects based on supported protocols (callable, getitem, getattr)

  • new helper functions as_attrgetter() and as_itemgetter() to specify the Python object protocol used by Lua indexing when wrapping Python objects in Python code

  • new helper functions python.as_attrgetter(), python.as_itemgetter() and python.as_function() to specify the Python object protocol used by Lua indexing of Python objects in Lua code

  • item and attribute access for Python objects from Lua code

0.12 (2010-08-16)

  • fix Lua stack leak during table iteration

  • fix lost Lua object reference after iteration

0.11 (2010-08-07)

  • error reporting on Lua syntax errors failed to clean up the stack so that errors could leak into the next Lua run

  • Lua error messages were not properly decoded

0.10 (2010-07-27)

0.9 (2010-07-23)

  • fixed Python special double-underscore method access on LuaObject instances

  • Lua coroutine support through dedicated wrapper classes, including Python iteration support. In Python space, Lua coroutines behave exactly like Python generators.

0.8 (2010-07-21)

  • support for returning multiple values from Lua evaluation

  • repr() support for Lua objects

  • LuaRuntime.table() method for creating Lua tables from Python space

  • encoding fix for str(LuaObject)

0.7 (2010-07-18)

  • LuaRuntime.require() and LuaRuntime.globals() methods

  • renamed LuaRuntime.run() to LuaRuntime.execute()

  • support for len(), setattr() and subscripting of Lua objects

  • provide all built-in Lua libraries in LuaRuntime, including support for library loading

  • fixed a thread locking issue

  • fix passing Lua objects back into the runtime from Python space

0.6 (2010-07-18)

  • Python iteration support for Lua objects (e.g. tables)

  • threading fixes

  • fix compile warnings

0.5 (2010-07-14)

  • explicit encoding options per LuaRuntime instance to decode/encode strings and Lua code

0.4 (2010-07-14)

  • attribute read access on Lua objects, e.g. to read Lua table values from Python

  • str() on Lua objects

  • include .hg repository in source downloads

  • added missing files to source distribution

0.3 (2010-07-13)

  • fix several threading issues

  • safely free the GIL when calling into Lua

0.2 (2010-07-13)

  • propagate Python exceptions through Lua calls

0.1 (2010-07-12)

  • first public release

License

Lupa

Copyright (c) 2010-2017 Stefan Behnel. All rights reserved.

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Lua

(See https://www.lua.org/license.html)

Copyright © 1994–2017 Lua.org, PUC-Rio.

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

lupa-1.9.tar.gz (1.0 MB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

lupa-1.9-cp39-cp39-manylinux1_x86_64.whl (281.7 kB view details)

Uploaded CPython 3.9

lupa-1.9-cp39-cp39-manylinux1_i686.whl (279.5 kB view details)

Uploaded CPython 3.9

lupa-1.9-cp38-cp38-win_amd64.whl (258.7 kB view details)

Uploaded CPython 3.8Windows x86-64

lupa-1.9-cp38-cp38-win32.whl (203.4 kB view details)

Uploaded CPython 3.8Windows x86

lupa-1.9-cp38-cp38-manylinux1_x86_64.whl (293.7 kB view details)

Uploaded CPython 3.8

lupa-1.9-cp38-cp38-manylinux1_i686.whl (281.1 kB view details)

Uploaded CPython 3.8

lupa-1.9-cp37-cp37m-win_amd64.whl (255.9 kB view details)

Uploaded CPython 3.7mWindows x86-64

lupa-1.9-cp37-cp37m-win32.whl (200.5 kB view details)

Uploaded CPython 3.7mWindows x86

lupa-1.9-cp37-cp37m-manylinux1_x86_64.whl (300.4 kB view details)

Uploaded CPython 3.7m

lupa-1.9-cp37-cp37m-manylinux1_i686.whl (285.8 kB view details)

Uploaded CPython 3.7m

lupa-1.9-cp36-cp36m-win_amd64.whl (255.4 kB view details)

Uploaded CPython 3.6mWindows x86-64

lupa-1.9-cp36-cp36m-win32.whl (200.4 kB view details)

Uploaded CPython 3.6mWindows x86

lupa-1.9-cp36-cp36m-manylinux1_x86_64.whl (299.4 kB view details)

Uploaded CPython 3.6m

lupa-1.9-cp36-cp36m-manylinux1_i686.whl (286.5 kB view details)

Uploaded CPython 3.6m

lupa-1.9-cp35-cp35m-win_amd64.whl (254.2 kB view details)

Uploaded CPython 3.5mWindows x86-64

lupa-1.9-cp35-cp35m-win32.whl (199.3 kB view details)

Uploaded CPython 3.5mWindows x86

lupa-1.9-cp35-cp35m-manylinux1_x86_64.whl (296.2 kB view details)

Uploaded CPython 3.5m

lupa-1.9-cp35-cp35m-manylinux1_i686.whl (284.5 kB view details)

Uploaded CPython 3.5m

lupa-1.9-cp34-cp34m-manylinux1_x86_64.whl (296.0 kB view details)

Uploaded CPython 3.4m

lupa-1.9-cp34-cp34m-manylinux1_i686.whl (282.3 kB view details)

Uploaded CPython 3.4m

lupa-1.9-cp27-cp27mu-manylinux1_x86_64.whl (292.7 kB view details)

Uploaded CPython 2.7mu

lupa-1.9-cp27-cp27mu-manylinux1_i686.whl (279.4 kB view details)

Uploaded CPython 2.7mu

lupa-1.9-cp27-cp27m-win_amd64.whl (216.1 kB view details)

Uploaded CPython 2.7mWindows x86-64

lupa-1.9-cp27-cp27m-win32.whl (177.2 kB view details)

Uploaded CPython 2.7mWindows x86

lupa-1.9-cp27-cp27m-manylinux1_x86_64.whl (292.6 kB view details)

Uploaded CPython 2.7m

lupa-1.9-cp27-cp27m-manylinux1_i686.whl (279.4 kB view details)

Uploaded CPython 2.7m

File details

Details for the file lupa-1.9.tar.gz.

File metadata

  • Download URL: lupa-1.9.tar.gz
  • Upload date:
  • Size: 1.0 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.20.1 setuptools/40.6.2 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.7.1

File hashes

Hashes for lupa-1.9.tar.gz
Algorithm Hash digest
SHA256 a3e11d806ca02cf72e490ec1974f8b96a14a1091895c9dccebe0b8d52dd82e8e
MD5 540ddad3dc253f7a6c6d17b11860275b
BLAKE2b-256 e44485d9a962dd135c74d82edec606691f1f4db664f11fe8393eef4146bb98d7

See more details on using hashes here.

File details

Details for the file lupa-1.9-cp39-cp39-manylinux1_x86_64.whl.

File metadata

  • Download URL: lupa-1.9-cp39-cp39-manylinux1_x86_64.whl
  • Upload date:
  • Size: 281.7 kB
  • Tags: CPython 3.9
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.20.1 setuptools/40.6.2 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.7.1

File hashes

Hashes for lupa-1.9-cp39-cp39-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 7df1f565b92f124e45093dde8d262489a67f40eddd7a65035e6bc3b982be234f
MD5 d279d61d296103ad13490e3e56e9ac0f
BLAKE2b-256 f5876c23a8cceb15cc26beaae2ebba3a283b7b207ff4cba775c9b2b9fae63e2c

See more details on using hashes here.

File details

Details for the file lupa-1.9-cp39-cp39-manylinux1_i686.whl.

File metadata

  • Download URL: lupa-1.9-cp39-cp39-manylinux1_i686.whl
  • Upload date:
  • Size: 279.5 kB
  • Tags: CPython 3.9
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.20.1 setuptools/40.6.2 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.7.1

File hashes

Hashes for lupa-1.9-cp39-cp39-manylinux1_i686.whl
Algorithm Hash digest
SHA256 5e08a97a4ae46592f1fd04f2f97d9fdeb6a34dbcdc0a049e1ca5929e6902c558
MD5 b3e54b993c8a85b09881d3fa8db4143c
BLAKE2b-256 60f647759f11bb4f651043ee4867a20c884beed9b43b716288fc87aa709a72f6

See more details on using hashes here.

File details

Details for the file lupa-1.9-cp38-cp38-win_amd64.whl.

File metadata

  • Download URL: lupa-1.9-cp38-cp38-win_amd64.whl
  • Upload date:
  • Size: 258.7 kB
  • Tags: CPython 3.8, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.20.1 setuptools/40.6.2 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.7.1

File hashes

Hashes for lupa-1.9-cp38-cp38-win_amd64.whl
Algorithm Hash digest
SHA256 09d6c45eb3b9407588c5a168e3371b629e75c5822050e9feff393601709bd0d7
MD5 25c713bf109e270b734f632ee5e0e5ab
BLAKE2b-256 34e39ddf011d75d68e37253c6a37aa40718e83ddfaf3020cbcf4a1af3e4a6193

See more details on using hashes here.

File details

Details for the file lupa-1.9-cp38-cp38-win32.whl.

File metadata

  • Download URL: lupa-1.9-cp38-cp38-win32.whl
  • Upload date:
  • Size: 203.4 kB
  • Tags: CPython 3.8, Windows x86
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.20.1 setuptools/40.6.2 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.7.1

File hashes

Hashes for lupa-1.9-cp38-cp38-win32.whl
Algorithm Hash digest
SHA256 162f6793b2ad40d25710b9998bce2eeb3938efbb4dbad49fb8c5082d214237b3
MD5 418451bb44c4aa77c1510beab391c944
BLAKE2b-256 11386bc2cf029537767dd970e63a7ef1050ac62512aa3975e90ef2d17bfff3a4

See more details on using hashes here.

File details

Details for the file lupa-1.9-cp38-cp38-manylinux1_x86_64.whl.

File metadata

  • Download URL: lupa-1.9-cp38-cp38-manylinux1_x86_64.whl
  • Upload date:
  • Size: 293.7 kB
  • Tags: CPython 3.8
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.20.1 setuptools/40.6.2 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.7.1

File hashes

Hashes for lupa-1.9-cp38-cp38-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 2551ae82ea0f90383fb153ecd29a1a166e2552e10b7a712ff047cad88062ad37
MD5 a84760714a35bb4f2b221f1d38d51465
BLAKE2b-256 2bf66e22a48efa7f085bc6fc9d3350623ef71227fad0193c65b48a246f224fec

See more details on using hashes here.

File details

Details for the file lupa-1.9-cp38-cp38-manylinux1_i686.whl.

File metadata

  • Download URL: lupa-1.9-cp38-cp38-manylinux1_i686.whl
  • Upload date:
  • Size: 281.1 kB
  • Tags: CPython 3.8
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.20.1 setuptools/40.6.2 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.7.1

File hashes

Hashes for lupa-1.9-cp38-cp38-manylinux1_i686.whl
Algorithm Hash digest
SHA256 7619fbd85d9ece1d48fb72bb7389e98d878621d2da0b7622c99066671f294b65
MD5 aab98f912f91dca790d605ac27c8f54d
BLAKE2b-256 ebe8ce719e2b7472dbf2ed573d5ca31c8d9af3b878eebca94b6847dca14dfd0c

See more details on using hashes here.

File details

Details for the file lupa-1.9-cp37-cp37m-win_amd64.whl.

File metadata

  • Download URL: lupa-1.9-cp37-cp37m-win_amd64.whl
  • Upload date:
  • Size: 255.9 kB
  • Tags: CPython 3.7m, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.20.1 setuptools/40.6.2 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.7.1

File hashes

Hashes for lupa-1.9-cp37-cp37m-win_amd64.whl
Algorithm Hash digest
SHA256 42285855c022b36ed3f0c5d19d0ef27b1648e0683838cddaf9191acad4d6616c
MD5 550c280aff6be1873bfaa75d2f10b8d1
BLAKE2b-256 6d902edc115574160ca63c7ce6c30d989ec4997ffcde16ddf8d08ef6a5746398

See more details on using hashes here.

File details

Details for the file lupa-1.9-cp37-cp37m-win32.whl.

File metadata

  • Download URL: lupa-1.9-cp37-cp37m-win32.whl
  • Upload date:
  • Size: 200.5 kB
  • Tags: CPython 3.7m, Windows x86
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.20.1 setuptools/40.6.2 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.7.1

File hashes

Hashes for lupa-1.9-cp37-cp37m-win32.whl
Algorithm Hash digest
SHA256 fe1db400b471a0854fe364b63d7836973ee0d897a76628340d1721b6b4b89ddc
MD5 f6c7223b89d0b2d139d2d0dbd06b1f49
BLAKE2b-256 4e23e8aff72c473a20cd36031fddcb4119a3d29237b8a5c0b78acec26629851f

See more details on using hashes here.

File details

Details for the file lupa-1.9-cp37-cp37m-manylinux1_x86_64.whl.

File metadata

  • Download URL: lupa-1.9-cp37-cp37m-manylinux1_x86_64.whl
  • Upload date:
  • Size: 300.4 kB
  • Tags: CPython 3.7m
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.20.1 setuptools/40.6.2 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.7.1

File hashes

Hashes for lupa-1.9-cp37-cp37m-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 c57cda6ba3dc55ddd8b6c566c4f315d6152307aee23f212aa06c5e653cde4f13
MD5 d8665e9a62df1bbaa5fbde46a1c89c2f
BLAKE2b-256 22385e35df44f58b6492a9aa2fc643a800e4982f6d1388d7d03b4f3ef111f4e5

See more details on using hashes here.

File details

Details for the file lupa-1.9-cp37-cp37m-manylinux1_i686.whl.

File metadata

  • Download URL: lupa-1.9-cp37-cp37m-manylinux1_i686.whl
  • Upload date:
  • Size: 285.8 kB
  • Tags: CPython 3.7m
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.20.1 setuptools/40.6.2 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.7.1

File hashes

Hashes for lupa-1.9-cp37-cp37m-manylinux1_i686.whl
Algorithm Hash digest
SHA256 acaecd88ce6b708fbaf20b76b4d35ecb2817159f8a939b0a73d2aa840dfef850
MD5 760c5a6e3b96fe969567b4d7878e8860
BLAKE2b-256 0a42b3d8d563783733a901d62d8dbbfc04b7f3fde0d9fcfb90d0c246877b746b

See more details on using hashes here.

File details

Details for the file lupa-1.9-cp36-cp36m-win_amd64.whl.

File metadata

  • Download URL: lupa-1.9-cp36-cp36m-win_amd64.whl
  • Upload date:
  • Size: 255.4 kB
  • Tags: CPython 3.6m, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.20.1 setuptools/40.6.2 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.7.1

File hashes

Hashes for lupa-1.9-cp36-cp36m-win_amd64.whl
Algorithm Hash digest
SHA256 a7d7761b007fbf8b524291ac42bccc32b072102e7f7e547783a5a5ded66a0c39
MD5 815d66970c8fee34be7618b5573fd247
BLAKE2b-256 f3bf7392a669d025db9bcf3f6038b43cfb34c1ef7f3776c9eee4f3841b0d7ebb

See more details on using hashes here.

File details

Details for the file lupa-1.9-cp36-cp36m-win32.whl.

File metadata

  • Download URL: lupa-1.9-cp36-cp36m-win32.whl
  • Upload date:
  • Size: 200.4 kB
  • Tags: CPython 3.6m, Windows x86
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.20.1 setuptools/40.6.2 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.7.1

File hashes

Hashes for lupa-1.9-cp36-cp36m-win32.whl
Algorithm Hash digest
SHA256 d497f4727060a1daf8603e86cb731f587c38ab9a3451cd3c9c70f27859cbd3bd
MD5 30fb761baf364b5a85d9348940d6f1c8
BLAKE2b-256 375cbcfff5c8087c1ad5a159ce6abf03b945d5bbbb0ba185e960972d85df2b02

See more details on using hashes here.

File details

Details for the file lupa-1.9-cp36-cp36m-manylinux1_x86_64.whl.

File metadata

  • Download URL: lupa-1.9-cp36-cp36m-manylinux1_x86_64.whl
  • Upload date:
  • Size: 299.4 kB
  • Tags: CPython 3.6m
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.20.1 setuptools/40.6.2 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.7.1

File hashes

Hashes for lupa-1.9-cp36-cp36m-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 9ee2aa3e1e852a2917c5869e8ab69d725407a218d14c4c0c98f4b04b3b2a73a7
MD5 5bdf1fbf1f06e7940f0dd90b161fc9de
BLAKE2b-256 e2ef6496e2152777a29d8505dbcd9c89da780f6190ec32986ad5de145626dedc

See more details on using hashes here.

File details

Details for the file lupa-1.9-cp36-cp36m-manylinux1_i686.whl.

File metadata

  • Download URL: lupa-1.9-cp36-cp36m-manylinux1_i686.whl
  • Upload date:
  • Size: 286.5 kB
  • Tags: CPython 3.6m
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.20.1 setuptools/40.6.2 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.7.1

File hashes

Hashes for lupa-1.9-cp36-cp36m-manylinux1_i686.whl
Algorithm Hash digest
SHA256 abb357c35ad1c1b78b140c8cf1fd678bcaa04bab275c6d55e47a07717138e551
MD5 61b6b1457446f5baf77560d1b12b1e14
BLAKE2b-256 8e92da4081c389bf8fad931263018652ef92b127e3e9a7b211874ff1af313328

See more details on using hashes here.

File details

Details for the file lupa-1.9-cp35-cp35m-win_amd64.whl.

File metadata

  • Download URL: lupa-1.9-cp35-cp35m-win_amd64.whl
  • Upload date:
  • Size: 254.2 kB
  • Tags: CPython 3.5m, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.20.1 setuptools/40.6.2 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.7.1

File hashes

Hashes for lupa-1.9-cp35-cp35m-win_amd64.whl
Algorithm Hash digest
SHA256 49afbeaf90c758512d3c0dea48ac0ecfa460974690cf1af58b95845e6b607c4b
MD5 dfa8c4564f22f5afb7248fb2c431f049
BLAKE2b-256 72f27b13dd29b555997f7c9f95d597dd411508817e18f5c2cc94dffb28811c6d

See more details on using hashes here.

File details

Details for the file lupa-1.9-cp35-cp35m-win32.whl.

File metadata

  • Download URL: lupa-1.9-cp35-cp35m-win32.whl
  • Upload date:
  • Size: 199.3 kB
  • Tags: CPython 3.5m, Windows x86
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.20.1 setuptools/40.6.2 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.7.1

File hashes

Hashes for lupa-1.9-cp35-cp35m-win32.whl
Algorithm Hash digest
SHA256 d3cf15d0c1126373535452bdeb71b016fe970d7e5ee2bc0381df7bd35f99c820
MD5 27cc5db6206c23378b5622b92ab0bd7a
BLAKE2b-256 31e0f39db0f40df31ed0a4aa4d141e79eba4c405c7e405d76b9a15031093288e

See more details on using hashes here.

File details

Details for the file lupa-1.9-cp35-cp35m-manylinux1_x86_64.whl.

File metadata

  • Download URL: lupa-1.9-cp35-cp35m-manylinux1_x86_64.whl
  • Upload date:
  • Size: 296.2 kB
  • Tags: CPython 3.5m
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.20.1 setuptools/40.6.2 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.7.1

File hashes

Hashes for lupa-1.9-cp35-cp35m-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 42fcd8f7b33b84abce90c57aaeb80d9a2ba3c3fdb4cde2fac1c8f9e4eb00d581
MD5 b745a7850aaa1a8feaa395b0d53d8647
BLAKE2b-256 175e769c4aedebc853a61e1161146adb22307dfe0e609cdf3670ca60bbf5fde0

See more details on using hashes here.

File details

Details for the file lupa-1.9-cp35-cp35m-manylinux1_i686.whl.

File metadata

  • Download URL: lupa-1.9-cp35-cp35m-manylinux1_i686.whl
  • Upload date:
  • Size: 284.5 kB
  • Tags: CPython 3.5m
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.20.1 setuptools/40.6.2 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.7.1

File hashes

Hashes for lupa-1.9-cp35-cp35m-manylinux1_i686.whl
Algorithm Hash digest
SHA256 632e7a101c288e05b823c2bae71ac69e0253e7f4120bc39b5dc1fcaf5daba0fb
MD5 185953d7209a12891a544f61343bc52f
BLAKE2b-256 3b64f8d2e0fe60cc67d12d8229115d1844bbab200ad463abdbda3767424f972b

See more details on using hashes here.

File details

Details for the file lupa-1.9-cp34-cp34m-manylinux1_x86_64.whl.

File metadata

  • Download URL: lupa-1.9-cp34-cp34m-manylinux1_x86_64.whl
  • Upload date:
  • Size: 296.0 kB
  • Tags: CPython 3.4m
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.20.1 setuptools/40.6.2 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.7.1

File hashes

Hashes for lupa-1.9-cp34-cp34m-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 517b96b23b4ce19feb54ee93d8c3b94f601a3d46cd1d570ecc5137fc7b9cb68c
MD5 908f22e7dd4e2b1ebb4d68386e616732
BLAKE2b-256 d2318f2fcb236e8def4317440fdf5fffecf6ad569db6447de09df20aa8a727ef

See more details on using hashes here.

File details

Details for the file lupa-1.9-cp34-cp34m-manylinux1_i686.whl.

File metadata

  • Download URL: lupa-1.9-cp34-cp34m-manylinux1_i686.whl
  • Upload date:
  • Size: 282.3 kB
  • Tags: CPython 3.4m
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.20.1 setuptools/40.6.2 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.7.1

File hashes

Hashes for lupa-1.9-cp34-cp34m-manylinux1_i686.whl
Algorithm Hash digest
SHA256 ac7585125af7d7214e1f9dbdda965d7455c5065f71be20374c7900e01c74c05f
MD5 7576becf325cf90228ccccb43a576a6f
BLAKE2b-256 403b3f845bb180c3752e128d5c85e17396aca7e3cb77fe45ce8b8d3e8ca430c4

See more details on using hashes here.

File details

Details for the file lupa-1.9-cp27-cp27mu-manylinux1_x86_64.whl.

File metadata

  • Download URL: lupa-1.9-cp27-cp27mu-manylinux1_x86_64.whl
  • Upload date:
  • Size: 292.7 kB
  • Tags: CPython 2.7mu
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.20.1 setuptools/40.6.2 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.7.1

File hashes

Hashes for lupa-1.9-cp27-cp27mu-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 4badf4180f8fd28e032e8716422b7a0117879569e694b5e2e803a7e39fa85213
MD5 2682197de40c8ecc313ce27458b1f8b8
BLAKE2b-256 92cb8044c04d81aa2241bdc75d99834ec50e48b15dcbecf34c8f07759fa3256b

See more details on using hashes here.

File details

Details for the file lupa-1.9-cp27-cp27mu-manylinux1_i686.whl.

File metadata

  • Download URL: lupa-1.9-cp27-cp27mu-manylinux1_i686.whl
  • Upload date:
  • Size: 279.4 kB
  • Tags: CPython 2.7mu
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.20.1 setuptools/40.6.2 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.7.1

File hashes

Hashes for lupa-1.9-cp27-cp27mu-manylinux1_i686.whl
Algorithm Hash digest
SHA256 ba879849832b87c18dbc471bffc62ff3393b2034a3b103348d620646575f448a
MD5 b7c2237961f8ae6641047ff42fcb69db
BLAKE2b-256 0e240e54ad381e339604b2937eb5ec226454bb65fd2804ce6f1c858f9a7eac2e

See more details on using hashes here.

File details

Details for the file lupa-1.9-cp27-cp27m-win_amd64.whl.

File metadata

  • Download URL: lupa-1.9-cp27-cp27m-win_amd64.whl
  • Upload date:
  • Size: 216.1 kB
  • Tags: CPython 2.7m, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.20.1 setuptools/40.6.2 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.7.1

File hashes

Hashes for lupa-1.9-cp27-cp27m-win_amd64.whl
Algorithm Hash digest
SHA256 6d65bdc251cd12b85487a1790ca1b282288be84555fe11fbe8b4357ae64708f5
MD5 dfa1a1082a8e99d2e6c236a8d6653b68
BLAKE2b-256 b584cf3a11f239f066079f2cb55469cdc0e0a96139a6b02d8a79bc213c4976d8

See more details on using hashes here.

File details

Details for the file lupa-1.9-cp27-cp27m-win32.whl.

File metadata

  • Download URL: lupa-1.9-cp27-cp27m-win32.whl
  • Upload date:
  • Size: 177.2 kB
  • Tags: CPython 2.7m, Windows x86
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.20.1 setuptools/40.6.2 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.7.1

File hashes

Hashes for lupa-1.9-cp27-cp27m-win32.whl
Algorithm Hash digest
SHA256 a690b0bafb7e50dd8ba14a06065059b11f5c8e5961564d5d45de2d9b4a9972b1
MD5 6c709a1c90f367983ea0d6c4378a2ce8
BLAKE2b-256 cdfb5916d1cf20ba9a0b3fb6d8a956fd7261a4e9868b9a8a2efb3bd665ac78ad

See more details on using hashes here.

File details

Details for the file lupa-1.9-cp27-cp27m-manylinux1_x86_64.whl.

File metadata

  • Download URL: lupa-1.9-cp27-cp27m-manylinux1_x86_64.whl
  • Upload date:
  • Size: 292.6 kB
  • Tags: CPython 2.7m
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.20.1 setuptools/40.6.2 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.7.1

File hashes

Hashes for lupa-1.9-cp27-cp27m-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 9823322e60b0d9695754e28f5a17323d111d6951933e958cfe72df9523a39e94
MD5 673bddc01444025867eecd391af7aca8
BLAKE2b-256 4337b7b95aba82dfd773ee9c8ca08719ffa21a71fb2e025b6ad981a7a5fd8e5e

See more details on using hashes here.

File details

Details for the file lupa-1.9-cp27-cp27m-manylinux1_i686.whl.

File metadata

  • Download URL: lupa-1.9-cp27-cp27m-manylinux1_i686.whl
  • Upload date:
  • Size: 279.4 kB
  • Tags: CPython 2.7m
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.20.1 setuptools/40.6.2 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.7.1

File hashes

Hashes for lupa-1.9-cp27-cp27m-manylinux1_i686.whl
Algorithm Hash digest
SHA256 8434fdda16d101c458570d21baf9cd064304b515ed4ef9569949222ba04c3e37
MD5 fb5579ef4c04e585563809d9c4da6552
BLAKE2b-256 6ec9c5f85d6a67ca2511a82baf1a3909e0ea0b51721e2cb2a104d6372cef493e

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page