dominodatalab in your project’s requirements.txt file. This makes the Python binding available for each new workbook session (or batch run) started within the project.
In existing deployments
After installation, you can instantiate a library either with your API Key or Auth Token File.
Token File: To use Token File to instantiate Python Domino, pass the path to this token file, either through class constructor (domino_token_file=<Path to Token file>) or through an environment variable.
DOMINO_TOKEN_FILE will be set automatically to be the token file for the user who started the run.
API Key: You must get your API key from your account page. To get your API Key, log into Domino and click your name in the menu. Click Account Settings and select API Key. Copy the API key to your clipboard.
The Python library will read this key from environment variables, so set it as follows in your shell:
DOMINO_API_USER_KEY variable will be set automatically to be the key for the user who started the run.
-
If both the API Key and Token files are present, default preference will be given to the Token file. To use the API Key file instead, clear the
DOMINO_TOKEN_FILEenvironment variable. - See the Domino Platform API Reference for more detail.
DOMINO_API_PROXY environment variable) and route the calls through it automatically. If you explicitly specify other means of authentication (domino_token, domino_token_file, api_key), it will work exactly like it did previously.
See Use API Proxy to Authenticate Calls to the Domino API.