atproto_client.client.methods_mixin.headers¶

class atproto_client.client.methods_mixin.headers.HeadersConfigurationMethodsMixin¶

Bases: object

class AtprotoServiceType(value)¶

Bases: Enum

The type of atproto service.

ATPROTO_LABELER = 'atproto_labeler'¶
BSKY_CHAT = 'bsky_chat'¶
BSKY_CHAT_DID: ClassVar[Literal['did:web:api.bsky.chat']] = 'did:web:api.bsky.chat'¶
BSKY_LABELER_DID: ClassVar[Literal['did:plc:ar7c4by46qjdydhdevvrndac']] = 'did:plc:ar7c4by46qjdydhdevvrndac'¶
clone() Self¶

Clone the client instance.

Used to customize atproto proxy and set of labeler services.

Returns:

Cloned client instance.

configure_labelers_header(labeler_dids: List[str]) None¶

Configure the atproto-labelers header to be applied on requests.

Parameters:

labeler_dids – The DIDs of the labelers.

configure_proxy_header(service_type: AtprotoServiceType | str, did: str) None¶

Configure the atproto-proxy header to be applied on requests.

Parameters:
  • service_type – The type of service.

  • did – The DID of the proxy.

with_bsky_chat_proxy() Self¶

Get a new client instance with the atproto-proxy header configured for bsky.chat.

Returns:

Configured client instance.

Return type:

self

with_bsky_labeler() Self¶

Get a new client instance with the atproto-accept-labelers header configured for Bluesky Labeler.

Returns:

Configured client instance.

Return type:

self

with_labelers(labeler_dids: List[str]) Self¶

Get a new client instance with the atproto-accept-labelers header configured.

Parameters:

labeler_dids – The DIDs of the labelers.

Returns:

Configured client instance.

Return type:

self

with_proxy(service_type: AtprotoServiceType | str, did: str) Self¶

Get a new client instance with the atproto-proxy header configured.

Parameters:
  • service_type – The type of service.

  • did – The DID of the proxy.

Returns:

Configured client instance.

Return type:

self