Pre-Info
We have a structure running on multiple machines which are communicating each other by using our json serializable objects to carry data between devices.
I am trying to create documentation for these classes by using markdown.
Problem
class BaseParams(JsonObject):
""" default values for all classes"""
def __init__(self):
self.param0: str = "test"
class ExampleParams(BaseParams):
""" example class for data container"""
def __init__(self, param1: str):
super().__init__()
self.param1: str = param1
self.param2: int = 0
I have many classes like ExampleParams in a py file. I collected them, their docs etc. dynamically with help of inspect and importlib modules but i also have to collect their params and params's types.
Trying to get something like that:
resultdict = {
"ExampleParams":{"param0":"str","param1":"str","param2":"int"}
}
How can i do that without initializing the classes?
PS1: It is easy when i initialize them but there are many classes and every one have different initialize values. So i have to do it without initializing them i guess.
PS2: Every atrribute's type is declared by typing module