ds_provider_unimicro_py_lib.utils.ranges¶
File: ranges.py
Region: ds_provider_unimicro_py_lib/utils/ranges
Helpers for expanding integer query-parameter specifications into concrete lists.
Functions¶
|
Normalize an int, |
|
Build the cartesian product of the |
Module Contents¶
- ds_provider_unimicro_py_lib.utils.ranges.expand_int_values(value: int | str | list[int], *, field_name: str) list[int][source]¶
Normalize an int,
start-endrange string, or list of ints into a list of ints.
- ds_provider_unimicro_py_lib.utils.ranges.expand_combinations(expand: dict[str, list[int] | int | str] | None) list[dict[str, int]][source]¶
Build the cartesian product of the
expandvalues.- Parameters:
expand – Mapping of parameter name to an int, list of ints, or
start-endrange string.- Returns:
One parameter mapping per request.
[{}]whenexpandis empty orNone, so callers always make at least one request.- Return type:
list[dict[str, int]]