data.queries.Queries
Bases: BaseData
Queries is a class that inherits from the BaseData class. It is used to handle query data.
Source code in pirate/data/queries.py
__init__(data, id_key=None, content_key=None)
Initialize the Queries object.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
data
|
Union[str, List, Mapping]
|
The data to be loaded. It can be a string (path to a file), a list, or a dictionary. |
required |
id_key
|
Optional[str]
|
The key used for the id in the data. Defaults to 'qid'. |
None
|
content_key
|
Optional[str]
|
The key used for the content in the data. Defaults to 'query'. |
None
|
Source code in pirate/data/queries.py
__repr__()
Return the string representation of the BaseData object.
options: show_source: false heading_level: 2