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. |
|
A flexible config that allows any Path. |
Classes
A function that yields tuples of items. |
|
A function that chains iterables together. |
Module Contents
- type pydantic_sweep.types.StrictPath = tuple[str, ...][source]
A tuple-path of keys for a pydantic model.
- type pydantic_sweep.types.Path = str | Iterable[str] | 'StrictPath'[source]
Anything that can be converted to a tuple-path (str or iterable of str).
- type pydantic_sweep.types.FieldValue = 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.
- type pydantic_sweep.types.Config = dict[str, 'FieldValue' | 'Config'][source]
A nested config dictionary for configurations.
- type pydantic_sweep.types.FlexibleConfig = dict['Path', 'FieldValue' | 'FlexibleConfig'][source]
A flexible config that allows any Path.
- 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]