Skip to content

Upload#

lit.sdk.data.upload #

This module provides classes and functions for managing and retrieving information about uploaded files.

Upload dataclass #

Represents an uploaded file.

file_name instance-attribute #

The name of the file.

file_size instance-attribute #

The size, in bytes, of the file.

file_time instance-attribute #

The last write time to the file.

folder instance-attribute #

The folder where the file is stored on disk.

full_path instance-attribute #

Full path to the uploaded file.

group instance-attribute #

The group the file belongs to.

has_cache_error instance-attribute #

Whether or not there was an error attempting to cache this file.

has_cache_file instance-attribute #

Whether or not a cache file exists for this raw file.

host instance-attribute #

The hostname of the machine where the file is store.

owner instance-attribute #

The username who owns the file.

permissions instance-attribute #

The Unix permissions.

get_uploads(team) #

Gets all of the uploads for a given team.

Parameters:

Name Type Description Default
team str

The name of the team.

required

Returns:

Type Description
list[Upload]

A list of paths.

Examples:

>>> uploads = get_uploads("contoso")
>>> uploads[0].full_path, uploads[0].permissions
(Path('/data/contoso/raw/qqq/2011_QQQ.csv.gz'), '-rwxr-xr-x')