blob_ref

class atproto_client.models.blob_ref.BlobRef

Bases: BaseModel

Blob reference.

field mime_type: str [Required]

Mime type.

field py_type: typing_extensions.Literal[blob] = 'blob'
field ref: str | bytes | IpldLink [Required]

CID.

field size: int [Required]

Size in bytes.

to_bytes_representation() BlobRef

Get bytes representation.

Note

Used in Firehose, CAR, etc. where bytes are possible.

Warning

It returns new instance.

Returns:

BlobRef in bytes representation.

to_json_representation() BlobRef

Get JSON representation.

Note

Used in XRPC, etc. where JSON is used.

Warning

It returns new instance.

Returns:

BlobRef in JSON representation.

property cid: CID

Get CID.

property is_bytes_representation: bool

Check if it is bytes representation.

Returns:

True if it is bytes representation.

property is_json_representation: bool

Check if it is JSON representation.

Returns:

True if it is JSON representation.

Bases: BaseModel

CID representation in JSON.

CID.