msticpy.data.uploaders.uploader_base module

Data uploader base class.

class msticpy.data.uploaders.uploader_base.UploaderBase(**kwargs)

Bases: ABC

Base class for data providers.

Initialize new instance.

static get_http_timeout(**kwargs)

Get http timeout from settings or kwargs.

abstract upload_df(data: DataFrame, table_name: str, **kwargs)

Upload a Pandas DataFrame to the data store.

Parameters:
  • data (pd.DataFrame) – The DataFrame to upload

  • table_name (str) – The name of the table to upload the DataFrame to

abstract upload_file(file_path: str, table_name: str, delim: str = ',', **kwargs)

Upload a file to the data store.

Parameters:
  • file_path (str) – Path to the file to upload

  • table_name (str) – The name of the table to upload the file to

  • delim (Optional[str]) – Column deliminator in data file, default is ,

abstract upload_folder(folder_path: str, table_name: str | None = None, delim: str = ',', **kwargs)

Upload a folder of files to the data store.

Parameters:
  • folder_path (str) – Path to the folder of files to upload

  • table_name (Optional[str]) – The name of the table to upload the file to, if not set file name is used as table name

  • delim (Optional[str]) – Column deliminator in data file, default is ,