Public API Python client¶
- The main client class
- Managing projects
- Managing datasets
- Managed folders
- Managing recipes
- Machine learning
- Managing jobs
- Managing scenarios
- API Designer & Deployer
- Managing meanings
- Authentication information
- Managing users and groups
- Managing connections
- Other administration tasks
- Metrics and checks
- SQL queries through DSS
- Reference API documentation
The public API Python client makes it easy to write client programs for the DSS REST API in Python.
For usage samples, please see below.
The public API Python client is preinstalled in DSS. If you plan on using it from within DSS (in a recipe, notebook, macro, scenario, …), you don’t need to do anything specific.
To use the Python client from outside DSS, simply install it from pip.
pip install dataiku-api-client
This installs the client in the system-wide Python installation,
so if you are not using virtualenv, you may need to replace
Note that this will always install the latest version of the API client. You might need to request a version compatible with your version of DSS.
To work with the API, a connection needs to be established with DSS, by creating a
DSSClient object. Once the connection is established, the DSSClient object serves as the entry point to the other calls.
The Python client can be used from inside DSS. In that case, you don’t need to provide any API key, as the API client will automatically inherit connection credentials from the current context
import dataiku client = dataiku.api_client() # client is now a DSSClient and can perform all authorized actions. # For example, list the project keys for which you have access client.list_project_keys()
When connecting from the outside world, you need an API key. See Public API Keys for more information on how to create an API key and the associated privileges.
You also need to connect using the base URL of your DSS instance.
import dataikuapi host = "http://localhost:11200" apiKey = "some_key" client = dataikuapi.DSSClient(host, apiKey) # client is now a DSSClient and can perform all authorized actions. # For example, list the project keys for which the API key has access client.list_project_keys()