atproto_client.namespaces.async_ns

class atproto_client.namespaces.async_ns.AppBskyActorNamespace(client: AsyncClientRaw)

Bases: AsyncNamespaceBase

async get_preferences(params: Params | ParamsDict | None = None, **kwargs: Any) Response

Get private preferences attached to the current account. Expected use is synchronization between multiple devices, and import/export during account migration. Requires auth.

Parameters:
  • params – Parameters.

  • **kwargs – Arbitrary arguments to HTTP request.

Returns:

Output model.

Return type:

models.AppBskyActorGetPreferences.Response

Raises:

atproto.exceptions.AtProtocolError – Base exception.

async get_profile(params: Params | ParamsDict, **kwargs: Any) ProfileViewDetailed

Get detailed profile view of an actor. Does not require auth, but contains relevant metadata with auth.

Parameters:
  • params – Parameters.

  • **kwargs – Arbitrary arguments to HTTP request.

Returns:

Output model.

Return type:

models.AppBskyActorDefs.ProfileViewDetailed

Raises:

atproto.exceptions.AtProtocolError – Base exception.

async get_profiles(params: Params | ParamsDict, **kwargs: Any) Response

Get detailed profile views of multiple actors.

Parameters:
  • params – Parameters.

  • **kwargs – Arbitrary arguments to HTTP request.

Returns:

Output model.

Return type:

models.AppBskyActorGetProfiles.Response

Raises:

atproto.exceptions.AtProtocolError – Base exception.

async get_suggestions(params: Params | ParamsDict | None = None, **kwargs: Any) Response

Get a list of suggested actors. Expected use is discovery of accounts to follow during new account onboarding.

Parameters:
  • params – Parameters.

  • **kwargs – Arbitrary arguments to HTTP request.

Returns:

Output model.

Return type:

models.AppBskyActorGetSuggestions.Response

Raises:

atproto.exceptions.AtProtocolError – Base exception.

async put_preferences(data: Data | DataDict, **kwargs: Any) bool

Set the private preferences attached to the account.

Parameters:
  • data – Input data.

  • **kwargs – Arbitrary arguments to HTTP request.

Returns:

Success status.

Return type:

bool

Raises:

atproto.exceptions.AtProtocolError – Base exception.

async search_actors(params: Params | ParamsDict | None = None, **kwargs: Any) Response

Find actors (profiles) matching search criteria. Does not require auth.

Parameters:
  • params – Parameters.

  • **kwargs – Arbitrary arguments to HTTP request.

Returns:

Output model.

Return type:

models.AppBskyActorSearchActors.Response

Raises:

atproto.exceptions.AtProtocolError – Base exception.

async search_actors_typeahead(params: Params | ParamsDict | None = None, **kwargs: Any) Response

Find actor suggestions for a prefix search term. Expected use is for auto-completion during text field entry. Does not require auth.

Parameters:
  • params – Parameters.

  • **kwargs – Arbitrary arguments to HTTP request.

Returns:

Output model.

Return type:

models.AppBskyActorSearchActorsTypeahead.Response

Raises:

atproto.exceptions.AtProtocolError – Base exception.

class atproto_client.namespaces.async_ns.AppBskyActorProfileRecord(client: AsyncClientRaw)

Bases: AsyncRecordBase

async create(repo: str, record: Record, rkey: str | None = None, swap_commit: str | None = None, validate: bool | None = True, **kwargs: Any) CreateRecordResponse

Create a new record.

Parameters:
  • repo – The repository (DID).

  • record – The record.

  • rkey – The record key (TID).

  • swap_commit – The swap commit.

  • validate – Whether to validate the record.

  • **kwargs – Arbitrary arguments to HTTP request.

Returns:

Create record response.

Return type:

models.AppBskyActorProfile.CreateRecordResponse

Raises:

atproto.exceptions.AtProtocolError – Base exception.

async delete(repo: str, rkey: str, swap_commit: str | None = None, swap_record: str | None = None, **kwargs: Any) bool

Delete a record, or ensure it doesn’t exist.

Parameters:
  • repo – The repository (DID).

  • rkey – The record key (TID).

  • swap_commit – The swap commit.

  • swap_record – The swap record.

  • **kwargs – Arbitrary arguments to HTTP request.

Returns:

Success status.

Return type:

bool

Raises:

atproto.exceptions.AtProtocolError – Base exception.

async get(repo: str, rkey: str, cid: str | None = None, **kwargs: Any) GetRecordResponse

Get a record.

Parameters:
  • repo – The repository (DID).

  • rkey – The record key (TID).

  • cid – The CID of the record.

  • **kwargs – Arbitrary arguments to HTTP request.

Returns:

Get record response.

Return type:

models.AppBskyActorProfile.GetRecordResponse

Raises:

atproto.exceptions.AtProtocolError – Base exception.

async list(repo: str, cursor: str | None = None, limit: int | None = None, reverse: bool | None = None, **kwargs: Any) ListRecordsResponse

List a range of records in a collection.

Parameters:
  • repo – The repository (DID).

  • cursor – The cursor.

  • limit – The limit.

  • reverse – Whether to reverse the order.

  • **kwargs – Arbitrary arguments to HTTP request.

Returns:

List records response.

Return type:

models.AppBskyActorProfile.ListRecordsResponse

Raises:

atproto.exceptions.AtProtocolError – Base exception.

class atproto_client.namespaces.async_ns.AppBskyFeedGeneratorRecord(client: AsyncClientRaw)

Bases: AsyncRecordBase

async create(repo: str, record: Record, rkey: str | None = None, swap_commit: str | None = None, validate: bool | None = True, **kwargs: Any) CreateRecordResponse

Create a new record.

Parameters:
  • repo – The repository (DID).

  • record – The record.

  • rkey – The record key (TID).

  • swap_commit – The swap commit.

  • validate – Whether to validate the record.

  • **kwargs – Arbitrary arguments to HTTP request.

Returns:

Create record response.

Return type:

models.AppBskyFeedGenerator.CreateRecordResponse

Raises:

atproto.exceptions.AtProtocolError – Base exception.

async delete(repo: str, rkey: str, swap_commit: str | None = None, swap_record: str | None = None, **kwargs: Any) bool

Delete a record, or ensure it doesn’t exist.

Parameters:
  • repo – The repository (DID).

  • rkey – The record key (TID).

  • swap_commit – The swap commit.

  • swap_record – The swap record.

  • **kwargs – Arbitrary arguments to HTTP request.

Returns:

Success status.

Return type:

bool

Raises:

atproto.exceptions.AtProtocolError – Base exception.

async get(repo: str, rkey: str, cid: str | None = None, **kwargs: Any) GetRecordResponse

Get a record.

Parameters:
  • repo – The repository (DID).

  • rkey – The record key (TID).

  • cid – The CID of the record.

  • **kwargs – Arbitrary arguments to HTTP request.

Returns:

Get record response.

Return type:

models.AppBskyFeedGenerator.GetRecordResponse

Raises:

atproto.exceptions.AtProtocolError – Base exception.

async list(repo: str, cursor: str | None = None, limit: int | None = None, reverse: bool | None = None, **kwargs: Any) ListRecordsResponse

List a range of records in a collection.

Parameters:
  • repo – The repository (DID).

  • cursor – The cursor.

  • limit – The limit.

  • reverse – Whether to reverse the order.

  • **kwargs – Arbitrary arguments to HTTP request.

Returns:

List records response.

Return type:

models.AppBskyFeedGenerator.ListRecordsResponse

Raises:

atproto.exceptions.AtProtocolError – Base exception.

class atproto_client.namespaces.async_ns.AppBskyFeedLikeRecord(client: AsyncClientRaw)

Bases: AsyncRecordBase

async create(repo: str, record: Record, rkey: str | None = None, swap_commit: str | None = None, validate: bool | None = True, **kwargs: Any) CreateRecordResponse

Create a new record.

Parameters:
  • repo – The repository (DID).

  • record – The record.

  • rkey – The record key (TID).

  • swap_commit – The swap commit.

  • validate – Whether to validate the record.

  • **kwargs – Arbitrary arguments to HTTP request.

Returns:

Create record response.

Return type:

models.AppBskyFeedLike.CreateRecordResponse

Raises:

atproto.exceptions.AtProtocolError – Base exception.

async delete(repo: str, rkey: str, swap_commit: str | None = None, swap_record: str | None = None, **kwargs: Any) bool

Delete a record, or ensure it doesn’t exist.

Parameters:
  • repo – The repository (DID).

  • rkey – The record key (TID).

  • swap_commit – The swap commit.

  • swap_record – The swap record.

  • **kwargs – Arbitrary arguments to HTTP request.

Returns:

Success status.

Return type:

bool

Raises:

atproto.exceptions.AtProtocolError – Base exception.

async get(repo: str, rkey: str, cid: str | None = None, **kwargs: Any) GetRecordResponse

Get a record.

Parameters:
  • repo – The repository (DID).

  • rkey – The record key (TID).

  • cid – The CID of the record.

  • **kwargs – Arbitrary arguments to HTTP request.

Returns:

Get record response.

Return type:

models.AppBskyFeedLike.GetRecordResponse

Raises:

atproto.exceptions.AtProtocolError – Base exception.

async list(repo: str, cursor: str | None = None, limit: int | None = None, reverse: bool | None = None, **kwargs: Any) ListRecordsResponse

List a range of records in a collection.

Parameters:
  • repo – The repository (DID).

  • cursor – The cursor.

  • limit – The limit.

  • reverse – Whether to reverse the order.

  • **kwargs – Arbitrary arguments to HTTP request.

Returns:

List records response.

Return type:

models.AppBskyFeedLike.ListRecordsResponse

Raises:

atproto.exceptions.AtProtocolError – Base exception.

class atproto_client.namespaces.async_ns.AppBskyFeedNamespace(client: AsyncClientRaw)

Bases: AsyncNamespaceBase

async describe_feed_generator(**kwargs: Any) Response

Get information about a feed generator, including policies and offered feed URIs. Does not require auth; implemented by Feed Generator services (not App View).

Parameters:

**kwargs – Arbitrary arguments to HTTP request.

Returns:

Output model.

Return type:

models.AppBskyFeedDescribeFeedGenerator.Response

Raises:

atproto.exceptions.AtProtocolError – Base exception.

async get_actor_feeds(params: Params | ParamsDict, **kwargs: Any) Response

Get a list of feeds (feed generator records) created by the actor (in the actor’s repo).

Parameters:
  • params – Parameters.

  • **kwargs – Arbitrary arguments to HTTP request.

Returns:

Output model.

Return type:

models.AppBskyFeedGetActorFeeds.Response

Raises:

atproto.exceptions.AtProtocolError – Base exception.

async get_actor_likes(params: Params | ParamsDict, **kwargs: Any) Response

Get a list of posts liked by an actor. Requires auth, actor must be the requesting account.

Parameters:
  • params – Parameters.

  • **kwargs – Arbitrary arguments to HTTP request.

Returns:

Output model.

Return type:

models.AppBskyFeedGetActorLikes.Response

Raises:

atproto.exceptions.AtProtocolError – Base exception.

async get_author_feed(params: Params | ParamsDict, **kwargs: Any) Response

Get a view of an actor’s ‘author feed’ (post and reposts by the author). Does not require auth.

Parameters:
  • params – Parameters.

  • **kwargs – Arbitrary arguments to HTTP request.

Returns:

Output model.

Return type:

models.AppBskyFeedGetAuthorFeed.Response

Raises:

atproto.exceptions.AtProtocolError – Base exception.

async get_feed(params: Params | ParamsDict, **kwargs: Any) Response

Get a hydrated feed from an actor’s selected feed generator. Implemented by App View.

Parameters:
  • params – Parameters.

  • **kwargs – Arbitrary arguments to HTTP request.

Returns:

Output model.

Return type:

models.AppBskyFeedGetFeed.Response

Raises:

atproto.exceptions.AtProtocolError – Base exception.

async get_feed_generator(params: Params | ParamsDict, **kwargs: Any) Response

Get information about a feed generator. Implemented by AppView.

Parameters:
  • params – Parameters.

  • **kwargs – Arbitrary arguments to HTTP request.

Returns:

Output model.

Return type:

models.AppBskyFeedGetFeedGenerator.Response

Raises:

atproto.exceptions.AtProtocolError – Base exception.

async get_feed_generators(params: Params | ParamsDict, **kwargs: Any) Response

Get information about a list of feed generators.

Parameters:
  • params – Parameters.

  • **kwargs – Arbitrary arguments to HTTP request.

