mirror of
https://github.com/fuckpiracyshield/data-model.git
synced 2024-05-20 14:06:19 +02:00
20 lines
348 B
Python
20 lines
348 B
Python
|
|
class BaseModel:
|
|
|
|
"""
|
|
Base data modeling class with utilities.
|
|
"""
|
|
|
|
def to_dict(self) -> dict:
|
|
"""
|
|
Exports the set data into a dictionary.
|
|
"""
|
|
|
|
output = {}
|
|
|
|
for key, value in self.__dict__.items():
|
|
if value is not None:
|
|
output[key] = value
|
|
|
|
return output
|