I am trying to get fully qualified name from a property.
Example class
class Foo:
def __init__(self, val: int):
self._val = val
@property
def myval(self) -> int:
return self._val
I am attempting to get full qualified name of different objects.
I am aiming to get a result like ooolib.foo.Foo.myval
(module, class, attribute).
The idea is that I want to create a script that can do someting like the following.
>>> from ooolib.helper import hlp
>>> from ooolib.foo import Foo
>>>
>>> hlp(Foo.myval)
Launching help for "ooolib.foo.Foo.myval" at "https://ooolib.help.example.com/src/ooolib/foo/Foo#myval"
I have a backend that contains all the fully qualified names and their respective help page links. I want to make it simple for user to look up help in a python interactive console.
My goal it to have users be able to get help for any part of the Library by typing the actual objects. In the interactive console tab complete is enabled so it makes sense to me to do it this way.
>>> hlp(ooolib.bar.Bar.mymethod)
>>> hlp(ooolib.bar.Bar.some_property)
>>> hlp(ooolib.bar.Bar.some_attr)
>>> hlp(ooolib.foo.Foo.__init__)
>>> hlp(ooolib.foo)
Is this possible of just a lofty goal on my part?