Artifact¶
-
class
tekdrive.models.Artifact(tekdrive: TekDrive, _data: Optional[Dict[str, Any]] = None)¶ Represents a file artifact.
-
bytes¶ Artifact size in bytes.
- Type
str
-
created_at¶ When the artifact was created.
- Type
datetime
-
context_type¶ Context to identify the type of artifact such as
"SETTING"or"CHANNEL".- Type
str
-
file_id¶ ID of the file that the artifact is associated with.
- Type
str
-
file_type¶ Artifact file type such as
"TSS"or"SET".- Type
str
-
id¶ Unique artifact ID.
- Type
str
-
name¶ Artifact name.
- Type
str
-
parent_artifact_id¶ ID of the parent artifact.
-
updated_at¶ When the artifact was last updated.
- Type
datetime, optional
-
download(path_or_writable: Optional[Union[str, IO]] = None) → None¶ Download contents.
- Parameters
path_or_writable – Path to a local file or a writable stream where contents will be written.
- Raises
ClientException – If invalid file path is given.
Examples
Download to local file using path:
here = os.path.dirname(__file__) contents_path = os.path.join(here, "test_file_overwrite.txt") file.download(contents_path)
Download using writable stream:
with open("./download.csv", "wb") as f: file.download(f)
-