bayesline.api.equity.DataTypeUploaderApi#
- class bayesline.api.equity.DataTypeUploaderApi#
Bases:
ABC
Exposes different datasets of an uploader.
Datasets are completely isolated spaces to upload data of the same type.
Methods
__init__
()create_dataset
(dataset)Creates a new dataset.
create_or_replace_dataset
(dataset)Creates a new dataset and deletes the old one if it exists.
get_dataset
(dataset)Parameters dataset: str The dataset of the uploader to obtain. Must be one of the datasets returned by get_datasets.
Returns list[str]: A sorted list of available datasets.
get_or_create_dataset
(dataset)Gets the dataset if it exists, otherwise creates it.
- abstract get_dataset(dataset: str) UploaderApi #
Parameters#
- dataset: str
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:
- abstract create_dataset(dataset: str) UploaderApi #
Creates a new dataset.
Parameters#
- dataset: str
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 #
Gets the dataset if it exists, otherwise creates it.
Parameters#
- dataset: str
The dataset to get or create.
Returns#
- UploaderApi:
The uploader for the dataset.
- create_or_replace_dataset(dataset: str) UploaderApi #
Creates a new dataset and deletes the old one if it exists.
Parameters#
- dataset: str
The dataset to create.
Returns#
- UploaderApi:
The uploader for the dataset.