blob: 49dec72f616ed966a459d9ac7563bddb9540c099 [file] [log] [blame]
:mod:`airflow.providers.cloudant.hooks.cloudant`
================================================
.. py:module:: airflow.providers.cloudant.hooks.cloudant
.. autoapi-nested-parse::
Hook for Cloudant
Module Contents
---------------
.. py:class:: CloudantHook(cloudant_conn_id: str = default_conn_name)
Bases: :class:`airflow.hooks.base.BaseHook`
Interact with Cloudant. This class is a thin wrapper around the cloudant python library.
.. seealso:: the latest documentation `here <https://python-cloudant.readthedocs.io/en/latest/>`_.
:param cloudant_conn_id: The connection id to authenticate and get a session object from cloudant.
:type cloudant_conn_id: str
.. attribute:: conn_name_attr
:annotation: = cloudant_conn_id
.. attribute:: default_conn_name
:annotation: = cloudant_default
.. attribute:: conn_type
:annotation: = cloudant
.. attribute:: hook_name
:annotation: = Cloudant
.. staticmethod:: get_ui_field_behaviour()
Returns custom field behaviour
.. method:: get_conn(self)
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)
:return: an authorized cloudant session context manager object.
:rtype: cloudant
.. method:: _validate_connection(self, conn: cloudant)