Mixins
DictMixin
asdict
asdict(omit: set[str] | None = None) -> dict
Return the object as dictionary.
Note that attributes starting with _
are always omited.
Omit keys present in omit.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
omit
|
set[str] | None
|
Set of keys to be omitted in the dictionary. If none, all attributes are returned. |
None
|
UpdateMixin
patch
patch(**kwargs) -> None
Update model fields with provided keyword arguments. Do not alter attributes not in kwargs
Parameters:
Name | Type | Description | Default |
---|---|---|---|
**kwargs
|
Key-value pairs to update the model fields. |
{}
|
put
put(**kwargs) -> None
Update all model fields with provided keyword arguments or set them to none.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
**kwargs
|
Key-value pairs to update the model fields. |
{}
|