datapyground.utils.inspect

Provide insights about Python objects.

Functions

datapyground.utils.inspect.get_qualname(obj: Any) str[source]

Get the qualified name of the given object.

Will return the name of the object and the name of the module and class it belongs to.

For functions or methods, this will return something like module.class.method or module.function.

>>> class TestClass:
...   def method(self, arg):
...     pass
>>> get_qualname(TestClass.method)
'datapyground.utils.inspect.TestClass.method'