Returns:

Output model.

Return type:

models.AppBskyFeedGetFeedGenerators.Response

Raises:

atproto.exceptions.AtProtocolError – Base exception.

async get_feed_skeleton(params: Params | ParamsDict, **kwargs: Any) Response

Get a skeleton of a feed provided by a feed generator. Auth is optional, depending on provider requirements, and provides the DID of the requester. Implemented by Feed Generator Service.

Parameters:
  • params – Parameters.

  • **kwargs – Arbitrary arguments to HTTP request.

Returns:

Output model.

Return type:

models.AppBskyFeedGetFeedSkeleton.Response

Raises:

atproto.exceptions.AtProtocolError – Base exception.

async get_likes(params: Params | ParamsDict, **kwargs: Any) Response

Get like records which reference a subject (by AT-URI and CID).

Parameters:
  • params – Parameters.

  • **kwargs – Arbitrary arguments to HTTP request.

Returns:

Output model.

Return type:

models.AppBskyFeedGetLikes.Response

Raises:

atproto.exceptions.AtProtocolError – Base exception.

async get_list_feed(params: Params | ParamsDict, **kwargs: Any) Response

Get a feed of recent posts from a list (posts and reposts from any actors on the list). Does not require auth.

Parameters:
  • params – Parameters.

  • **kwargs – Arbitrary arguments to HTTP request.

Returns:

Output model.

Return type:

models.AppBskyFeedGetListFeed.Response

Raises:

atproto.exceptions.AtProtocolError – Base exception.

async get_post_thread(params: Params | ParamsDict, **kwargs: Any) Response

Get posts in a thread. Does not require auth, but additional metadata and filtering will be applied for authed requests.

Parameters:
  • params – Parameters.

  • **kwargs – Arbitrary arguments to HTTP request.

Returns:

Output model.

Return type:

models.AppBskyFeedGetPostThread.Response

Raises:

atproto.exceptions.AtProtocolError – Base exception.

async get_posts(params: Params | ParamsDict, **kwargs: Any) Response

Gets post views for a specified list of posts (by AT-URI). This is sometimes referred to as ‘hydrating’ a ‘feed skeleton’.

Parameters:
  • params – Parameters.

  • **kwargs – Arbitrary arguments to HTTP request.

Returns:

Output model.

Return type:

models.AppBskyFeedGetPosts.Response

Raises:

atproto.exceptions.AtProtocolError – Base exception.

async get_quotes(params: Params | ParamsDict, **kwargs: Any) Response

Get a list of quotes for a given post.

Parameters:
  • params – Parameters.

  • **kwargs – Arbitrary arguments to HTTP request.

Returns:

Output model.

Return type:

models.AppBskyFeedGetQuotes.Response

Raises:

atproto.exceptions.AtProtocolError – Base exception.

async get_reposted_by(params: Params | ParamsDict, **kwargs: Any) Response

Get a list of reposts for a given post.

Parameters:
  • params – Parameters.

  • **kwargs – Arbitrary arguments to HTTP request.

Returns:

Output model.

Return type:

models.AppBskyFeedGetRepostedBy.Response

Raises:

atproto.exceptions.AtProtocolError – Base exception.

async get_suggested_feeds(params: Params | ParamsDict | None = None, **kwargs: Any) Response

Get a list of suggested feeds (feed generators) for the requesting account.

Parameters:
  • params – Parameters.

  • **kwargs – Arbitrary arguments to HTTP request.

Returns:

Output model.

Return type:

models.AppBskyFeedGetSuggestedFeeds.Response

Raises:

atproto.exceptions.AtProtocolError – Base exception.

async get_timeline(params: Params | ParamsDict | None = None, **kwargs: Any) Response

Get a view of the requesting account’s home timeline. This is expected to be some form of reverse-chronological feed.

Parameters:
  • params – Parameters.

  • **kwargs – Arbitrary arguments to HTTP request.

Returns:

Output model.

Return type:

models.AppBskyFeedGetTimeline.Response

Raises:

atproto.exceptions.AtProtocolError – Base exception.

async search_posts(params: Params | ParamsDict, **kwargs: Any) Response

Find posts matching search criteria, returning views of those posts.

Parameters:
  • params – Parameters.

  • **kwargs – Arbitrary arguments to HTTP request.

Returns:

Output model.

Return type:

models.AppBskyFeedSearchPosts.Response

Raises:

atproto.exceptions.AtProtocolError – Base exception.

async send_interactions(data: Data | DataDict, **kwargs: Any) Response

Send information about interactions with feed items back to the feed generator that served them.

Parameters:
  • data – Input data.

  • **kwargs – Arbitrary arguments to HTTP request.

Returns:

Output model.

Return type:

models.AppBskyFeedSendInteractions.Response

Raises:

atproto.exceptions.AtProtocolError – Base exception.

class atproto_client.namespaces.async_ns.AppBskyFeedPostRecord(client: AsyncClientRaw)

Bases: AsyncRecordBase

async create(repo: str, record: Record, rkey: str | None = None, swap_commit: str | None = None, validate: bool | None = True, **kwargs: Any) CreateRecordResponse

Create a new record.

Parameters:
  • repo – The repository (DID).

  • record – The record.

  • rkey – The record key (TID).

  • swap_commit – The swap commit.

  • validate – Whether to validate the record.

  • **kwargs – Arbitrary arguments to HTTP request.

Returns:

Create record response.

Return type:

models.AppBskyFeedPost.CreateRecordResponse

Raises:

atproto.exceptions.AtProtocolError – Base exception.

async delete(repo: str, rkey: str, swap_commit: str | None = None, swap_record: str | None = None, **kwargs: Any) bool

Delete a record, or ensure it doesn’t exist.

Parameters:
  • repo – The repository (DID).

  • rkey – The record key (TID).

  • swap_commit – The swap commit.

  • swap_record – The swap record.

  • **kwargs – Arbitrary arguments to HTTP request.

Returns:

Success status.

Return type:

bool

Raises:

atproto.exceptions.AtProtocolError – Base exception.

async get(repo: str, rkey: str, cid: str | None = None, **kwargs: Any) GetRecordResponse

Get a record.

Parameters:
  • repo – The repository (DID).

  • rkey – The record key (TID).

  • cid – The CID of the record.

  • **kwargs – Arbitrary arguments to HTTP request.

Returns:

Get record response.

Return type:

models.AppBskyFeedPost.GetRecordResponse

Raises:

atproto.exceptions.AtProtocolError – Base exception.

async list(repo: str, cursor: str | None = None, limit: int | None = None, reverse: bool | None = None, **kwargs: Any) ListRecordsResponse

List a range of records in a collection.

Parameters:
  • repo – The repository (DID).

  • cursor – The cursor.

  • limit – The limit.

  • reverse – Whether to reverse the order.

  • **kwargs – Arbitrary arguments to HTTP request.

Returns:

List records response.

Return type:

models.AppBskyFeedPost.ListRecordsResponse

Raises:

atproto.exceptions.AtProtocolError – Base exception.

class atproto_client.namespaces.async_ns.AppBskyFeedPostgateRecord(client: AsyncClientRaw)

Bases: AsyncRecordBase

async create(repo: str, record: Record, rkey: str | None = None, swap_commit: str | None = None, validate: bool | None = True, **kwargs: Any) CreateRecordResponse

Create a new record.

Parameters:
  • repo – The repository (DID).

  • record – The record.

  • rkey – The record key (TID).

  • swap_commit – The swap commit.

  • validate – Whether to validate the record.

  • **kwargs – Arbitrary arguments to HTTP request.

Returns:

Create record response.

Return type:

models.AppBskyFeedPostgate.CreateRecordResponse

Raises:

atproto.exceptions.AtProtocolError – Base exception.

async delete(repo: str, rkey: str, swap_commit: str | None = None, swap_record: str | None = None, **kwargs: Any) bool

Delete a record, or ensure it doesn’t exist.

Parameters:
  • repo – The repository (DID).

  • rkey – The record key (TID).

  • swap_commit – The swap commit.

  • swap_record – The swap record.

  • **kwargs – Arbitrary arguments to HTTP request.

Returns:

Success status.

Return type:

bool

Raises:

atproto.exceptions.AtProtocolError – Base exception.

async get(repo: str, rkey: str, cid: str | None = None, **kwargs: Any) GetRecordResponse

Get a record.

Parameters:
  • repo – The repository (DID).

  • rkey – The record key (TID).

  • cid – The CID of the record.

  • **kwargs – Arbitrary arguments to HTTP request.

Returns:

Get record response.

Return type:

models.AppBskyFeedPostgate.GetRecordResponse

Raises:

atproto.exceptions.AtProtocolError – Base exception.

async list(repo: str, cursor: str | None = None, limit: int | None = None, reverse: bool | None = None, **kwargs: Any) ListRecordsResponse

List a range of records in a collection.

Parameters:
  • repo – The repository (DID).

  • cursor – The cursor.

  • limit – The limit.

  • reverse – Whether to reverse the order.

  • **kwargs – Arbitrary arguments to HTTP request.

Returns:

List records response.

Return type:

models.AppBskyFeedPostgate.ListRecordsResponse

Raises:

atproto.exceptions.AtProtocolError – Base exception.

class atproto_client.namespaces.async_ns.AppBskyFeedRepostRecord(client: AsyncClientRaw)

Bases: AsyncRecordBase

async create(repo: str, record: Record, rkey: str | None = None, swap_commit: str | None = None, validate: bool | None = True, **kwargs: Any) CreateRecordResponse

Create a new record.

Parameters:
  • repo – The repository (DID).

  • record – The record.

  • rkey – The record key (TID).

  • swap_commit – The swap commit.

  • validate – Whether to validate the record.

  • **kwargs – Arbitrary arguments to HTTP request.

Returns:

Create record response.

Return type:

models.AppBskyFeedRepost.CreateRecordResponse

Raises:

atproto.exceptions.AtProtocolError – Base exception.

async delete(repo: str, rkey: str, swap_commit: str | None = None, swap_record: str | None = None, **kwargs: Any) bool

Delete a record, or ensure it doesn’t exist.

Parameters:
  • repo – The repository (DID).

  • rkey – The record key (TID).

  • swap_commit – The swap commit.

  • swap_record – The swap record.

  • **kwargs – Arbitrary arguments to HTTP request.

Returns:

Success status.

Return type:

bool

Raises:

atproto.exceptions.AtProtocolError – Base exception.

async get(repo: str, rkey: str, cid: str | None = None, **kwargs: Any) GetRecordResponse

Get a record.

Parameters:
  • repo – The repository (DID).

  • rkey – The record key (TID).

  • cid – The CID of the record.

  • **kwargs – Arbitrary arguments to HTTP request.

Returns:

Get record response.

Return type:

models.AppBskyFeedRepost.GetRecordResponse

Raises:

atproto.exceptions.AtProtocolError – Base exception.

async list(repo: str, cursor: str | None = None, limit: int | None = None, reverse: bool | None = None, **kwargs: Any) ListRecordsResponse

List a range of records in a collection.

Parameters:
  • repo – The repository (DID).

  • cursor – The cursor.

  • limit – The limit.

  • reverse – Whether to reverse the order.

  • **kwargs – Arbitrary arguments to HTTP request.

Returns:

List records response.

Return type:

models.AppBskyFeedRepost.ListRecordsResponse

Raises:

atproto.exceptions.AtProtocolError – Base exception.

class atproto_client.namespaces.async_ns.AppBskyFeedThreadgateRecord(client: AsyncClientRaw)

Bases: AsyncRecordBase

async create(repo: str, record: Record, rkey: str | None = None, swap_commit: str | None = None, validate: bool | None = True, **kwargs: Any) CreateRecordResponse

Create a new record.

Parameters:
  • repo – The repository (DID).

  • record – The record.

  • rkey – The record key (TID).

  • swap_commit – The swap commit.

  • validate – Whether to validate the record.

  • **kwargs – Arbitrary arguments to HTTP request.

Returns:

Create record response.

Return type:

models.AppBskyFeedThreadgate.CreateRecordResponse

Raises:

atproto.exceptions.AtProtocolError – Base exception.

async delete(repo: str, rkey: str, swap_commit: str | None = None, swap_record: str | None = None, **kwargs: Any) bool

Delete a record, or ensure it doesn’t exist.

Parameters:
  • repo – The repository (DID).

  • rkey – The record key (TID).

  • swap_commit – The swap commit.

  • swap_record – The swap record.

  • **kwargs – Arbitrary arguments to HTTP request.

