Table.add_files
Table.add_files(*, files=None, directory=None, max_parallelization=os.cpu_count() * 5) → list(File)
Uploads either a list of files or all files in a directory to an index table. The index table must be on an unreleased version. Attempting to add files to a non-index table will result in an error.
Parameters:
files
: list(str) | list(dict<path=str, name=str, data=str | bytes>), default None
A list of files to upload. Either this or directory
must be specified, but not both. Can either be a list of file paths, or a list of dicts with the keys path
, name
, and/or data
.
If providing a list of dicts, each dict must specify either path
(the path to the file on disk) or data
, representing the content to upload. name
is optional if path
is specified (defaulting to the file name), but required if data
is specified.
directory
: str, default None
A directory of files to upload. Either this or files
must be specified, but not both. All files in the directory will be uploaded, including hidden files and those in any subdirectories.
max_parallelization
: int, default os.cpu_count() * 5
The maximum concurrency when uploading files. If you have lots of small files, you may want to increase the concurrency, while you may want to decrease it if you have just a few large files.
Returns:
list(File)
Examples:
Last updated