qwikstart.utils.core module

qwikstart.utils.core.assert_has_dataclass_fields(dataclass: Any) → None
qwikstart.utils.core.ensure_path(path: Union[pathlib.Path, str]) → pathlib.Path

Return path object from pathlib.Path or string.

While Path can be called on strings or Path and return a Path, it does not behave correctly for mock path instances. This helper function ensures we can support normal usage and mocked paths used for testing.

qwikstart.utils.core.first(iterable: Iterable[T]) → T
qwikstart.utils.core.full_class_name(obj: Any) → str
qwikstart.utils.core.get_dataclass_keys(dataclass: Any) → Iterable[Any]
qwikstart.utils.core.get_dataclass_values(dataclass: Any) → Iterable[Any]
qwikstart.utils.core.indent(text: str, space_count: int) → str

Return text indented by space_count spaces.

qwikstart.utils.core.resolve_path(path: Union[pathlib.Path, str]) → pathlib.Path

Return resolved path object from pathlib.Path or string.