graviti.openapi.file#

Functions about uploading files.

Module Contents#

Functions#

upload_files(access_key, url, owner, dataset, *, draft_number, sheet, files, jobs, pbar)

Upload multiple local files with multithread.

upload_file(access_key, url, owner, dataset, *, draft_number, sheet, file, pbar)

Upload one local file.

graviti.openapi.file.upload_files(access_key, url, owner, dataset, *, draft_number, sheet, files, jobs, pbar)[source]#

Upload multiple local files with multithread.

Parameters
  • access_key (str) – User’s access key.

  • url (str) – The URL of the graviti website.

  • owner (str) – The owner of the dataset.

  • dataset (str) – Name of the dataset, unique for a user.

  • draft_number (int) – The draft number.

  • sheet (str) – The sheet name.

  • files (Iterable[graviti.utility.File]) – The local files to upload.

  • jobs (int) – The number of the max workers in multi-thread uploading procession.

  • pbar (tqdm.tqdm) – The process bar for uploading binary files.

Return type

None

graviti.openapi.file.upload_file(access_key, url, owner, dataset, *, draft_number, sheet, file, pbar)[source]#

Upload one local file.

Parameters
  • access_key (str) – User’s access key.

  • url (str) – The URL of the graviti website.

  • owner (str) – The owner of the dataset.

  • dataset (str) – Name of the dataset, unique for a user.

  • draft_number (int) – The draft number.

  • sheet (str) – The sheet name.

  • file (graviti.utility.File) – The local file to upload.

  • pbar (tqdm.tqdm) – The process bar for uploading binary files.

Return type

None