bayesline.api.equity.RiskDatasetLoaderApi#
- class bayesline.api.equity.RiskDatasetLoaderApi#
Bases:
RegistryBasedApi
[RiskDatasetSettings
,RiskDatasetSettingsMenu
,RiskDatasetApi
]Methods
__init__
()create_dataset
(name, settings)Creates a new dataset with the given name and settings.
create_dataset_as_task
(name, settings)create_or_replace_dataset
(name, settings)delete_dataset
(name)Deletes the given dataset.
delete_dataset_if_exists
(name)Deletes the given dataset if it exists.
get_dataset_names
(*[, mode])Returns the names of all available datasets.
Returns str The default dataset name that will be populated into settings if no dataset name is provided.
load
(ref_or_settings, *args, **kwargs)Attributes
- abstract get_default_dataset_name() str #
Returns#
- str
The default dataset name that will be populated into settings if no dataset name is provided.
- abstract get_dataset_names(*, mode: Literal['System', 'User', 'All'] = 'All') list[str] #
Returns the names of all available datasets.
Parameters#
- mode: Literal[“System”, “User”, “All”]
System: only system wide datasets (available to all users and provided by the system).
User: only user specific datasets (available to the current user). All: all datasets (system wide and user specific).
Returns#
- list[str]
The names of all available datasets.
- create_or_replace_dataset(name: str, settings: RiskDatasetSettings) RiskDatasetApi #
- abstract create_dataset(name: str, settings: RiskDatasetSettings) RiskDatasetApi #
Creates a new dataset with the given name and settings.
Parameters#
- namestr
The name of the dataset to create.
- settingsRiskDatasetSettings
The settings for the dataset to create.
Raises#
- DatasetError
if a dataset with the given name already exists or if the settings are otherwise invalid
Returns#
- RiskDatasetApi
the API of the newly created dataset
- abstract create_dataset_as_task(name: str, settings: RiskDatasetSettings) Task[RiskDatasetApi] #