Returns:

Success status.

Return type:

bool

Raises:

atproto.exceptions.AtProtocolError – Base exception.

async get(repo: str, rkey: str, cid: str | None = None, **kwargs: Any) GetRecordResponse

Get a record.

Parameters:
  • repo – The repository (DID).

  • rkey – The record key (TID).

  • cid – The CID of the record.

  • **kwargs – Arbitrary arguments to HTTP request.

Returns:

Get record response.

Return type:

models.AppBskyFeedThreadgate.GetRecordResponse

Raises:

atproto.exceptions.AtProtocolError – Base exception.

async list(repo: str, cursor: str | None = None, limit: int | None = None, reverse: bool | None = None, **kwargs: Any) ListRecordsResponse

List a range of records in a collection.

Parameters:
  • repo – The repository (DID).

  • cursor – The cursor.

  • limit – The limit.

  • reverse – Whether to reverse the order.

  • **kwargs – Arbitrary arguments to HTTP request.

Returns:

List records response.

Return type:

models.AppBskyFeedThreadgate.ListRecordsResponse

Raises:

atproto.exceptions.AtProtocolError – Base exception.

class atproto_client.namespaces.async_ns.AppBskyGraphBlockRecord(client: AsyncClientRaw)

Bases: AsyncRecordBase

async create(repo: str, record: Record, rkey: str | None = None, swap_commit: str | None = None, validate: bool | None = True, **kwargs: Any) CreateRecordResponse

Create a new record.

Parameters:
  • repo – The repository (DID).

  • record – The record.

  • rkey – The record key (TID).

  • swap_commit – The swap commit.

  • validate – Whether to validate the record.

  • **kwargs – Arbitrary arguments to HTTP request.

Returns:

Create record response.

Return type:

models.AppBskyGraphBlock.CreateRecordResponse

Raises:

atproto.exceptions.AtProtocolError – Base exception.

async delete(repo: str, rkey: str, swap_commit: str | None = None, swap_record: str | None = None, **kwargs: Any) bool

Delete a record, or ensure it doesn’t exist.

Parameters:
  • repo – The repository (DID).

  • rkey – The record key (TID).

  • swap_commit – The swap commit.

  • swap_record – The swap record.

  • **kwargs – Arbitrary arguments to HTTP request.

Returns:

Success status.

Return type:

bool

Raises:

atproto.exceptions.AtProtocolError – Base exception.

async get(repo: str, rkey: str, cid: str | None = None, **kwargs: Any) GetRecordResponse

Get a record.

Parameters:
  • repo – The repository (DID).

  • rkey – The record key (TID).

  • cid – The CID of the record.

  • **kwargs – Arbitrary arguments to HTTP request.

Returns:

Get record response.

Return type:

models.AppBskyGraphBlock.GetRecordResponse

Raises:

atproto.exceptions.AtProtocolError – Base exception.

async list(repo: str, cursor: str | None = None, limit: int | None = None, reverse: bool | None = None, **kwargs: Any) ListRecordsResponse

List a range of records in a collection.

Parameters:
  • repo – The repository (DID).

  • cursor – The cursor.

  • limit – The limit.

  • reverse – Whether to reverse the order.

  • **kwargs – Arbitrary arguments to HTTP request.

Returns:

List records response.

Return type:

models.AppBskyGraphBlock.ListRecordsResponse

Raises:

atproto.exceptions.AtProtocolError – Base exception.

class atproto_client.namespaces.async_ns.AppBskyGraphFollowRecord(client: AsyncClientRaw)

Bases: AsyncRecordBase

async create(repo: str, record: Record, rkey: str | None = None, swap_commit: str | None = None, validate: bool | None = True, **kwargs: Any) CreateRecordResponse

Create a new record.

Parameters:
  • repo – The repository (DID).

  • record – The record.

  • rkey – The record key (TID).

  • swap_commit – The swap commit.

  • validate – Whether to validate the record.

  • **kwargs – Arbitrary arguments to HTTP request.

Returns:

Create record response.

Return type:

models.AppBskyGraphFollow.CreateRecordResponse

Raises:

atproto.exceptions.AtProtocolError – Base exception.

async delete(repo: str, rkey: str, swap_commit: str | None = None, swap_record: str | None = None, **kwargs: Any) bool

Delete a record, or ensure it doesn’t exist.

Parameters:
  • repo – The repository (DID).

  • rkey – The record key (TID).

  • swap_commit – The swap commit.

  • swap_record – The swap record.

  • **kwargs – Arbitrary arguments to HTTP request.

Returns:

Success status.

Return type:

bool

Raises:

atproto.exceptions.AtProtocolError – Base exception.

async get(repo: str, rkey: str, cid: str | None = None, **kwargs: Any) GetRecordResponse

Get a record.

Parameters:
  • repo – The repository (DID).

  • rkey – The record key (TID).

  • cid – The CID of the record.

  • **kwargs – Arbitrary arguments to HTTP request.

Returns:

Get record response.

Return type:

models.AppBskyGraphFollow.GetRecordResponse

Raises:

atproto.exceptions.AtProtocolError – Base exception.

async list(repo: str, cursor: str | None = None, limit: int | None = None, reverse: bool | None = None, **kwargs: Any) ListRecordsResponse

List a range of records in a collection.

Parameters:
  • repo – The repository (DID).

  • cursor – The cursor.

  • limit – The limit.

  • reverse – Whether to reverse the order.

  • **kwargs – Arbitrary arguments to HTTP request.

Returns:

List records response.

Return type:

models.AppBskyGraphFollow.ListRecordsResponse

Raises:

atproto.exceptions.AtProtocolError – Base exception.

class atproto_client.namespaces.async_ns.AppBskyGraphListRecord(client: AsyncClientRaw)

Bases: AsyncRecordBase

async create(repo: str, record: Record, rkey: str | None = None, swap_commit: str | None = None, validate: bool | None = True, **kwargs: Any) CreateRecordResponse

Create a new record.

Parameters:
  • repo – The repository (DID).

  • record – The record.

  • rkey – The record key (TID).

  • swap_commit – The swap commit.

  • validate – Whether to validate the record.

  • **kwargs – Arbitrary arguments to HTTP request.

Returns:

Create record response.

Return type:

models.AppBskyGraphList.CreateRecordResponse

Raises:

atproto.exceptions.AtProtocolError – Base exception.

async delete(repo: str, rkey: str, swap_commit: str | None = None, swap_record: str | None = None, **kwargs: Any) bool

Delete a record, or ensure it doesn’t exist.

Parameters:
  • repo – The repository (DID).

  • rkey – The record key (TID).

  • swap_commit – The swap commit.

  • swap_record – The swap record.

  • **kwargs – Arbitrary arguments to HTTP request.

Returns:

Success status.

Return type:

bool

Raises:

atproto.exceptions.AtProtocolError – Base exception.

async get(repo: str, rkey: str, cid: str | None = None, **kwargs: Any) GetRecordResponse

Get a record.

Parameters:
  • repo – The repository (DID).

  • rkey – The record key (TID).

  • cid – The CID of the record.

  • **kwargs – Arbitrary arguments to HTTP request.

Returns:

Get record response.

Return type:

models.AppBskyGraphList.GetRecordResponse

Raises:

atproto.exceptions.AtProtocolError – Base exception.

async list(repo: str, cursor: str | None = None, limit: int | None = None, reverse: bool | None = None, **kwargs: Any) ListRecordsResponse

List a range of records in a collection.

Parameters:
  • repo – The repository (DID).

  • cursor – The cursor.

  • limit – The limit.

  • reverse – Whether to reverse the order.

  • **kwargs – Arbitrary arguments to HTTP request.

Returns:

List records response.

Return type:

models.AppBskyGraphList.ListRecordsResponse

Raises:

atproto.exceptions.AtProtocolError – Base exception.

class atproto_client.namespaces.async_ns.AppBskyGraphListblockRecord(client: AsyncClientRaw)

Bases: AsyncRecordBase

async create(repo: str, record: Record, rkey: str | None = None, swap_commit: str | None = None, validate: bool | None = True, **kwargs: Any) CreateRecordResponse

Create a new record.

Parameters:
  • repo – The repository (DID).

  • record – The record.

  • rkey – The record key (TID).

  • swap_commit – The swap commit.

  • validate – Whether to validate the record.

  • **kwargs – Arbitrary arguments to HTTP request.

Returns:

Create record response.

Return type:

models.AppBskyGraphListblock.CreateRecordResponse

Raises:

atproto.exceptions.AtProtocolError – Base exception.

async delete(repo: str, rkey: str, swap_commit: str | None = None, swap_record: str | None = None, **kwargs: Any) bool

Delete a record, or ensure it doesn’t exist.

Parameters:
  • repo – The repository (DID).

  • rkey – The record key (TID).

  • swap_commit – The swap commit.

  • swap_record – The swap record.

  • **kwargs – Arbitrary arguments to HTTP request.

Returns:

Success status.

Return type:

bool

Raises:

atproto.exceptions.AtProtocolError – Base exception.

async get(repo: str, rkey: str, cid: str | None = None, **kwargs: Any) GetRecordResponse

Get a record.

Parameters:
  • repo – The repository (DID).

  • rkey – The record key (TID).

  • cid – The CID of the record.

  • **kwargs – Arbitrary arguments to HTTP request.

Returns:

Get record response.

Return type:

models.AppBskyGraphListblock.GetRecordResponse

Raises:

atproto.exceptions.AtProtocolError – Base exception.

async list(repo: str, cursor: str | None = None, limit: int | None = None, reverse: bool | None = None, **kwargs: Any) ListRecordsResponse

List a range of records in a collection.

Parameters:
  • repo – The repository (DID).

  • cursor – The cursor.

  • limit – The limit.

  • reverse – Whether to reverse the order.

  • **kwargs – Arbitrary arguments to HTTP request.

Returns:

List records response.

Return type:

models.AppBskyGraphListblock.ListRecordsResponse

Raises:

atproto.exceptions.AtProtocolError – Base exception.

class atproto_client.namespaces.async_ns.AppBskyGraphListitemRecord(client: AsyncClientRaw)

Bases: AsyncRecordBase

async create(repo: str, record: Record, rkey: str | None = None, swap_commit: str | None = None, validate: bool | None = True, **kwargs: Any) CreateRecordResponse

Create a new record.

Parameters:
  • repo – The repository (DID).

  • record – The record.

  • rkey – The record key (TID).

  • swap_commit – The swap commit.

  • validate – Whether to validate the record.

  • **kwargs – Arbitrary arguments to HTTP request.

Returns:

Create record response.

Return type:

models.AppBskyGraphListitem.CreateRecordResponse

Raises:

atproto.exceptions.AtProtocolError – Base exception.

async delete(repo: str, rkey: str, swap_commit: str | None = None, swap_record: str | None = None, **kwargs: Any) bool

Delete a record, or ensure it doesn’t exist.

Parameters:
  • repo – The repository (DID).

  • rkey – The record key (TID).

  • swap_commit – The swap commit.

  • swap_record – The swap record.

  • **kwargs – Arbitrary arguments to HTTP request.

Returns:

Success status.

Return type:

bool

Raises:

atproto.exceptions.AtProtocolError – Base exception.

async get(repo: str, rkey: str, cid: str | None = None, **kwargs: Any) GetRecordResponse

Get a record.

Parameters:
  • repo – The repository (DID).

  • rkey – The record key (TID).

  • cid – The CID of the record.

  • **kwargs – Arbitrary arguments to HTTP request.

Returns:

Get record response.

Return type:

models.AppBskyGraphListitem.GetRecordResponse

Raises:

atproto.exceptions.AtProtocolError – Base exception.

async list(repo: str, cursor: str | None = None, limit: int | None = None, reverse: bool | None = None, **kwargs: Any) ListRecordsResponse

List a range of records in a collection.

Parameters:
  • repo – The repository (DID).

  • cursor – The cursor.

  • limit – The limit.

  • reverse – Whether to reverse the order.

  • **kwargs – Arbitrary arguments to HTTP request.

Returns:

List records response.

Return type:

models.AppBskyGraphListitem.ListRecordsResponse

Raises:

atproto.exceptions.AtProtocolError – Base exception.

class atproto_client.namespaces.async_ns.AppBskyGraphNamespace(client: AsyncClientRaw)

Bases: AsyncNamespaceBase

async get_actor_starter_packs(params: Params | ParamsDict, **kwargs: Any) Response

Get a list of starter packs created by the actor.

Parameters:
  • params – Parameters.

  • **kwargs – Arbitrary arguments to HTTP request.

