airflow.contrib.hooks.cloudant_hook
¶
Hook for Cloudant
Module Contents¶
-
class
airflow.contrib.hooks.cloudant_hook.
CloudantHook
(cloudant_conn_id='cloudant_default')[source]¶ Bases:
airflow.hooks.base_hook.BaseHook
Interact with Cloudant. This class is a thin wrapper around the cloudant python library.
See also
the latest documentation here.
- Parameters
cloudant_conn_id (str) – The connection id to authenticate and get a session object from cloudant.
-
get_conn
(self)[source]¶ Opens a connection to the cloudant service and closes it automatically if used as context manager.
Note
In the connection form: - ‘host’ equals the ‘Account’ (optional) - ‘login’ equals the ‘Username (or API Key)’ (required) - ‘password’ equals the ‘Password’ (required)
- Returns
an authorized cloudant session context manager object.
- Return type
cloudant