How to use the pydomo.Domo function in pydomo

To help you get started, we’ve selected a few pydomo examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github domoinc / domo-python-sdk / run_examples.py View on Github external
def init_domo_client(self, client_id, client_secret, **kwargs):
        '''

        - Create an API client on https://developer.domo.com
        - Initialize the Domo SDK with your API client id/secret
        - If you have multiple API clients you would like to use, simply initialize multiple Domo() instances
        - Docs: https://developer.domo.com/docs/domo-apis/getting-started

        '''
        handler = logging.StreamHandler()
        handler.setLevel(logging.INFO)
        formatter = logging.Formatter('%(asctime)s - %(name)s - %(levelname)s - %(message)s')
        handler.setFormatter(formatter)
        logging.getLogger().addHandler(handler)

        return Domo(client_id, client_secret, logger_name='foo', log_level=logging.INFO, api_host=API_HOST, **kwargs)