Returns:

Output model.

Return type:

models.AppBskyGraphGetActorStarterPacks.Response

Raises:

atproto.exceptions.AtProtocolError – Base exception.

async get_blocks(params: Params | ParamsDict | None = None, **kwargs: Any) Response

Enumerates which accounts the requesting account is currently blocking. Requires auth.

Parameters:
  • params – Parameters.

  • **kwargs – Arbitrary arguments to HTTP request.

Returns:

Output model.

Return type:

models.AppBskyGraphGetBlocks.Response

Raises:

atproto.exceptions.AtProtocolError – Base exception.

async get_followers(params: Params | ParamsDict, **kwargs: Any) Response

Enumerates accounts which follow a specified account (actor).

Parameters:
  • params – Parameters.

  • **kwargs – Arbitrary arguments to HTTP request.

Returns:

Output model.

Return type:

models.AppBskyGraphGetFollowers.Response

Raises:

atproto.exceptions.AtProtocolError – Base exception.

async get_follows(params: Params | ParamsDict, **kwargs: Any) Response

Enumerates accounts which a specified account (actor) follows.

Parameters:
  • params – Parameters.

  • **kwargs – Arbitrary arguments to HTTP request.

Returns:

Output model.

Return type:

models.AppBskyGraphGetFollows.Response

Raises:

atproto.exceptions.AtProtocolError – Base exception.

async get_known_followers(params: Params | ParamsDict, **kwargs: Any) Response

Enumerates accounts which follow a specified account (actor) and are followed by the viewer.

Parameters:
  • params – Parameters.

  • **kwargs – Arbitrary arguments to HTTP request.

Returns:

Output model.

Return type:

models.AppBskyGraphGetKnownFollowers.Response

Raises:

atproto.exceptions.AtProtocolError – Base exception.

async get_list(params: Params | ParamsDict, **kwargs: Any) Response

Gets a ‘view’ (with additional context) of a specified list.

Parameters:
  • params – Parameters.

  • **kwargs – Arbitrary arguments to HTTP request.

Returns:

Output model.

Return type:

models.AppBskyGraphGetList.Response

Raises:

atproto.exceptions.AtProtocolError – Base exception.

async get_list_blocks(params: Params | ParamsDict | None = None, **kwargs: Any) Response

Get mod lists that the requesting account (actor) is blocking. Requires auth.

Parameters:
  • params – Parameters.

  • **kwargs – Arbitrary arguments to HTTP request.

Returns:

Output model.

Return type:

models.AppBskyGraphGetListBlocks.Response

Raises:

atproto.exceptions.AtProtocolError – Base exception.

async get_list_mutes(params: Params | ParamsDict | None = None, **kwargs: Any) Response

Enumerates mod lists that the requesting account (actor) currently has muted. Requires auth.

Parameters:
  • params – Parameters.

  • **kwargs – Arbitrary arguments to HTTP request.

Returns:

Output model.

Return type:

models.AppBskyGraphGetListMutes.Response

Raises:

atproto.exceptions.AtProtocolError – Base exception.

async get_lists(params: Params | ParamsDict, **kwargs: Any) Response

Enumerates the lists created by a specified account (actor).

Parameters:
  • params – Parameters.

  • **kwargs – Arbitrary arguments to HTTP request.

Returns:

Output model.

Return type:

models.AppBskyGraphGetLists.Response

Raises:

atproto.exceptions.AtProtocolError – Base exception.

async get_mutes(params: Params | ParamsDict | None = None, **kwargs: Any) Response

Enumerates accounts that the requesting account (actor) currently has muted. Requires auth.

Parameters:
  • params – Parameters.

  • **kwargs – Arbitrary arguments to HTTP request.

Returns:

Output model.

Return type:

models.AppBskyGraphGetMutes.Response

Raises:

atproto.exceptions.AtProtocolError – Base exception.

async get_relationships(params: Params | ParamsDict, **kwargs: Any) Response

Enumerates public relationships between one account, and a list of other accounts. Does not require auth.

Parameters:
  • params – Parameters.

  • **kwargs – Arbitrary arguments to HTTP request.

Returns:

Output model.

Return type:

models.AppBskyGraphGetRelationships.Response

Raises:

atproto.exceptions.AtProtocolError – Base exception.

async get_starter_pack(params: Params | ParamsDict, **kwargs: Any) Response

Gets a view of a starter pack.

Parameters:
  • params – Parameters.

  • **kwargs – Arbitrary arguments to HTTP request.

Returns:

Output model.

Return type:

models.AppBskyGraphGetStarterPack.Response

Raises:

atproto.exceptions.AtProtocolError – Base exception.

async get_starter_packs(params: Params | ParamsDict, **kwargs: Any) Response

Get views for a list of starter packs.

Parameters:
  • params – Parameters.

  • **kwargs – Arbitrary arguments to HTTP request.

Returns:

Output model.

Return type:

models.AppBskyGraphGetStarterPacks.Response

Raises:

atproto.exceptions.AtProtocolError – Base exception.

async get_suggested_follows_by_actor(params: Params | ParamsDict, **kwargs: Any) Response

Enumerates follows similar to a given account (actor). Expected use is to recommend additional accounts immediately after following one account.

Parameters:
  • params – Parameters.

  • **kwargs – Arbitrary arguments to HTTP request.

Returns:

Output model.

Return type:

models.AppBskyGraphGetSuggestedFollowsByActor.Response

Raises:

atproto.exceptions.AtProtocolError – Base exception.

async mute_actor(data: Data | DataDict, **kwargs: Any) bool

Creates a mute relationship for the specified account. Mutes are private in Bluesky. Requires auth.

Parameters:
  • data – Input data.

  • **kwargs – Arbitrary arguments to HTTP request.

Returns:

Success status.

Return type:

bool

Raises:

atproto.exceptions.AtProtocolError – Base exception.

async mute_actor_list(data: Data | DataDict, **kwargs: Any) bool

Creates a mute relationship for the specified list of accounts. Mutes are private in Bluesky. Requires auth.

Parameters:
  • data – Input data.

  • **kwargs – Arbitrary arguments to HTTP request.

Returns:

Success status.

Return type:

bool

Raises:

atproto.exceptions.AtProtocolError – Base exception.

async mute_thread(data: Data | DataDict, **kwargs: Any) bool

Mutes a thread preventing notifications from the thread and any of its children. Mutes are private in Bluesky. Requires auth.

Parameters:
  • data – Input data.

  • **kwargs – Arbitrary arguments to HTTP request.

Returns:

Success status.

Return type:

bool

Raises:

atproto.exceptions.AtProtocolError – Base exception.

async unmute_actor(data: Data | DataDict, **kwargs: Any) bool

Unmutes the specified account. Requires auth.

Parameters:
  • data – Input data.

  • **kwargs – Arbitrary arguments to HTTP request.

Returns:

Success status.

Return type:

bool

Raises:

atproto.exceptions.AtProtocolError – Base exception.

async unmute_actor_list(data: Data | DataDict, **kwargs: Any) bool

Unmutes the specified list of accounts. Requires auth.

Parameters:
  • data – Input data.

  • **kwargs – Arbitrary arguments to HTTP request.

Returns:

Success status.

Return type:

bool

Raises:

atproto.exceptions.AtProtocolError – Base exception.

async unmute_thread(data: Data | DataDict, **kwargs: Any) bool

Unmutes the specified thread. Requires auth.

Parameters:
  • data – Input data.

  • **kwargs – Arbitrary arguments to HTTP request.

Returns:

Success status.

Return type:

bool

Raises:

atproto.exceptions.AtProtocolError – Base exception.

class atproto_client.namespaces.async_ns.AppBskyGraphStarterpackRecord(client: AsyncClientRaw)

Bases: AsyncRecordBase

async create(repo: str, record: Record, rkey: str | None = None, swap_commit: str | None = None, validate: bool | None = True, **kwargs: Any) CreateRecordResponse

Create a new record.

Parameters:
  • repo – The repository (DID).

  • record – The record.

  • rkey – The record key (TID).

  • swap_commit – The swap commit.

  • validate – Whether to validate the record.

  • **kwargs – Arbitrary arguments to HTTP request.

Returns:

Create record response.

Return type:

models.AppBskyGraphStarterpack.CreateRecordResponse

Raises:

atproto.exceptions.AtProtocolError – Base exception.

async delete(repo: str, rkey: str, swap_commit: str | None = None, swap_record: str | None = None, **kwargs: Any) bool

Delete a record, or ensure it doesn’t exist.

Parameters:
  • repo – The repository (DID).

  • rkey – The record key (TID).

  • swap_commit – The swap commit.

  • swap_record – The swap record.

  • **kwargs – Arbitrary arguments to HTTP request.

Returns:

Success status.

Return type:

bool

Raises:

atproto.exceptions.AtProtocolError – Base exception.

async get(repo: str, rkey: str, cid: str | None = None, **kwargs: Any) GetRecordResponse

Get a record.

Parameters:
  • repo – The repository (DID).

  • rkey – The record key (TID).

  • cid – The CID of the record.

  • **kwargs – Arbitrary arguments to HTTP request.

Returns:

Get record response.

Return type:

models.AppBskyGraphStarterpack.GetRecordResponse

Raises:

atproto.exceptions.AtProtocolError – Base exception.

async list(repo: str, cursor: str | None = None, limit: int | None = None, reverse: bool | None = None, **kwargs: Any) ListRecordsResponse

List a range of records in a collection.

Parameters:
  • repo – The repository (DID).

  • cursor – The cursor.

  • limit – The limit.

  • reverse – Whether to reverse the order.

  • **kwargs – Arbitrary arguments to HTTP request.

Returns:

List records response.

Return type:

models.AppBskyGraphStarterpack.ListRecordsResponse

Raises:

atproto.exceptions.AtProtocolError – Base exception.

class atproto_client.namespaces.async_ns.AppBskyLabelerNamespace(client: AsyncClientRaw)

Bases: AsyncNamespaceBase

async get_services(params: Params | ParamsDict, **kwargs: Any) Response

Get information about a list of labeler services.

Parameters:
  • params – Parameters.

  • **kwargs – Arbitrary arguments to HTTP request.

Returns:

Output model.

Return type:

models.AppBskyLabelerGetServices.Response

Raises:

atproto.exceptions.AtProtocolError – Base exception.

class atproto_client.namespaces.async_ns.AppBskyLabelerServiceRecord(client: AsyncClientRaw)

Bases: AsyncRecordBase

async create(repo: str, record: Record, rkey: str | None = None, swap_commit: str | None = None, validate: bool | None = True, **kwargs: Any) CreateRecordResponse

Create a new record.

Parameters:
  • repo – The repository (DID).

  • record – The record.

  • rkey – The record key (TID).

  • swap_commit – The swap commit.

  • validate – Whether to validate the record.

  • **kwargs – Arbitrary arguments to HTTP request.

Returns:

Create record response.

Return type:

models.AppBskyLabelerService.CreateRecordResponse

Raises:

atproto.exceptions.AtProtocolError – Base exception.

async delete(repo: str, rkey: str, swap_commit: str | None = None, swap_record: str | None = None, **kwargs: Any) bool

Delete a record, or ensure it doesn’t exist.

Parameters:
  • repo – The repository (DID).

  • rkey – The record key (TID).

  • swap_commit – The swap commit.

  • swap_record – The swap record.

  • **kwargs – Arbitrary arguments to HTTP request.

Returns:

Success status.

Return type:

bool

Raises:

atproto.exceptions.AtProtocolError – Base exception.

async get(repo: str, rkey: str, cid: str | None = None, **kwargs: Any) GetRecordResponse

Get a record.

Parameters:
  • repo – The repository (DID).

  • rkey – The record key (TID).

  • cid – The CID of the record.

  • **kwargs – Arbitrary arguments to HTTP request.

Returns:

Get record response.

Return type:

models.AppBskyLabelerService.GetRecordResponse

Raises:

atproto.exceptions.AtProtocolError – Base exception.

async list(repo: str, cursor: str | None = None, limit: int | None = None, reverse: bool | None = None, **kwargs: Any) ListRecordsResponse

List a range of records in a collection.

Parameters:
  • repo – The repository (DID).

  • cursor – The cursor.

  • limit – The limit.

  • reverse – Whether to reverse the order.

  • **kwargs – Arbitrary arguments to HTTP request.

Returns:

List records response.

Return type:

models.AppBskyLabelerService.ListRecordsResponse

Raises:

atproto.exceptions.AtProtocolError – Base exception.

