๐ IamListening#
User Guide#
Refer to IamListening for more information.
Listener#
- class iamlistening.main.Listener[source]#
Listener Class for IAmListening.
This class provides methods for starting and stopping the listener for each platform.
Initializes the class instance by creating and appending clients based on the configuration in settings.platform.
Checks if the module is enabled by looking at settings.iamlistening_enabled. If the module is disabled, no clients will be created.
Creates a mapping of library names to client classes. This mapping is used to create new clients based on the configuration.
If a clientโs configuration exists in settings.platform and its โenabledโ key is truthy, it will be created. Clients are not created if their name is โtemplateโ or empty string.
If a client is successfully created, it is appended to the clients list.
If a client fails to be created, a message is logged with the name of the client and the error that occurred.
- Parameters:
None
- Returns:
None
- __init__()[source]#
Initializes the class instance by creating and appending clients based on the configuration in settings.platform.
Checks if the module is enabled by looking at settings.iamlistening_enabled. If the module is disabled, no clients will be created.
Creates a mapping of library names to client classes. This mapping is used to create new clients based on the configuration.
If a clientโs configuration exists in settings.platform and its โenabledโ key is truthy, it will be created. Clients are not created if their name is โtemplateโ or empty string.
If a client is successfully created, it is appended to the clients list.
If a client fails to be created, a message is logged with the name of the client and the error that occurred.
- Parameters:
None
- Returns:
None
- get_all_client_classes()[source]#
Retrieves all client classes from the iamlistening.protocol module.
This function imports the iamlistening.protocol module and retrieves all the classes defined in it.
The function returns a dictionary where the keys are the names of the classes and the values are the corresponding class objects.
- Returns:
A dictionary containing all the client classes from the iamlistening.protocol module.
- Return type:
dict
- async get_info()[source]#
Retrieves information about the exchange and the account.
- Returns:
A formatted string containing
the exchange name and the account information. :rtype: str