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