ts_ids_core.mapping_table.schema_path_models module¶
- class Index(value: typing_extensions.Literal[*] | int)[source]¶
Bases:
objectClass for representing an index in a schema path. Asterisks are treated as less than any integer.
- value: typing_extensions.Literal[*] | int¶
- class PathPart(name: str, indices: ~typing.List[~ts_ids_core.mapping_table.schema_path_models.Index] = <factory>)[source]¶
Bases:
objectClass to represent a part of a schema path, e.g., the path “a.b[2].c” has parts “a”, “b[2]”, and “c”. A path part has a field name and an optional list of indices
- Raises:
ValueError – _description_
- Returns:
_description_
- class SchemaPath(parts: List[PathPart])[source]¶
Bases:
objectClass for representing a schema path.
- property deindexed_path: str¶
Return a schema path with all indices removed. E.g., if the path is “a[*].b[1].c” this would return “a.b.c”
- static from_str(path: str) SchemaPath[source]¶
Parse a schema path string to a SchemaPath object.