factory¶
Factories for creating Clients.
-
class
pybomb.factory.
ClientFactory
(api_key)¶ Bases:
object
Factory for creating all clients with the same API key.
-
build
(client_name)¶ Import and instantiate the required class.
- Parameters
client_name (
str
) – The name of the client to create. Should match the name of the module, minus the “_client” part.- Return type
- Returns
An instance of the client, creates with the API key held on the class.
- Raises
InvalidClientException – Rasied when the client module or class cannot be found
-