Provides access to all API resources from any Python software component. The methods from all the mix-ins are available on this method as well:
class squirro_client.base.SquirroClient
class squirro_client.base.SquirroClient(client_id, client_secret, **kwargs)
Client to access the Squirro API.
Parameters: |
|
---|
Example:
>>> from squirro_client import SquirroClient >>> client = SquirroClient('client_id', 'client_secret') >>> client = SquirroClient(None, None, ... cluster='http://squirro.example.com') >>> client = SquirroClient(None, None, ... cluster='http://squirro.example.com', ... retry_total=10) |
access_token
Property to get or set the access token of the client.
refresh_token
Property to get or set the refresh token of the client.
authenticate
authenticate(tenant=None, access_token=None, refresh_token=None, auth_service=None, auth_user=None, username=None, password=None, user_information=None)
Authenticate with the Squirro platform by either using access and refresh tokens, username and password, or external service name and user identifier.
Parameters: |
|
---|---|
Raises : | squirro_client.exceptions.AuthenticationError if authentication fails. |
Example:
>>> client.authenticate(username='test@test.com', ... password='test') >>> client.authenticate(access_token='token01', ... refresh_token='token02') >>> client.authenticate(auth_service='salesforce', ... auth_user='sfdc01') |