root.data_loader ================ .. py:module:: root.data_loader Attributes ---------- .. autoapisummary:: root.data_loader.ADataLoader root.data_loader.DataLoader Classes ------- .. autoapisummary:: root.data_loader.AApiCallDataLoader root.data_loader.ASqlDataLoader root.data_loader.AWebPageDataLoader root.data_loader.AWebSearchDataLoader root.data_loader.ApiCallDataLoader root.data_loader.SqlDataLoader root.data_loader.WebPageDataLoader root.data_loader.WebSearchDataLoader Module Contents --------------- .. py:class:: AApiCallDataLoader(name: str, endpoint: str, headers: Optional[Dict[str, str]]) Bases: :py:obj:`_ADataLoaderBase` Data loader which retrieves data from an URL :param name: A name assigned to the data loader. The data loader name must be included in the Skill prompt variables. :param endpoint: URL to connect to. Request type is implicitly GET. Example: `"http://example.com/something"` :param headers: Optional set of headers to specify for the request: Example: `{"X-Accept": "application/json"}` .. py:attribute:: endpoint .. py:attribute:: headers .. py:attribute:: name .. py:attribute:: type .. py:class:: ASqlDataLoader(name: str, connection_string: str, query: str) Bases: :py:obj:`_ADataLoaderBase` Data loader which retrieves data from SQL :param name: A name assigned to the data loader. The data loader name must be included in the Skill prompt variables. :param connection_string: Connection string to use - currently it supports only PostgreSQL .. rubric:: Example `"host='localhost' dbname='my_database' user='postgres' password='secret'"` :param query: The SQL query to feed to SQL. .. rubric:: Example `"SELECT name FROM users"` .. py:attribute:: connection_string .. py:attribute:: name .. py:attribute:: query .. py:attribute:: type .. py:class:: AWebPageDataLoader(name: str, url: str) Bases: :py:obj:`_ADataLoaderBase` Data loader which retrieves data from a web page :param name: A name assigned to the data loader. The data loader name must be included in the Skill prompt variables. :param url: The URL to retrieve the data from .. rubric:: Example `"http://example.com/something"` .. py:attribute:: name .. py:attribute:: type .. py:attribute:: url .. py:class:: AWebSearchDataLoader(name: str, engine: _EngineType, search_terms: str) Bases: :py:obj:`_ADataLoaderBase` Data loader which retrieves data from web search :param name: A name assigned to the data loader. The data loader name must be included in the Skill prompt variables. :param engine: Search engine to use - `"google"` and `"bing"` are supported. :param search_terms: What to search for in the search engine .. py:method:: validate_engine(engine: str) -> str Validate that the given search engine is valid. ValueError is raised if it is not. .. py:attribute:: engine .. py:attribute:: name .. py:attribute:: search_terms .. py:attribute:: type .. py:class:: ApiCallDataLoader(name: str, endpoint: str, headers: Optional[Dict[str, str]]) Bases: :py:obj:`_DataLoaderBase` Data loader which retrieves data from an URL :param name: A name assigned to the data loader. The data loader name must be included in the Skill prompt variables. :param endpoint: URL to connect to. Request type is implicitly GET. Example: `"http://example.com/something"` :param headers: Optional set of headers to specify for the request: Example: `{"X-Accept": "application/json"}` .. py:attribute:: endpoint .. py:attribute:: headers .. py:attribute:: name .. py:attribute:: type .. py:class:: SqlDataLoader(name: str, connection_string: str, query: str) Bases: :py:obj:`_DataLoaderBase` Data loader which retrieves data from SQL :param name: A name assigned to the data loader. The data loader name must be included in the Skill prompt variables. :param connection_string: Connection string to use - currently it supports only PostgreSQL .. rubric:: Example `"host='localhost' dbname='my_database' user='postgres' password='secret'"` :param query: The SQL query to feed to SQL. .. rubric:: Example `"SELECT name FROM users"` .. py:attribute:: connection_string .. py:attribute:: name .. py:attribute:: query .. py:attribute:: type .. py:class:: WebPageDataLoader(name: str, url: str) Bases: :py:obj:`_DataLoaderBase` Data loader which retrieves data from a web page :param name: A name assigned to the data loader. The data loader name must be included in the Skill prompt variables. :param url: The URL to retrieve the data from .. rubric:: Example `"http://example.com/something"` .. py:attribute:: name .. py:attribute:: type .. py:attribute:: url .. py:class:: WebSearchDataLoader(name: str, engine: _EngineType, search_terms: str) Bases: :py:obj:`_DataLoaderBase` Data loader which retrieves data from web search :param name: A name assigned to the data loader. The data loader name must be included in the Skill prompt variables. :param engine: Search engine to use - `"google"` and `"bing"` are supported. :param search_terms: What to search for in the search engine .. py:method:: validate_engine(engine: str) -> str Validate that the given search engine is valid. ValueError is raised if it is not. .. py:attribute:: engine .. py:attribute:: name .. py:attribute:: search_terms .. py:attribute:: type .. py:data:: ADataLoader .. py:data:: DataLoader