Methods to interact with the user storage resources.
Bases: Enum
Bases: object
Represents a storage operation running remotely via Inductiva API.
Wait for the operation to complete.
Bases: object
Represents the total ZIP size and file contents of a ZIP archive.
Bases: object
Represents information about a file within a ZIP archive.
Bases: object
Represents the byte range of a file within a ZIP archive.
Copies a file or folder from a source path in storage to a target path.
Downloads a file or folder from storage to a local directory, optionally decompressing the contents.
Download a folder from a remote server to the current directory:
inductiva.storage.download(remote_path="/path/to/remote/folder/")
Download a file and save it to a local directory without decompressing:
inductiva.storage.download(remote_path="/path/to/remote/file.zip",
local_dir="/local/directory",
decompress=False)
Download a file inside a zip archive:
inductiva.storage.download(
remote_path="/some_task_id/output.zip/stdout.txt"
)
It is not possible to download folders that are inside zip archives.
Retrieve the byte range (start and end) of the compressed data for a specific file inside a ZIP archive.
Returns the occupied storage size in GB.
Retrieve the contents of a ZIP archive from a given path.
List and display the contents of the user’s storage.
path: Storage directory to list. Default is root.
user’s storage in the default region is return. Specify “all” to include storage from every available region (applies only to users with storage in multiple regions).
This function prints a table with the storage content information: : Name Size Creation Time 1234 5.68 MiB 29 Sep, 14:12:00 12345 374.85 KiB 29 Sep, 14:13:10 1234567 97.59 KiB 29 Sep, 14:13:24 123 0 B 29 Sep, 14:13:29 123456 0 B 29 Sep, 14:13:18
You can use this information to delete the contents you don’t need anymore and further inspect task outputs and logs using the Task class.
Perform the multipart upload using the server.
Removes a file or directory from the remote location.
Parameters:
Upload a local file or directory to a specified remote directory.
Upload a file to a remote directory:
inductiva.storage.upload('local/path/file.txt', 'my_data')
Upload a directory to a remote location:
inductiva.storage.upload('local/path/folder', 'my_data')
Upload a file from a given URL to a specified remote directory.
If no file name is provided, the function extracts the name from the URL.