aistore.sdk.obj.object_attributes

View as MarkdownOpen in Claude

Module Contents

Classes

NameDescription
ChunksInfoInformation about chunked object storage.
ObjectAttributesRepresents the attributes parsed from the response headers returned from an API call to get an object.
ObjectAttributesV2Extended object attributes returned from HeadObjectV2 API.

API

class aistore.sdk.obj.object_attributes.ChunksInfo(
chunk_count: int = 0,
max_chunk_size: int = 0
)
Dataclass

Information about chunked object storage.

chunk_count
int = 0
max_chunk_size
int = 0
class aistore.sdk.obj.object_attributes.ObjectAttributes(
response_headers: requests.structures.CaseInsensitiveDict
)

Represents the attributes parsed from the response headers returned from an API call to get an object.

Parameters:

response_headers
CaseInsensitiveDict

Response header dict containing object attributes

access_time
str

Time this object was accessed.

checksum_type
str

Type of checksum, e.g. xxhash or md5.

checksum_value
str

Checksum value.

custom_metadata
Dict[str, str]

Dictionary of custom metadata.

obj_version
str

Object version.

present
bool

Whether the object is present/cached.

size
int

Size of object content.

aistore.sdk.obj.object_attributes.ObjectAttributes._parse_custom(
custom_md_header
) -> typing.Dict[str, str]
staticmethod

Parse the comma-separated list of optional custom metadata from the custom metadata header.

Parameters:

custom_md_header

Header containing metadata csv

Returns: Dict[str, str]

Dictionary of custom metadata

class aistore.sdk.obj.object_attributes.ObjectAttributesV2()

Bases: ObjectAttributes

Extended object attributes returned from HeadObjectV2 API.

This class extends ObjectAttributes with V2-specific fields like chunk information, last modified time, and ETag.

Parameters:

response_headers
CaseInsensitiveDict

Response header dict containing object attributes

chunks
Optional[ChunksInfo]

Chunk information for chunked objects.

etag
str

Entity tag (ETag) of the object.

last_modified
str

Last modification time of the object (RFC1123 format).