Good day!
I'm writing a little tool that builds a GUI for my data-aware app.
The basic idea is to get a module containing a model description (sqla/elixir
entities) as an input, and to present the user with a list of available classes (inherited from Entity()
) and their fields (inherited from Field()
) from this module.
The pyclbr module is fine for getting classes and their methods, but it can't read other class-members. I know about __dict__
and inspect module, but the problem is they require instantiation of a class in question, and that is kind of wrong in this context. So, is there another way ?
I really don't want to parse modules as text. :)