AbstractRecordsOnlyAPI
Bases: AbstractAPI
Abstract class for CRUD operations on records-only (no file storage) endpoints.
Source code in yeastdnnexplorer/interface/AbstractRecordsOnlyAPI.py
13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 |
|
__init__(**kwargs)
¶
Initialize the RecordsOnlyAPI object.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
kwargs |
Additional parameters to pass to AbstractAPI. |
{}
|
Source code in yeastdnnexplorer/interface/AbstractRecordsOnlyAPI.py
17 18 19 20 21 22 23 24 25 |
|
read(callback=lambda , , : {'metadata': metadata, 'data': data}, export_url_suffix='export', **kwargs)
async
¶
Retrieve data from the endpoint. The data will be returned as a dataframe. The callback function must take metadata, data, and cache as parameters.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
callback |
Callable[[DataFrame, dict[str, Any] | None, Any], Any]
|
The function to call with the data. Signature must include |
lambda , , : {'metadata': metadata, 'data': data}
|
export_url_suffix |
The URL suffix for the export endpoint. This will return a response object with a csv file. |
'export'
|
|
kwargs |
Additional arguments to pass to the callback function. |
{}
|
Returns:
Type | Description |
---|---|
Any
|
The result of the callback function. |
Source code in yeastdnnexplorer/interface/AbstractRecordsOnlyAPI.py
27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 |
|