class atproto_client.namespaces.async_ns.AppBskyNamespace(client: AsyncClientRaw)

Bases: AsyncNamespaceBase

class atproto_client.namespaces.async_ns.AppBskyNotificationNamespace(client: AsyncClientRaw)

Bases: AsyncNamespaceBase

async get_unread_count(params: Params | ParamsDict | None = None, **kwargs: Any) Response

Count the number of unread notifications for the requesting account. Requires auth.

Parameters:
  • params – Parameters.

  • **kwargs – Arbitrary arguments to HTTP request.

Returns:

Output model.

Return type:

models.AppBskyNotificationGetUnreadCount.Response

Raises:

atproto.exceptions.AtProtocolError – Base exception.

async list_notifications(params: Params | ParamsDict | None = None, **kwargs: Any) Response

Enumerate notifications for the requesting account. Requires auth.

Parameters:
  • params – Parameters.

  • **kwargs – Arbitrary arguments to HTTP request.

Returns:

Output model.

Return type:

models.AppBskyNotificationListNotifications.Response

Raises:

atproto.exceptions.AtProtocolError – Base exception.

async put_preferences(data: Data | DataDict, **kwargs: Any) bool

Set notification-related preferences for an account. Requires auth.

Parameters:
  • data – Input data.

  • **kwargs – Arbitrary arguments to HTTP request.

Returns:

Success status.

Return type:

bool

Raises:

atproto.exceptions.AtProtocolError – Base exception.

async register_push(data: Data | DataDict, **kwargs: Any) bool

Register to receive push notifications, via a specified service, for the requesting account. Requires auth.

Parameters:
  • data – Input data.

  • **kwargs – Arbitrary arguments to HTTP request.

Returns:

Success status.

Return type:

bool

Raises:

atproto.exceptions.AtProtocolError – Base exception.

async update_seen(data: Data | DataDict, **kwargs: Any) bool

Notify server that the requesting account has seen notifications. Requires auth.

Parameters:
  • data – Input data.

  • **kwargs – Arbitrary arguments to HTTP request.

Returns:

Success status.

Return type:

bool

Raises:

atproto.exceptions.AtProtocolError – Base exception.

class atproto_client.namespaces.async_ns.AppBskyUnspeccedNamespace(client: AsyncClientRaw)

Bases: AsyncNamespaceBase

An unspecced view of globally popular feed generators.

Parameters:
  • params – Parameters.

  • **kwargs – Arbitrary arguments to HTTP request.

Returns:

Output model.

Return type:

models.AppBskyUnspeccedGetPopularFeedGenerators.Response

Raises:

atproto.exceptions.AtProtocolError – Base exception.

async get_suggestions_skeleton(params: Params | ParamsDict | None = None, **kwargs: Any) Response

Get a skeleton of suggested actors. Intended to be called and then hydrated through app.bsky.actor.getSuggestions.

Parameters:
  • params – Parameters.

  • **kwargs – Arbitrary arguments to HTTP request.

Returns:

Output model.

Return type:

models.AppBskyUnspeccedGetSuggestionsSkeleton.Response

Raises:

atproto.exceptions.AtProtocolError – Base exception.

async get_tagged_suggestions(params: Params | ParamsDict | None = None, **kwargs: Any) Response

Get a list of suggestions (feeds and users) tagged with categories.

Parameters:
  • params – Parameters.

  • **kwargs – Arbitrary arguments to HTTP request.

Returns:

Output model.

Return type:

models.AppBskyUnspeccedGetTaggedSuggestions.Response

Raises:

atproto.exceptions.AtProtocolError – Base exception.

async search_actors_skeleton(params: Params | ParamsDict, **kwargs: Any) Response

Backend Actors (profile) search, returns only skeleton.

Parameters:
  • params – Parameters.

  • **kwargs – Arbitrary arguments to HTTP request.

Returns:

Output model.

Return type:

models.AppBskyUnspeccedSearchActorsSkeleton.Response

Raises:

atproto.exceptions.AtProtocolError – Base exception.

async search_posts_skeleton(params: Params | ParamsDict, **kwargs: Any) Response

Backend Posts search, returns only skeleton.

Parameters:
  • params – Parameters.

  • **kwargs – Arbitrary arguments to HTTP request.

Returns:

Output model.

Return type:

models.AppBskyUnspeccedSearchPostsSkeleton.Response

Raises:

atproto.exceptions.AtProtocolError – Base exception.

class atproto_client.namespaces.async_ns.AppBskyVideoNamespace(client: AsyncClientRaw)

Bases: AsyncNamespaceBase

async get_job_status(params: Params | ParamsDict, **kwargs: Any) Response

Get status details for a video processing job.

Parameters:
  • params – Parameters.

  • **kwargs – Arbitrary arguments to HTTP request.

Returns:

Output model.

Return type:

models.AppBskyVideoGetJobStatus.Response

Raises:

atproto.exceptions.AtProtocolError – Base exception.

async get_upload_limits(**kwargs: Any) Response

Get video upload limits for the authenticated user.

Parameters:

**kwargs – Arbitrary arguments to HTTP request.

Returns:

Output model.

Return type:

models.AppBskyVideoGetUploadLimits.Response

Raises:

atproto.exceptions.AtProtocolError – Base exception.

async upload_video(data: bytes, **kwargs: Any) Response

Upload a video to be processed then stored on the PDS.

Parameters:
  • data – Input data alias.

  • **kwargs – Arbitrary arguments to HTTP request.

Returns:

Output model.

Return type:

models.AppBskyVideoUploadVideo.Response

Raises:

atproto.exceptions.AtProtocolError – Base exception.

class atproto_client.namespaces.async_ns.AppNamespace(client: AsyncClientRaw)

Bases: AsyncNamespaceBase

class atproto_client.namespaces.async_ns.ChatBskyActorDeclarationRecord(client: AsyncClientRaw)

Bases: AsyncRecordBase

async create(repo: str, record: Record, rkey: str | None = None, swap_commit: str | None = None, validate: bool | None = True, **kwargs: Any) CreateRecordResponse

Create a new record.

Parameters:
  • repo – The repository (DID).

  • record – The record.

  • rkey – The record key (TID).

  • swap_commit – The swap commit.

  • validate – Whether to validate the record.

  • **kwargs – Arbitrary arguments to HTTP request.

Returns:

Create record response.

Return type:

models.ChatBskyActorDeclaration.CreateRecordResponse

Raises:

atproto.exceptions.AtProtocolError – Base exception.

async delete(repo: str, rkey: str, swap_commit: str | None = None, swap_record: str | None = None, **kwargs: Any) bool

Delete a record, or ensure it doesn’t exist.

Parameters:
  • repo – The repository (DID).

  • rkey – The record key (TID).

  • swap_commit – The swap commit.

  • swap_record – The swap record.

  • **kwargs – Arbitrary arguments to HTTP request.

Returns:

Success status.

Return type:

bool

Raises:

atproto.exceptions.AtProtocolError – Base exception.

async get(repo: str, rkey: str, cid: str | None = None, **kwargs: Any) GetRecordResponse

Get a record.

Parameters:
  • repo – The repository (DID).

  • rkey – The record key (TID).

  • cid – The CID of the record.

  • **kwargs – Arbitrary arguments to HTTP request.

Returns:

Get record response.

Return type:

models.ChatBskyActorDeclaration.GetRecordResponse

Raises:

atproto.exceptions.AtProtocolError – Base exception.

async list(repo: str, cursor: str | None = None, limit: int | None = None, reverse: bool | None = None, **kwargs: Any) ListRecordsResponse

List a range of records in a collection.

Parameters:
  • repo – The repository (DID).

  • cursor – The cursor.

  • limit – The limit.

  • reverse – Whether to reverse the order.

  • **kwargs – Arbitrary arguments to HTTP request.

Returns:

List records response.

Return type:

models.ChatBskyActorDeclaration.ListRecordsResponse

Raises:

atproto.exceptions.AtProtocolError – Base exception.

class atproto_client.namespaces.async_ns.ChatBskyActorNamespace(client: AsyncClientRaw)

Bases: AsyncNamespaceBase

async delete_account(**kwargs: Any) Response

Delete account.

Parameters:

**kwargs – Arbitrary arguments to HTTP request.

Returns:

Output model.

Return type:

models.ChatBskyActorDeleteAccount.Response

Raises:

atproto.exceptions.AtProtocolError – Base exception.

async export_account_data(**kwargs: Any) bytes

Export account data.

Parameters:

**kwargs – Arbitrary arguments to HTTP request.

Returns:

Output model.

Return type:

models.ChatBskyActorExportAccountData.Response

Raises:

atproto.exceptions.AtProtocolError – Base exception.

class atproto_client.namespaces.async_ns.ChatBskyConvoNamespace(client: AsyncClientRaw)

Bases: AsyncNamespaceBase

async delete_message_for_self(data: Data | DataDict, **kwargs: Any) DeletedMessageView

Delete message for self.

Parameters:
  • data – Input data.

  • **kwargs – Arbitrary arguments to HTTP request.

Returns:

Output model.

Return type:

models.ChatBskyConvoDefs.DeletedMessageView

Raises:

atproto.exceptions.AtProtocolError – Base exception.

async get_convo(params: Params | ParamsDict, **kwargs: Any) Response

Get convo.

Parameters:
  • params – Parameters.

  • **kwargs – Arbitrary arguments to HTTP request.

Returns:

Output model.

Return type:

models.ChatBskyConvoGetConvo.Response

Raises:

atproto.exceptions.AtProtocolError – Base exception.

async get_convo_for_members(params: Params | ParamsDict, **kwargs: Any) Response

Get convo for members.

Parameters:
  • params – Parameters.

  • **kwargs – Arbitrary arguments to HTTP request.

Returns:

Output model.

Return type:

models.ChatBskyConvoGetConvoForMembers.Response

Raises:

atproto.exceptions.AtProtocolError – Base exception.

async get_log(params: Params | ParamsDict | None = None, **kwargs: Any) Response

Get log.

Parameters:
  • params – Parameters.

  • **kwargs – Arbitrary arguments to HTTP request.

Returns:

Output model.

Return type:

models.ChatBskyConvoGetLog.Response

Raises:

atproto.exceptions.AtProtocolError – Base exception.

async get_messages(params: Params | ParamsDict, **kwargs: Any) Response

Get messages.

Parameters:
  • params – Parameters.

  • **kwargs – Arbitrary arguments to HTTP request.

Returns:

Output model.

Return type:

models.ChatBskyConvoGetMessages.Response

Raises:

atproto.exceptions.AtProtocolError – Base exception.

async leave_convo(data: Data | DataDict, **kwargs: Any) Response

Leave convo.

Parameters:
  • data – Input data.

  • **kwargs – Arbitrary arguments to HTTP request.

Returns:

Output model.

Return type:

models.ChatBskyConvoLeaveConvo.Response

Raises:

atproto.exceptions.AtProtocolError – Base exception.

async list_convos(params: Params | ParamsDict | None = None, **kwargs: Any) Response

List convos.

Parameters:
  • params – Parameters.

  • **kwargs – Arbitrary arguments to HTTP request.

Returns:

Output model.

Return type:

models.ChatBskyConvoListConvos.Response

Raises:

atproto.exceptions.AtProtocolError – Base exception.

async mute_convo(data: Data | DataDict, **kwargs: Any) Response

Mute convo.

Parameters:
  • data – Input data.

  • **kwargs – Arbitrary arguments to HTTP request.

Returns:

Output model.

Return type:

models.ChatBskyConvoMuteConvo.Response

Raises:

atproto.exceptions.AtProtocolError – Base exception.

async send_message(data: Data | DataDict, **kwargs: Any) MessageView

Send message.

Parameters:
  • data – Input data.

  • **kwargs – Arbitrary arguments to HTTP request.

Returns:

Output model.

Return type:

models.ChatBskyConvoDefs.MessageView

Raises:

atproto.exceptions.AtProtocolError – Base exception.

async send_message_batch(data: Data | DataDict, **kwargs: Any) Response

Send message batch.

Parameters:
  • data – Input data.

  • **kwargs – Arbitrary arguments to HTTP request.

Returns:

Output model.

Return type:

models.ChatBskyConvoSendMessageBatch.Response

Raises:

atproto.exceptions.AtProtocolError – Base exception.

async unmute_convo(data: Data | DataDict, **kwargs: Any) Response

Unmute convo.

Parameters:
  • data – Input data.

  • **kwargs – Arbitrary arguments to HTTP request.

