- General Client
- Mission Database
- TM/TC Processing
- Archive
- Link Management
- Object Storage
- File Transfer
- Time Correlation (TCO)
- Timeline
- Examples
Model¶
- class yamcs.client.Bucket(proto, storage_client: StorageClient)¶
Bases:
object
- delete()¶
Remove this bucket in its entirety.
- delete_object(object_name: str)¶
Remove an object from this bucket.
- Parameters:
object_name – The object to remove.
- property directory: Optional[str]¶
Bucket root directory. This field is only set when the bucket is mapped to the file system. Therefore it is not set for buckets that store objects in RocksDB.
- download_object(object_name: str) → bytes¶
Download an object.
- Parameters:
object_name – The object to fetch.
- list_objects(prefix: Optional[str] = None, delimiter: Optional[str] = None)¶
List the objects for this bucket.
- Parameters:
prefix – If specified, only objects that start with this prefix are listed.
delimiter – If specified, return only objects whose name do not contain the delimiter after the prefix. For the other objects, the response contains (in the prefix response parameter) the name truncated after the delimiter. Duplicates are omitted.
- upload_object(object_name: str, file_obj: Union[str, IO], content_type: Optional[str] = None, metadata: Optional[Mapping[str, str]] = None)¶
Upload an object to this bucket.
- Parameters:
object_name – The target name of the object.
file_obj – The file (or file-like object) to upload.
content_type – The content type associated to this object. This is mainly useful when accessing an object directly via a web browser. If unspecified, a content type may be automatically derived from the specified
file_obj
.metadata – Optional metadata associated to this object.