Open nicolargo opened 2 years ago
@nicolargo
About using Pydantic, are we going to use it for all the stats and outputs of the all the plugins or just with FastAPI?
I am not sure how much of a performance overhead the runtime validation performed by pydantic would result in. We also have the option of using dataclasses or NamedTuples with proper typing to identify static typing errors.
What do you think?
I think that the real value added is on the interface (REST). So for a first action, we will focus on the FastAPI data model.
This issue is stale because it has been open for 3 months with no activity.
See: https://pydantic-docs.helpmanual.io/usage/models/ also have a look on: https://github.com/jcrist/msgspec
Need Python 3.7 or higher.
Use it in https://github.com/nicolargo/glances/issues/2183 ?