class documentation
Ordered path of FieldKey components.
Field paths are convenience objects that can be converted to masks and can be combined with other paths or masks using +.
Example
Construct a path and build a mask:
path = FieldPath(["spec", "max_size_bytes"]) mask = path.to_mask() assert mask.marshal() == "spec.max_size_bytes"
| Parameters | |
| base | Optional iterable of FieldKey or strings used to build
the path. Strings are converted to FieldKey and validated. |
| Raises | |
ValueError | If base is not iterable or contains invalid element types. |
| Class Method | unmarshal |
Parse a single-path mask string into a FieldPath. |
| Method | __add__ |
Combine with another path or attach a mask at the end. |
| Method | __eq__ |
Return True when another object is an equal path. |
| Method | __iadd__ |
Append path components from an iterable. |
| Method | __init__ |
Create a field path from keys or strings. |
| Method | __repr__ |
Return a debug representation of the path. |
| Method | copy |
Return a shallow copy of the path. |
| Method | is |
Return True if this path is a strict prefix of another path. |
| Method | marshal |
Serialize the path as a mask string. |
| Method | matches |
Return True if the path is covered by a reset mask. |
| Method | matches |
Return True if the path matches and terminates a reset mask. |
| Method | matches |
Return True if the path is covered by a select mask. |
| Method | matches |
Return match status and whether the match is inner or final. |
| Method | parent |
Return the parent path or None when at root. |
| Method | to |
Convert the path into a mask with a single leaf. |
| Static Method | _matches |
Undocumented |
| Static Method | _matches |
Undocumented |