dictutils.ops.expand_pathsΒΆ

dictutils.ops.expand_paths(path)[source]ΒΆ

Parse dotted path string into list of keys.

Parameters:

path (str | Sequence[str | int]) – Dotted path string or sequence

Return type:

list[str | int]

Returns:

List of path components

Examples

>>> expand_paths("a.b.c")
['a', 'b', 'c']
>>> expand_paths("users.0.name")
['users', 0, 'name']