pydantic_sweep.types
Attributes
A tuple-path of keys for a pydantic model. |
|
Anything that can be converted to a tuple-path (str or iterable of str). |
|
The possible values that should be assigned to a field. |
|
A nested config dictionary for configurations. |
Classes
A function that yields tuples of items. |
|
A function that chains iterables together. |
Module Contents
- pydantic_sweep.types.StrictPath: TypeAlias = tuple[str, ...][source]
A tuple-path of keys for a pydantic model.
- pydantic_sweep.types.Path: TypeAlias = Iterable[str] | str[source]
Anything that can be converted to a tuple-path (str or iterable of str).
- pydantic_sweep.types.FieldValue: TypeAlias = Hashable | pydantic.BaseModel[source]
The possible values that should be assigned to a field.
Fields should be hashable (and therefore immutable) values. That makes them safer to use in a configuration, since unlike mutable types they can not be modified inplace.
- pydantic_sweep.types.Config: TypeAlias = dict[str, Union['FieldValue', 'Config']][source]
A nested config dictionary for configurations.
- class pydantic_sweep.types.Combiner[source]
Bases:
Protocol[T]A function that yields tuples of items.
- __call__(*configs: collections.abc.Iterable[T]) collections.abc.Iterable[tuple[T, Ellipsis]][source]
- class pydantic_sweep.types.Chainer[source]
Bases:
Protocol[T]A function that chains iterables together.
- __call__(*configs: collections.abc.Iterable[T]) collections.abc.Iterable[T][source]