Returns:

Output model.

Return type:

models.ChatBskyConvoUnmuteConvo.Response

Raises:

atproto.exceptions.AtProtocolError – Base exception.

async update_read(data: Data | DataDict, **kwargs: Any) Response

Update read.

Parameters:
  • data – Input data.

  • **kwargs – Arbitrary arguments to HTTP request.

Returns:

Output model.

Return type:

models.ChatBskyConvoUpdateRead.Response

Raises:

atproto.exceptions.AtProtocolError – Base exception.

class atproto_client.namespaces.async_ns.ChatBskyModerationNamespace(client: AsyncClientRaw)

Bases: AsyncNamespaceBase

async get_actor_metadata(params: Params | ParamsDict, **kwargs: Any) Response

Get actor metadata.

Parameters:
  • params – Parameters.

  • **kwargs – Arbitrary arguments to HTTP request.

Returns:

Output model.

Return type:

models.ChatBskyModerationGetActorMetadata.Response

Raises:

atproto.exceptions.AtProtocolError – Base exception.

async get_message_context(params: Params | ParamsDict, **kwargs: Any) Response

Get message context.

Parameters:
  • params – Parameters.

  • **kwargs – Arbitrary arguments to HTTP request.

Returns:

Output model.

Return type:

models.ChatBskyModerationGetMessageContext.Response

Raises:

atproto.exceptions.AtProtocolError – Base exception.

async update_actor_access(data: Data | DataDict, **kwargs: Any) bool

Update actor access.

Parameters:
  • data – Input data.

  • **kwargs – Arbitrary arguments to HTTP request.

Returns:

Success status.

Return type:

bool

Raises:

atproto.exceptions.AtProtocolError – Base exception.

class atproto_client.namespaces.async_ns.ChatBskyNamespace(client: AsyncClientRaw)

Bases: AsyncNamespaceBase

class atproto_client.namespaces.async_ns.ChatNamespace(client: AsyncClientRaw)

Bases: AsyncNamespaceBase

class atproto_client.namespaces.async_ns.ComAtprotoAdminNamespace(client: AsyncClientRaw)

Bases: AsyncNamespaceBase

async delete_account(data: Data | DataDict, **kwargs: Any) bool

Delete a user account as an administrator.

Parameters:
  • data – Input data.

  • **kwargs – Arbitrary arguments to HTTP request.

Returns:

Success status.

Return type:

bool

Raises:

atproto.exceptions.AtProtocolError – Base exception.

async disable_account_invites(data: Data | DataDict, **kwargs: Any) bool

Disable an account from receiving new invite codes, but does not invalidate existing codes.

Parameters:
  • data – Input data.

  • **kwargs – Arbitrary arguments to HTTP request.

Returns:

Success status.

Return type:

bool

Raises:

atproto.exceptions.AtProtocolError – Base exception.

async disable_invite_codes(data: Data | DataDict | None = None, **kwargs: Any) bool

Disable some set of codes and/or all codes associated with a set of users.

Parameters:
  • data – Input data.

  • **kwargs – Arbitrary arguments to HTTP request.

Returns:

Success status.

Return type:

bool

Raises:

atproto.exceptions.AtProtocolError – Base exception.

async enable_account_invites(data: Data | DataDict, **kwargs: Any) bool

Re-enable an account’s ability to receive invite codes.

Parameters:
  • data – Input data.

  • **kwargs – Arbitrary arguments to HTTP request.

Returns:

Success status.

Return type:

bool

Raises:

atproto.exceptions.AtProtocolError – Base exception.

async get_account_info(params: Params | ParamsDict, **kwargs: Any) AccountView

Get details about an account.

Parameters:
  • params – Parameters.

  • **kwargs – Arbitrary arguments to HTTP request.

Returns:

Output model.

Return type:

models.ComAtprotoAdminDefs.AccountView

Raises:

atproto.exceptions.AtProtocolError – Base exception.

async get_account_infos(params: Params | ParamsDict, **kwargs: Any) Response

Get details about some accounts.

Parameters:
  • params – Parameters.

  • **kwargs – Arbitrary arguments to HTTP request.

Returns:

Output model.

Return type:

models.ComAtprotoAdminGetAccountInfos.Response

Raises:

atproto.exceptions.AtProtocolError – Base exception.

async get_invite_codes(params: Params | ParamsDict | None = None, **kwargs: Any) Response

Get an admin view of invite codes.

Parameters:
  • params – Parameters.

  • **kwargs – Arbitrary arguments to HTTP request.

Returns:

Output model.

Return type:

models.ComAtprotoAdminGetInviteCodes.Response

Raises:

atproto.exceptions.AtProtocolError – Base exception.

async get_subject_status(params: Params | ParamsDict | None = None, **kwargs: Any) Response

Get the service-specific admin status of a subject (account, record, or blob).

Parameters:
  • params – Parameters.

  • **kwargs – Arbitrary arguments to HTTP request.

Returns:

Output model.

Return type:

models.ComAtprotoAdminGetSubjectStatus.Response

Raises:

atproto.exceptions.AtProtocolError – Base exception.

async search_accounts(params: Params | ParamsDict | None = None, **kwargs: Any) Response

Get list of accounts that matches your search query.

Parameters:
  • params – Parameters.

  • **kwargs – Arbitrary arguments to HTTP request.

Returns:

Output model.

Return type:

models.ComAtprotoAdminSearchAccounts.Response

Raises:

atproto.exceptions.AtProtocolError – Base exception.

async send_email(data: Data | DataDict, **kwargs: Any) Response

Send email to a user’s account email address.

Parameters:
  • data – Input data.

  • **kwargs – Arbitrary arguments to HTTP request.

Returns:

Output model.

Return type:

models.ComAtprotoAdminSendEmail.Response

Raises:

atproto.exceptions.AtProtocolError – Base exception.

async update_account_email(data: Data | DataDict, **kwargs: Any) bool

Administrative action to update an account’s email.

Parameters:
  • data – Input data.

  • **kwargs – Arbitrary arguments to HTTP request.

Returns:

Success status.

Return type:

bool

Raises:

atproto.exceptions.AtProtocolError – Base exception.

async update_account_handle(data: Data | DataDict, **kwargs: Any) bool

Administrative action to update an account’s handle.

Parameters:
  • data – Input data.

  • **kwargs – Arbitrary arguments to HTTP request.

Returns:

Success status.

Return type:

bool

Raises:

atproto.exceptions.AtProtocolError – Base exception.

async update_account_password(data: Data | DataDict, **kwargs: Any) bool

Update the password for a user account as an administrator.

Parameters:
  • data – Input data.

  • **kwargs – Arbitrary arguments to HTTP request.

Returns:

Success status.

Return type:

bool

Raises:

atproto.exceptions.AtProtocolError – Base exception.

async update_subject_status(data: Data | DataDict, **kwargs: Any) Response

Update the service-specific admin status of a subject (account, record, or blob).

Parameters:
  • data – Input data.

  • **kwargs – Arbitrary arguments to HTTP request.

Returns:

Output model.

Return type:

models.ComAtprotoAdminUpdateSubjectStatus.Response

Raises:

atproto.exceptions.AtProtocolError – Base exception.

class atproto_client.namespaces.async_ns.ComAtprotoIdentityNamespace(client: AsyncClientRaw)

Bases: AsyncNamespaceBase

Describe the credentials that should be included in the DID doc of an account that is migrating to this service.

Parameters:

**kwargs – Arbitrary arguments to HTTP request.

Returns:

Output model.

Return type:

models.ComAtprotoIdentityGetRecommendedDidCredentials.Response

Raises:

atproto.exceptions.AtProtocolError – Base exception.

async request_plc_operation_signature(**kwargs: Any) bool

Request an email with a code to in order to request a signed PLC operation. Requires Auth.

Parameters:

**kwargs – Arbitrary arguments to HTTP request.

Returns:

Success status.

Return type:

bool

Raises:

atproto.exceptions.AtProtocolError – Base exception.

async resolve_handle(params: Params | ParamsDict, **kwargs: Any) Response

Resolves a handle (domain name) to a DID.

Parameters:
  • params – Parameters.

  • **kwargs – Arbitrary arguments to HTTP request.

Returns:

Output model.

Return type:

models.ComAtprotoIdentityResolveHandle.Response

Raises:

atproto.exceptions.AtProtocolError – Base exception.

async sign_plc_operation(data: Data | DataDict | None = None, **kwargs: Any) Response

Signs a PLC operation to update some value(s) in the requesting DID’s document.

Parameters:
  • data – Input data.

  • **kwargs – Arbitrary arguments to HTTP request.

Returns:

Output model.

Return type:

models.ComAtprotoIdentitySignPlcOperation.Response

Raises:

atproto.exceptions.AtProtocolError – Base exception.

async submit_plc_operation(data: Data | DataDict, **kwargs: Any) bool

Validates a PLC operation to ensure that it doesn’t violate a service’s constraints or get the identity into a bad state, then submits it to the PLC registry.

Parameters:
  • data – Input data.

  • **kwargs – Arbitrary arguments to HTTP request.

Returns:

Success status.

Return type:

bool

Raises:

atproto.exceptions.AtProtocolError – Base exception.

async update_handle(data: Data | DataDict, **kwargs: Any) bool

Updates the current account’s handle. Verifies handle validity, and updates did:plc document if necessary. Implemented by PDS, and requires auth.

Parameters:
  • data – Input data.

  • **kwargs – Arbitrary arguments to HTTP request.

Returns:

Success status.

Return type:

bool

Raises:

atproto.exceptions.AtProtocolError – Base exception.

class atproto_client.namespaces.async_ns.ComAtprotoLabelNamespace(client: AsyncClientRaw)

Bases: AsyncNamespaceBase

async query_labels(params: Params | ParamsDict, **kwargs: Any) Response

Find labels relevant to the provided AT-URI patterns. Public endpoint for moderation services, though may return different or additional results with auth.

Parameters:
  • params – Parameters.

  • **kwargs – Arbitrary arguments to HTTP request.

Returns:

Output model.

Return type:

models.ComAtprotoLabelQueryLabels.Response

Raises:

atproto.exceptions.AtProtocolError – Base exception.

class atproto_client.namespaces.async_ns.ComAtprotoModerationNamespace(client: AsyncClientRaw)

Bases: AsyncNamespaceBase

async create_report(data: Data | DataDict, **kwargs: Any) Response

Submit a moderation report regarding an atproto account or record. Implemented by moderation services (with PDS proxying), and requires auth.

Parameters:
  • data – Input data.

  • **kwargs – Arbitrary arguments to HTTP request.

Returns:

Output model.

Return type:

models.ComAtprotoModerationCreateReport.Response

Raises:

atproto.exceptions.AtProtocolError – Base exception.

class atproto_client.namespaces.async_ns.ComAtprotoNamespace(client: AsyncClientRaw)

Bases: AsyncNamespaceBase

class atproto_client.namespaces.async_ns.ComAtprotoRepoNamespace(client: AsyncClientRaw)

Bases: AsyncNamespaceBase

async apply_writes(data: Data | DataDict, **kwargs: Any) Response

Apply a batch transaction of repository creates, updates, and deletes. Requires auth, implemented by PDS.

Parameters:
  • data – Input data.

  • **kwargs – Arbitrary arguments to HTTP request.

Returns:

Output model.

Return type:

models.ComAtprotoRepoApplyWrites.Response

Raises:

atproto.exceptions.AtProtocolError – Base exception.

async create_record(data: Data | DataDict, **kwargs: Any) Response

Create a single new repository record. Requires auth, implemented by PDS.

Parameters:
  • data – Input data.

  • **kwargs – Arbitrary arguments to HTTP request.

Returns:

Output model.

Return type:

models.ComAtprotoRepoCreateRecord.Response

Raises:

atproto.exceptions.AtProtocolError – Base exception.

async delete_record(data: Data | DataDict, **kwargs: Any) Response

Delete a repository record, or ensure it doesn’t exist. Requires auth, implemented by PDS.

Parameters:
  • data – Input data.

  • **kwargs – Arbitrary arguments to HTTP request.

Returns:

Output model.

Return type:

models.ComAtprotoRepoDeleteRecord.Response

Raises:

atproto.exceptions.AtProtocolError – Base exception.

async describe_repo(params: Params | ParamsDict, **kwargs: Any) Response

Get information about an account and repository, including the list of collections. Does not require auth.

Parameters:
  • params – Parameters.

  • **kwargs – Arbitrary arguments to HTTP request.

Returns:

Output model.

Return type:

