ctypesgen is a pure-python ctypes wrapper generator. It can also output JSON, which can be used with Mork, which generates bindings for Lua, using the alien module (which binds libffi to Lua).