Getting started¶
Installation¶
pip install --upgrade earnix-elevate
pdm add earnix-elevate
poetry add earnix-elevate
Authentication¶
To authenticate to Earnix Elevate from code, it needs to have access to valid API credentials:
-
In the Elevate UI, click your user icon in the top right-hand corner and select
Profile. -
Under My Account, click on
Personal Tokensand thenGenerate Token. -
Enter a description for the token, an expiration timeframe, and click
Create. This activates your new key, making it ready for use. -
Record the Client ID and Secret Key, so you can later reference them for authentication.
Warning
Once you click on
Done, you won’t be able to access this information again. -
Generated tokens can be listed and deleted in the same
Personal Tokenstable.
Use the credentials¶
We provide two ways to let the SDK authenticate:
-
Using Service constructor arguments like in the example below. We don't recommend hard-coding credentials in your code. If you use this method, please store the values in a secure location and read from it beforehand.
-
Using environment variables. These can be as secure as your setup makes them be. The possibilities include using
exportin some shells, using%envin notebooks, injecting from a container/service orchestrator and many more. The variable keys are:Key Description E2_SERVERThe server your Elevate account is registered in. E2_CLIENT_IDYour Client ID. E2_SECRET_KEYYour Secret Key.
Example usage¶
| print_connections.py | |
|---|---|
1 2 3 4 5 6 7 8 9 10 11 | |