models.ComAtprotoRepoDescribeRepo.Response

Raises:

atproto.exceptions.AtProtocolError – Base exception.

async get_record(params: Params | ParamsDict, **kwargs: Any) Response

Get a single record from a repository. Does not require auth.

Parameters:
  • params – Parameters.

  • **kwargs – Arbitrary arguments to HTTP request.

Returns:

Output model.

Return type:

models.ComAtprotoRepoGetRecord.Response

Raises:

atproto.exceptions.AtProtocolError – Base exception.

async import_repo(data: bytes, **kwargs: Any) bool

Import a repo in the form of a CAR file. Requires Content-Length HTTP header to be set.

Parameters:
  • data – Input data alias.

  • **kwargs – Arbitrary arguments to HTTP request.

Returns:

Success status.

Return type:

bool

Raises:

atproto.exceptions.AtProtocolError – Base exception.

async list_missing_blobs(params: Params | ParamsDict | None = None, **kwargs: Any) Response

Returns a list of missing blobs for the requesting account. Intended to be used in the account migration flow.

Parameters:
  • params – Parameters.

  • **kwargs – Arbitrary arguments to HTTP request.

Returns:

Output model.

Return type:

models.ComAtprotoRepoListMissingBlobs.Response

Raises:

atproto.exceptions.AtProtocolError – Base exception.

async list_records(params: Params | ParamsDict, **kwargs: Any) Response

List a range of records in a repository, matching a specific collection. Does not require auth.

Parameters:
  • params – Parameters.

  • **kwargs – Arbitrary arguments to HTTP request.

Returns:

Output model.

Return type:

models.ComAtprotoRepoListRecords.Response

Raises:

atproto.exceptions.AtProtocolError – Base exception.

async put_record(data: Data | DataDict, **kwargs: Any) Response

Write a repository record, creating or updating it as needed. Requires auth, implemented by PDS.

Parameters:
  • data – Input data.

  • **kwargs – Arbitrary arguments to HTTP request.

Returns:

Output model.

Return type:

models.ComAtprotoRepoPutRecord.Response

Raises:

atproto.exceptions.AtProtocolError – Base exception.

async upload_blob(data: bytes, **kwargs: Any) Response

Upload a new blob, to be referenced from a repository record. The blob will be deleted if it is not referenced within a time window (eg, minutes). Blob restrictions (mimetype, size, etc) are enforced when the reference is created. Requires auth, implemented by PDS.

Parameters:
  • data – Input data alias.

  • **kwargs – Arbitrary arguments to HTTP request.

Returns:

Output model.

Return type:

models.ComAtprotoRepoUploadBlob.Response

Raises:

atproto.exceptions.AtProtocolError – Base exception.

class atproto_client.namespaces.async_ns.ComAtprotoServerNamespace(client: AsyncClientRaw)

Bases: AsyncNamespaceBase

async activate_account(**kwargs: Any) bool

Activates a currently deactivated account. Used to finalize account migration after the account’s repo is imported and identity is setup.

Parameters:

**kwargs – Arbitrary arguments to HTTP request.

Returns:

Success status.

Return type:

bool

Raises:

atproto.exceptions.AtProtocolError – Base exception.

async check_account_status(**kwargs: Any) Response

Returns the status of an account, especially as pertaining to import or recovery. Can be called many times over the course of an account migration. Requires auth and can only be called pertaining to oneself.

Parameters:

**kwargs – Arbitrary arguments to HTTP request.

Returns:

Output model.

Return type:

models.ComAtprotoServerCheckAccountStatus.Response

Raises:

atproto.exceptions.AtProtocolError – Base exception.

async confirm_email(data: Data | DataDict, **kwargs: Any) bool

Confirm an email using a token from com.atproto.server.requestEmailConfirmation.

Parameters:
  • data – Input data.

  • **kwargs – Arbitrary arguments to HTTP request.

Returns:

Success status.

Return type:

bool

Raises:

atproto.exceptions.AtProtocolError – Base exception.

async create_account(data: Data | DataDict, **kwargs: Any) Response

Create an account. Implemented by PDS.

Parameters:
  • data – Input data.

  • **kwargs – Arbitrary arguments to HTTP request.

Returns:

Output model.

Return type:

models.ComAtprotoServerCreateAccount.Response

Raises:

atproto.exceptions.AtProtocolError – Base exception.

async create_app_password(data: Data | DataDict, **kwargs: Any) AppPassword

Create an App Password.

Parameters:
  • data – Input data.

  • **kwargs – Arbitrary arguments to HTTP request.

Returns:

Output model.

Return type:

models.ComAtprotoServerCreateAppPassword.AppPassword

Raises:

atproto.exceptions.AtProtocolError – Base exception.

async create_invite_code(data: Data | DataDict, **kwargs: Any) Response

Create an invite code.

Parameters:
  • data – Input data.

  • **kwargs – Arbitrary arguments to HTTP request.

Returns:

Output model.

Return type:

models.ComAtprotoServerCreateInviteCode.Response

Raises:

atproto.exceptions.AtProtocolError – Base exception.

async create_invite_codes(data: Data | DataDict, **kwargs: Any) Response

Create invite codes.

Parameters:
  • data – Input data.

  • **kwargs – Arbitrary arguments to HTTP request.

Returns:

Output model.

Return type:

models.ComAtprotoServerCreateInviteCodes.Response

Raises:

atproto.exceptions.AtProtocolError – Base exception.

async create_session(data: Data | DataDict, **kwargs: Any) Response

Create an authentication session.

Parameters:
  • data – Input data.

  • **kwargs – Arbitrary arguments to HTTP request.

Returns:

Output model.

Return type:

models.ComAtprotoServerCreateSession.Response

Raises:

atproto.exceptions.AtProtocolError – Base exception.

async deactivate_account(data: Data | DataDict | None = None, **kwargs: Any) bool

Deactivates a currently active account. Stops serving of repo, and future writes to repo until reactivated. Used to finalize account migration with the old host after the account has been activated on the new host.

Parameters:
  • data – Input data.

  • **kwargs – Arbitrary arguments to HTTP request.

Returns:

Success status.

Return type:

bool

Raises:

atproto.exceptions.AtProtocolError – Base exception.

async delete_account(data: Data | DataDict, **kwargs: Any) bool

Delete an actor’s account with a token and password. Can only be called after requesting a deletion token. Requires auth.

Parameters:
  • data – Input data.

  • **kwargs – Arbitrary arguments to HTTP request.

Returns:

Success status.

Return type:

bool

Raises:

atproto.exceptions.AtProtocolError – Base exception.

async delete_session(**kwargs: Any) bool

Delete the current session. Requires auth.

Parameters:

**kwargs – Arbitrary arguments to HTTP request.

Returns:

Success status.

Return type:

bool

Raises:

atproto.exceptions.AtProtocolError – Base exception.

async describe_server(**kwargs: Any) Response

Describes the server’s account creation requirements and capabilities. Implemented by PDS.

Parameters:

**kwargs – Arbitrary arguments to HTTP request.

Returns:

Output model.

Return type:

models.ComAtprotoServerDescribeServer.Response

Raises:

atproto.exceptions.AtProtocolError – Base exception.

async get_account_invite_codes(params: Params | ParamsDict | None = None, **kwargs: Any) Response

Get all invite codes for the current account. Requires auth.

Parameters:
  • params – Parameters.

  • **kwargs – Arbitrary arguments to HTTP request.

Returns:

Output model.

Return type:

models.ComAtprotoServerGetAccountInviteCodes.Response

Raises:

atproto.exceptions.AtProtocolError – Base exception.

async get_service_auth(params: Params | ParamsDict, **kwargs: Any) Response

Get a signed token on behalf of the requesting DID for the requested service.

Parameters:
  • params – Parameters.

  • **kwargs – Arbitrary arguments to HTTP request.

Returns:

Output model.

Return type:

models.ComAtprotoServerGetServiceAuth.Response

Raises:

atproto.exceptions.AtProtocolError – Base exception.

async get_session(**kwargs: Any) Response

Get information about the current auth session. Requires auth.

Parameters:

**kwargs – Arbitrary arguments to HTTP request.

Returns:

Output model.

Return type:

models.ComAtprotoServerGetSession.Response

Raises:

atproto.exceptions.AtProtocolError – Base exception.

async list_app_passwords(**kwargs: Any) Response

List all App Passwords.

Parameters:

**kwargs – Arbitrary arguments to HTTP request.

Returns:

Output model.

Return type:

models.ComAtprotoServerListAppPasswords.Response

Raises:

atproto.exceptions.AtProtocolError – Base exception.

async refresh_session(**kwargs: Any) Response

Refresh an authentication session. Requires auth using the ‘refreshJwt’ (not the ‘accessJwt’).

Parameters:

**kwargs – Arbitrary arguments to HTTP request.

Returns:

Output model.

Return type:

models.ComAtprotoServerRefreshSession.Response

Raises:

atproto.exceptions.AtProtocolError – Base exception.

async request_account_delete(**kwargs: Any) bool

Initiate a user account deletion via email.

Parameters:

**kwargs – Arbitrary arguments to HTTP request.

Returns:

Success status.

Return type:

bool

Raises:

atproto.exceptions.AtProtocolError – Base exception.

async request_email_confirmation(**kwargs: Any) bool

Request an email with a code to confirm ownership of email.

Parameters:

**kwargs – Arbitrary arguments to HTTP request.

Returns:

Success status.

Return type:

bool

Raises:

atproto.exceptions.AtProtocolError – Base exception.

async request_email_update(**kwargs: Any) Response

Request a token in order to update email.

Parameters:

**kwargs – Arbitrary arguments to HTTP request.

Returns:

Output model.

Return type:

models.ComAtprotoServerRequestEmailUpdate.Response

Raises:

atproto.exceptions.AtProtocolError – Base exception.

async request_password_reset(data: Data | DataDict, **kwargs: Any) bool

Initiate a user account password reset via email.

Parameters:
  • data – Input data.

  • **kwargs – Arbitrary arguments to HTTP request.

Returns:

Success status.

Return type:

bool

Raises:

atproto.exceptions.AtProtocolError – Base exception.

async reserve_signing_key(data: Data | DataDict | None = None, **kwargs: Any) Response

Reserve a repo signing key, for use with account creation. Necessary so that a DID PLC update operation can be constructed during an account migraiton. Public and does not require auth; implemented by PDS. NOTE: this endpoint may change when full account migration is implemented.

Parameters:
  • data – Input data.

  • **kwargs – Arbitrary arguments to HTTP request.

Returns:

Output model.

Return type:

models.ComAtprotoServerReserveSigningKey.Response

Raises:

atproto.exceptions.AtProtocolError – Base exception.

async reset_password(data: Data | DataDict, **kwargs: Any) bool

Reset a user account password using a token.

Parameters:
  • data – Input data.

  • **kwargs – Arbitrary arguments to HTTP request.

Returns:

Success status.

Return type:

bool

Raises:

atproto.exceptions.AtProtocolError – Base exception.

async revoke_app_password(data: Data | DataDict, **kwargs: Any) bool

Revoke an App Password by name.

Parameters:
  • data – Input data.

  • **kwargs – Arbitrary arguments to HTTP request.

Returns:

Success status.

Return type:

bool

Raises:

atproto.exceptions.AtProtocolError – Base exception.

async update_email(data: Data | DataDict, **kwargs: Any) bool

Update an account’s email.

Parameters:
  • data – Input data.

  • **kwargs – Arbitrary arguments to HTTP request.

Returns:

Success status.

Return type:

bool

Raises:

atproto.exceptions.AtProtocolError – Base exception.

class atproto_client.namespaces.async_ns.ComAtprotoSyncNamespace(client: AsyncClientRaw)

Bases: AsyncNamespaceBase

async get_blob(params: Params | ParamsDict, **kwargs: Any) bytes

Get a blob associated with a given account. Returns the full blob as originally uploaded. Does not require auth; implemented by PDS.

Parameters:
  • params – Parameters.

  • **kwargs – Arbitrary arguments to HTTP request.

Returns:

Output model.

Return type:

models.ComAtprotoSyncGetBlob.Response

Raises:

atproto.exceptions.AtProtocolError – Base exception.

async get_blocks(params: Params | ParamsDict, **kwargs: Any) bytes

Get data blocks from a given repo, by CID. For example, intermediate MST nodes, or records. Does not require auth; implemented by PDS.

Parameters:
  • params – Parameters.

  • **kwargs – Arbitrary arguments to HTTP request.

Returns:

Output model.

Return type:

