dataset_hub._core.provider.ProviderFactory

class dataset_hub._core.provider.provider_factory.ProviderFactory[source]

Bases: object

Factory to build dataset_hub._core.provider instances based on a configuration dictionary.

Uses a simple strategy pattern: selects the provider class by ‘type’ key in config.

classmethod build_provider(provider_config)[source]

Build a Provider instance from a configuration dictionary.

Parameters:

provider_config (Dict[str, Any]) – The configuration dict with at least a ‘type’ and ‘params’ keys.

Returns:

An instance of the appropriate Provider subclass.

Return type:

Provider

Raises:

ValueError – If the type is not registered.