We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use data class as default data:
Resources:
The text was updated successfully, but these errors were encountered:
Ex:
>>> from pydantic import BaseModel >>> class Toto(BaseModel): ... value: int ... key: str >>> i = Toto(key="cpu", value=10) >>> i Toto(value=10, key='cpu') >>> i.model_dump_json() '{"value":10,"key":"cpu"}' >>> i.model_dump() {'value': 10, 'key': 'cpu'} >>> d = i.model_dump() >>> import sys >>> sys.getsizeof(i) 72 >>> sys.getsizeof(d) 184
Sorry, something went wrong.
First step is to create a DataClass catalog with all the class used by Glances Stats.
nicolargo
No branches or pull requests
Use data class as default data:
Resources:
The text was updated successfully, but these errors were encountered: