owmeta_core.utils module¶
Common utilities for translation, massaging data, etc., that don’t fit elsewhere in owmeta_core
- owmeta_core.utils.grouper(iterable, n, fillvalue=None)[source]¶
Collect data into fixed-length chunks or blocks
- owmeta_core.utils.retrieve_provider(provider_path)[source]¶
Look up a “provider” specified by a string.
Path to an object that provides something. The format is similar to that for setuptools entry points:
path.to.module:path.to.provider.callable
. Notably, there’s no name and “extras” are not supported.- Parameters
- provider_path
str
The path to the provider
- provider_path
- Returns
object
The provider
- Raises
ValueError
The
provider_path
format doesn’t match the expected patternAttributeError
Some element in the path is missing