This works fine for creating the index, but opening the database later fails:
File "lib/python2.7/site-packages/CodernityDB/database.py", line 203, in _read_index_single
ind_obj = globals()_class
TypeError: init() takes at least 5 arguments (3 given)

That method allows us to open your index code without having it in the scope (you don't have to add index code every time when you want to use CodernityDB). But it has some disadvantages also. The most obvious one is that what you experienced. You just can't add more custom arguments to init to your custom index code, because it will crash.

That's one of methods that you can try. What might work in your case is also to create indexes names in smart way, let's say my_index__x then during that open_index you can detect it's name (self.name) and parse it and fetch from that name x value (you said that your indexes are mostly for "if x in data").