The main API client#
The DSSClient
class is the entry point for many of the capabilities of the Dataiku API.
Dataiku provides two different packages serving different roles. For more on the differences between the packages, please refer to The Dataiku Python packages. For additional information, please refer to the Dataiku API section.
Creating a client from inside DSS#
To work with the API,
a connection must 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.
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()
Creating a client from outside DSS#
To work with the API,
a connection must 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.
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()
Turning off the SSL certificate check#
If your DSS has SSL enabled, the package will verify the certificate. You may need to add the root authority that signed the DSS SSL certificate to your local trust store for this to work. Please refer to your OS or Python manual for instructions.
If this is not possible, you can also turn off checking the SSL certificate by using DSSClient(host, apiKey, insecure_tls=True)
Reference documentation#
|
Entry point for the DSS API client |