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.

abstractmethod upload_df(data, table_name, **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

abstractmethod upload_file(file_path, table_name, delim=',', **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 ,

abstractmethod upload_folder(folder_path, table_name=None, delim=',', **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 ,