How to use the pyngrok.ngrok.set_auth_token function in pyngrok

To help you get started, we’ve selected a few pyngrok 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 Drakkar-Software / OctoBot-Tentacles / Services / Services_bases / webhook_service / webhook_service.py View on Github external
async def prepare(self) -> None:
        set_logging_level(self.LOGGERS, logging.WARNING)
        ngrok.set_auth_token(self.config[CONFIG_CATEGORY_SERVICES][CONFIG_WEBHOOK][CONFIG_NGROK_TOKEN])
        try:
            self.webhook_host = os.getenv(ENV_WEBHOOK_ADDRESS, self.config[CONFIG_CATEGORY_SERVICES]
                                          [CONFIG_WEBHOOK][CONFIG_WEB_IP])
        except KeyError:
            self.webhook_host = os.getenv(ENV_WEBHOOK_ADDRESS, DEFAULT_WEBHOOK_SERVER_IP)
        try:
            self.webhook_port = int(os.getenv(ENV_WEBHOOK_PORT, self.config[CONFIG_CATEGORY_SERVICES]
                                    [CONFIG_WEBHOOK][CONFIG_WEB_PORT]))
        except KeyError:
            self.webhook_port = int(os.getenv(ENV_WEBHOOK_PORT, DEFAULT_WEBHOOK_SERVER_PORT))

pyngrok

A Python wrapper for ngrok.

MIT
Latest version published 8 days ago

Package Health Score

87 / 100
Full package analysis