bayesline.api.equity.DataTypeUploaderApi#
- class bayesline.api.equity.DataTypeUploaderApi#
Expose different datasets of an uploader.
Datasets are completely isolated spaces to upload data of the same type.
- __init__()#
Methods
__init__()create_dataset(dataset)Create a new dataset.
create_or_replace_dataset(dataset)Create a new dataset and delete the old one if it exists.
get_dataset(dataset)Get a specific dataset uploader.
Get the list of available datasets.
get_or_create_dataset(dataset)Get the dataset if it exists, otherwise create it.
- abstract get_datasets() list[str]#
Get the list of available datasets.
Returns#
- list[str]
A sorted list of available datasets.
- abstract get_dataset(dataset: str) UploaderApi#
Get a specific dataset uploader.
Parameters#
- datasetstr
The dataset of the uploader to obtain. Must be one of the datasets returned by get_datasets.
Raises#
- KeyError
If the given dataset does not exist.
Returns#
- UploaderApi
The uploader for the specified dataset.
- abstract create_dataset(dataset: str) UploaderApi#
Create a new dataset.
Parameters#
- datasetstr
The dataset to create.
Raises#
- ValueError
If the given dataset already exists.
Returns#
- UploaderApi
The uploader for the new dataset.
- get_or_create_dataset(dataset: str) UploaderApi#
Get the dataset if it exists, otherwise create it.
Parameters#
- datasetstr
The dataset to get or create.
Returns#
- UploaderApi
The uploader for the dataset.
- create_or_replace_dataset(dataset: str) UploaderApi#
Create a new dataset and delete the old one if it exists.
Parameters#
- datasetstr
The dataset to create.
Returns#
- UploaderApi
The uploader for the dataset.