As I see it you have three main options when it comes to registering all your classes.
- After you did
from . import TestModulein__init__.pyyou can callTestModule.register()andTestModule.unregister()in the register/unregister function in__init__.py - You can import all the classes into
__init__.py, put them into oneclassestuple and then register them the way you are doing it already.from . TestModule import EmptyClass, TestClasscan be used to import these classes. - Use my
auto_load.pythat can do all the class registration for you. However it would be good if you could get this working without it just for the purpose of learning how it works. You can find it here. Make sure to also read the limitations of that script.