drepr.utils.attr_data#
Classes
|
Storing data of an attribute in the same location as in its origin resource. |
|
- class Container(attrs: Optional[dict[str, drepr.utils.attr_data.AttributeData]] = None)[source]#
Bases:
object- Parameters:
attrs (Optional[dict[str, AttributeData]]) –
- class AttributeData(steps: list[Union[drepr.models.path.RangeExpr, drepr.models.path.IndexExpr, drepr.models.path.SetIndexExpr, drepr.models.path.WildcardExpr]], current_step_index: int, value_step_index: int, value: dict[int | str, drepr.utils.attr_data.AttributeData | Any])[source]#
Bases:
objectStoring data of an attribute in the same location as in its origin resource.
Since we cannot pre-populate the size of the attribute data, it has to built dynamically, so we need to store the data metadata along for rebuilding
- Parameters:
steps (list[Union[drepr.models.path.RangeExpr, drepr.models.path.IndexExpr, drepr.models.path.SetIndexExpr, drepr.models.path.WildcardExpr]]) –
current_step_index (int) –
value_step_index (int) –
value (dict[int | str, drepr.utils.attr_data.AttributeData | Any]) –
- steps: list[Union[drepr.models.path.RangeExpr, drepr.models.path.IndexExpr, drepr.models.path.SetIndexExpr, drepr.models.path.WildcardExpr]]#
- static from_path(steps: list[Union[drepr.models.path.RangeExpr, drepr.models.path.IndexExpr, drepr.models.path.SetIndexExpr, drepr.models.path.WildcardExpr]], idx: int = 0)[source]#
- Parameters: