API connection

Getting the authentification object

The connection to the TECO API is established in the api_main.py module, where the environmental variables (API name, API password) are loaded using the dotenv package. Once the variables are loaded, the authentification object can be gained through the

AUTH = HTTPDigestAuth(<API-name>, <API-password>)

call. This authentification object can then directly be used in the requests.get calls.

Note

The environmental file .env must be present in the project root for this call to work. For this, see the GitHub README documentation.