models.ComAtprotoSyncGetBlocks.Response

Raises:

atproto.exceptions.AtProtocolError – Base exception.

async get_checkout(params: Params | ParamsDict, **kwargs: Any) bytes

DEPRECATED - please use com.atproto.sync.getRepo instead.

Parameters:
  • params – Parameters.

  • **kwargs – Arbitrary arguments to HTTP request.

Returns:

Output model.

Return type:

models.ComAtprotoSyncGetCheckout.Response

Raises:

atproto.exceptions.AtProtocolError – Base exception.

async get_head(params: Params | ParamsDict, **kwargs: Any) Response

DEPRECATED - please use com.atproto.sync.getLatestCommit instead.

Parameters:
  • params – Parameters.

  • **kwargs – Arbitrary arguments to HTTP request.

Returns:

Output model.

Return type:

models.ComAtprotoSyncGetHead.Response

Raises:

atproto.exceptions.AtProtocolError – Base exception.

async get_latest_commit(params: Params | ParamsDict, **kwargs: Any) Response

Get the current commit CID & revision of the specified repo. Does not require auth.

Parameters:
  • params – Parameters.

  • **kwargs – Arbitrary arguments to HTTP request.

Returns:

Output model.

Return type:

models.ComAtprotoSyncGetLatestCommit.Response

Raises:

atproto.exceptions.AtProtocolError – Base exception.

async get_record(params: Params | ParamsDict, **kwargs: Any) bytes

Get data blocks needed to prove the existence or non-existence of record in the current version of repo. Does not require auth.

Parameters:
  • params – Parameters.

  • **kwargs – Arbitrary arguments to HTTP request.

Returns:

Output model.

Return type:

models.ComAtprotoSyncGetRecord.Response

Raises:

atproto.exceptions.AtProtocolError – Base exception.

async get_repo(params: Params | ParamsDict, **kwargs: Any) bytes

Download a repository export as CAR file. Optionally only a ‘diff’ since a previous revision. Does not require auth; implemented by PDS.

Parameters:
  • params – Parameters.

  • **kwargs – Arbitrary arguments to HTTP request.

Returns:

Output model.

Return type:

models.ComAtprotoSyncGetRepo.Response

Raises:

atproto.exceptions.AtProtocolError – Base exception.

async get_repo_status(params: Params | ParamsDict, **kwargs: Any) Response

Get the hosting status for a repository, on this server. Expected to be implemented by PDS and Relay.

Parameters:
  • params – Parameters.

  • **kwargs – Arbitrary arguments to HTTP request.

Returns:

Output model.

Return type:

models.ComAtprotoSyncGetRepoStatus.Response

Raises:

atproto.exceptions.AtProtocolError – Base exception.

async list_blobs(params: Params | ParamsDict, **kwargs: Any) Response

List blob CIDs for an account, since some repo revision. Does not require auth; implemented by PDS.

Parameters:
  • params – Parameters.

  • **kwargs – Arbitrary arguments to HTTP request.

Returns:

Output model.

Return type:

models.ComAtprotoSyncListBlobs.Response

Raises:

atproto.exceptions.AtProtocolError – Base exception.

async list_repos(params: Params | ParamsDict | None = None, **kwargs: Any) Response

Enumerates all the DID, rev, and commit CID for all repos hosted by this service. Does not require auth; implemented by PDS and Relay.

Parameters:
  • params – Parameters.

  • **kwargs – Arbitrary arguments to HTTP request.

Returns:

Output model.

Return type:

models.ComAtprotoSyncListRepos.Response

Raises:

atproto.exceptions.AtProtocolError – Base exception.

async notify_of_update(data: Data | DataDict, **kwargs: Any) bool

Notify a crawling service of a recent update, and that crawling should resume. Intended use is after a gap between repo stream events caused the crawling service to disconnect. Does not require auth; implemented by Relay.

Parameters:
  • data – Input data.

  • **kwargs – Arbitrary arguments to HTTP request.

Returns:

Success status.

Return type:

bool

Raises:

atproto.exceptions.AtProtocolError – Base exception.

async request_crawl(data: Data | DataDict, **kwargs: Any) bool

Request a service to persistently crawl hosted repos. Expected use is new PDS instances declaring their existence to Relays. Does not require auth.

Parameters:
  • data – Input data.

  • **kwargs – Arbitrary arguments to HTTP request.

Returns:

Success status.

Return type:

bool

Raises:

atproto.exceptions.AtProtocolError – Base exception.

class atproto_client.namespaces.async_ns.ComAtprotoTempNamespace(client: AsyncClientRaw)

Bases: AsyncNamespaceBase

async check_signup_queue(**kwargs: Any) Response

Check accounts location in signup queue.

Parameters:

**kwargs – Arbitrary arguments to HTTP request.

Returns:

Output model.

Return type:

models.ComAtprotoTempCheckSignupQueue.Response

Raises:

atproto.exceptions.AtProtocolError – Base exception.

async fetch_labels(params: Params | ParamsDict | None = None, **kwargs: Any) Response

DEPRECATED: use queryLabels or subscribeLabels instead – Fetch all labels from a labeler created after a certain date.

Parameters:
  • params – Parameters.

  • **kwargs – Arbitrary arguments to HTTP request.

Returns:

Output model.

Return type:

models.ComAtprotoTempFetchLabels.Response

Raises:

atproto.exceptions.AtProtocolError – Base exception.

async request_phone_verification(data: Data | DataDict, **kwargs: Any) bool

Request a verification code to be sent to the supplied phone number.

Parameters:
  • data – Input data.

  • **kwargs – Arbitrary arguments to HTTP request.

Returns:

Success status.

Return type:

bool

Raises:

atproto.exceptions.AtProtocolError – Base exception.

class atproto_client.namespaces.async_ns.ComNamespace(client: AsyncClientRaw)

Bases: AsyncNamespaceBase

class atproto_client.namespaces.async_ns.ToolsNamespace(client: AsyncClientRaw)

Bases: AsyncNamespaceBase

class atproto_client.namespaces.async_ns.ToolsOzoneCommunicationNamespace(client: AsyncClientRaw)

Bases: AsyncNamespaceBase

async create_template(data: Data | DataDict, **kwargs: Any) TemplateView

Administrative action to create a new, re-usable communication (email for now) template.

Parameters:
  • data – Input data.

  • **kwargs – Arbitrary arguments to HTTP request.

Returns:

Output model.

Return type:

models.ToolsOzoneCommunicationDefs.TemplateView

Raises:

atproto.exceptions.AtProtocolError – Base exception.

async delete_template(data: Data | DataDict, **kwargs: Any) bool

Delete a communication template.

Parameters:
  • data – Input data.

  • **kwargs – Arbitrary arguments to HTTP request.

Returns:

Success status.

Return type:

bool

Raises:

atproto.exceptions.AtProtocolError – Base exception.

async list_templates(**kwargs: Any) Response

Get list of all communication templates.

Parameters:

**kwargs – Arbitrary arguments to HTTP request.

Returns:

Output model.

Return type:

models.ToolsOzoneCommunicationListTemplates.Response

Raises:

atproto.exceptions.AtProtocolError – Base exception.

async update_template(data: Data | DataDict, **kwargs: Any) TemplateView

Administrative action to update an existing communication template. Allows passing partial fields to patch specific fields only.

Parameters:
  • data – Input data.

  • **kwargs – Arbitrary arguments to HTTP request.

Returns:

Output model.

Return type:

models.ToolsOzoneCommunicationDefs.TemplateView

Raises:

atproto.exceptions.AtProtocolError – Base exception.

class atproto_client.namespaces.async_ns.ToolsOzoneModerationNamespace(client: AsyncClientRaw)

Bases: AsyncNamespaceBase

async emit_event(data: Data | DataDict, **kwargs: Any) ModEventView

Take a moderation action on an actor.

Parameters:
  • data – Input data.

  • **kwargs – Arbitrary arguments to HTTP request.

Returns:

Output model.

Return type:

models.ToolsOzoneModerationDefs.ModEventView

Raises:

atproto.exceptions.AtProtocolError – Base exception.

async get_event(params: Params | ParamsDict, **kwargs: Any) ModEventViewDetail

Get details about a moderation event.

Parameters:
  • params – Parameters.

  • **kwargs – Arbitrary arguments to HTTP request.

Returns:

Output model.

Return type:

models.ToolsOzoneModerationDefs.ModEventViewDetail

Raises:

atproto.exceptions.AtProtocolError – Base exception.

async get_record(params: Params | ParamsDict, **kwargs: Any) RecordViewDetail

Get details about a record.

Parameters:
  • params – Parameters.

  • **kwargs – Arbitrary arguments to HTTP request.

Returns:

Output model.

Return type:

models.ToolsOzoneModerationDefs.RecordViewDetail

Raises:

atproto.exceptions.AtProtocolError – Base exception.

async get_repo(params: Params | ParamsDict, **kwargs: Any) RepoViewDetail

Get details about a repository.

Parameters:
  • params – Parameters.

  • **kwargs – Arbitrary arguments to HTTP request.

Returns:

Output model.

Return type:

models.ToolsOzoneModerationDefs.RepoViewDetail

Raises:

atproto.exceptions.AtProtocolError – Base exception.

async query_events(params: Params | ParamsDict | None = None, **kwargs: Any) Response

List moderation events related to a subject.

Parameters:
  • params – Parameters.

  • **kwargs – Arbitrary arguments to HTTP request.

Returns:

Output model.

Return type:

models.ToolsOzoneModerationQueryEvents.Response

Raises:

atproto.exceptions.AtProtocolError – Base exception.

async query_statuses(params: Params | ParamsDict | None = None, **kwargs: Any) Response

View moderation statuses of subjects (record or repo).

Parameters:
  • params – Parameters.

  • **kwargs – Arbitrary arguments to HTTP request.

Returns:

Output model.

Return type:

models.ToolsOzoneModerationQueryStatuses.Response

Raises:

atproto.exceptions.AtProtocolError – Base exception.

async search_repos(params: Params | ParamsDict | None = None, **kwargs: Any) Response

Find repositories based on a search term.

Parameters:
  • params – Parameters.

  • **kwargs – Arbitrary arguments to HTTP request.

Returns:

Output model.

Return type:

models.ToolsOzoneModerationSearchRepos.Response

Raises:

atproto.exceptions.AtProtocolError – Base exception.

class atproto_client.namespaces.async_ns.ToolsOzoneNamespace(client: AsyncClientRaw)

Bases: AsyncNamespaceBase

class atproto_client.namespaces.async_ns.ToolsOzoneServerNamespace(client: AsyncClientRaw)

Bases: AsyncNamespaceBase

async get_config(**kwargs: Any) Response

Get details about ozone’s server configuration.

Parameters:

**kwargs – Arbitrary arguments to HTTP request.

Returns:

Output model.

Return type:

models.ToolsOzoneServerGetConfig.Response

Raises:

atproto.exceptions.AtProtocolError – Base exception.

class atproto_client.namespaces.async_ns.ToolsOzoneTeamNamespace(client: AsyncClientRaw)

Bases: AsyncNamespaceBase

async add_member(data: Data | DataDict, **kwargs: Any) Member

Add a member to the ozone team. Requires admin role.

Parameters:
  • data – Input data.

  • **kwargs – Arbitrary arguments to HTTP request.

Returns:

Output model.

Return type:

models.ToolsOzoneTeamDefs.Member

Raises:

atproto.exceptions.AtProtocolError – Base exception.

async delete_member(data: Data | DataDict, **kwargs: Any) bool

Delete a member from ozone team. Requires admin role.

Parameters:
  • data – Input data.

  • **kwargs – Arbitrary arguments to HTTP request.

Returns:

Success status.

Return type:

bool

Raises:

atproto.exceptions.AtProtocolError – Base exception.

async list_members(params: Params | ParamsDict | None = None, **kwargs: Any) Response

List all members with access to the ozone service.

Parameters:
  • params – Parameters.

  • **kwargs – Arbitrary arguments to HTTP request.

Returns:

Output model.

Return type:

models.ToolsOzoneTeamListMembers.Response

Raises:

atproto.exceptions.AtProtocolError – Base exception.

async update_member(data: Data | DataDict, **kwargs: Any) Member

Update a member in the ozone service. Requires admin role.

Parameters:
  • data – Input data.

  • **kwargs – Arbitrary arguments to HTTP request.

Returns:

Output model.

Return type:

models.ToolsOzoneTeamDefs.Member

Raises:

atproto.exceptions.AtProtocolError – Base exception.