0

How can we query a python module for its structured content outline (blueprint table of contents)? Kindly share if there is any method, module or trick by when we can analyze and query a python module for information like following in one go?

  • classes available in modules (with inheritance info if any)
  • attributes available per class
  • methods provided by each class in the module

I came across python __dict__ and dir() which in general provides the information BUT doesn't clearly distinguish between the methods and class attributes.

Wondering if there is a utility, way to have a clean, readable and pythonic style list of all classes with their attributes and methods for any given python module?

Additional information like local, global for attributes (if available) might also be appreciated.

avimehenwal
  • 1,502
  • 3
  • 21
  • 30

0 Answers0