mirror of
https://github.com/kennethreitz/simplemind.git
synced 2026-06-05 22:50:18 +00:00
11 lines
350 B
Python
11 lines
350 B
Python
from .providers import providers
|
|
|
|
|
|
def find_provider(provider_name: str):
|
|
"""Find a provider by name."""
|
|
for provider_class in providers:
|
|
if provider_class.__name__.lower() == provider_name.lower():
|
|
# Instantiate the provider
|
|
return provider_class()
|
|
raise ValueError(f"Provider {provider_name} not found")
|