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:
- 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:
- 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:
- 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:
- 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:
- 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:
- 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:
- 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:
- 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:
- Raises:
atproto.exceptions.AtProtocolError – Base exception.
- class atproto_client.namespaces.async_ns.AppBskyActorStatusRecord(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:
- 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:
- 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:
- Raises:
atproto.exceptions.AtProtocolError – Base exception.
- class atproto_client.namespaces.async_ns.AppBskyAgeassuranceNamespace(client: AsyncClientRaw)¶
Bases:
AsyncNamespaceBase- async begin(data: Data | DataDict, **kwargs: Any) State¶
Initiate Age Assurance for an account.
- Parameters:
data – Input data.
**kwargs – Arbitrary arguments to HTTP request.
- Returns:
Output model.
- Return type:
- Raises:
atproto.exceptions.AtProtocolError – Base exception.
- async get_config(**kwargs: Any) Config¶
Returns Age Assurance configuration for use on the client.
- Parameters:
**kwargs – Arbitrary arguments to HTTP request.
- Returns:
Output model.
- Return type:
- Raises:
atproto.exceptions.AtProtocolError – Base exception.
- async get_state(params: Params | ParamsDict, **kwargs: Any) Response¶
Returns server-computed Age Assurance state, if available, and any additional metadata needed to compute Age Assurance state client-side.
- Parameters:
params – Parameters.
**kwargs – Arbitrary arguments to HTTP request.
- Returns:
Output model.
- Return type:
- Raises:
atproto.exceptions.AtProtocolError – Base exception.
- class atproto_client.namespaces.async_ns.AppBskyBookmarkNamespace(client: AsyncClientRaw)¶
Bases:
AsyncNamespaceBase- async create_bookmark(data: Data | DataDict, **kwargs: Any) bool¶
Creates a private bookmark for the specified record. Currently, only app.bsky.feed.post records are supported. Requires authentication.
- Parameters:
data – Input data.
**kwargs – Arbitrary arguments to HTTP request.
- Returns:
Success status.
- Return type:
bool- Raises:
atproto.exceptions.AtProtocolError – Base exception.
- async delete_bookmark(data: Data | DataDict, **kwargs: Any) bool¶
Deletes a private bookmark for the specified record. Currently, only app.bsky.feed.post records are supported. Requires authentication.
- Parameters:
data – Input data.
**kwargs – Arbitrary arguments to HTTP request.
- Returns:
Success status.
- Return type:
bool- Raises:
atproto.exceptions.AtProtocolError – Base exception.
- async get_bookmarks(params: Params | ParamsDict | None = None, **kwargs: Any) Response¶
Gets views of records bookmarked by the authenticated user. Requires authentication.
- Parameters:
params – Parameters.
**kwargs – Arbitrary arguments to HTTP request.
- Returns:
Output model.
- Return type:
- Raises:
atproto.exceptions.AtProtocolError – Base exception.
- class atproto_client.namespaces.async_ns.AppBskyContactNamespace(client: AsyncClientRaw)¶
Bases:
AsyncNamespaceBase- async dismiss_match(data: Data | DataDict, **kwargs: Any) Response¶
Removes a match that was found via contact import. It shouldn’t appear again if the same contact is re-imported. Requires authentication.
- Parameters:
data – Input data.
**kwargs – Arbitrary arguments to HTTP request.
- Returns:
Output model.
- Return type:
- Raises:
atproto.exceptions.AtProtocolError – Base exception.
- async get_matches(params: Params | ParamsDict | None = None, **kwargs: Any) Response¶
Returns the matched contacts (contacts that were mutually imported). Excludes dismissed matches. Requires authentication.
- Parameters:
params – Parameters.
**kwargs – Arbitrary arguments to HTTP request.
- Returns:
Output model.
- Return type:
- Raises:
atproto.exceptions.AtProtocolError – Base exception.
- async get_sync_status(params: Params | ParamsDict | None = None, **kwargs: Any) Response¶
Gets the user’s current contact import status. Requires authentication.
- Parameters:
params – Parameters.
**kwargs – Arbitrary arguments to HTTP request.
- Returns:
Output model.
- Return type:
- Raises:
atproto.exceptions.AtProtocolError – Base exception.
- async import_contacts(data: Data | DataDict, **kwargs: Any) Response¶
Import contacts for securely matching with other users. This follows the protocol explained in https://docs.bsky.app/blog/contact-import-rfc. Requires authentication.
- Parameters:
data – Input data.
**kwargs – Arbitrary arguments to HTTP request.
- Returns:
Output model.
- Return type:
- Raises:
atproto.exceptions.AtProtocolError – Base exception.
- async remove_data(data: Data | DataDict | None = None, **kwargs: Any) Response¶
Removes all stored hashes used for contact matching, existing matches, and sync status. Requires authentication.
- Parameters:
data – Input data.
**kwargs – Arbitrary arguments to HTTP request.
- Returns:
Output model.
- Return type:
- Raises:
atproto.exceptions.AtProtocolError – Base exception.
- async send_notification(data: Data | DataDict, **kwargs: Any) Response¶
System endpoint to send notifications related to contact imports. Requires role authentication.
- Parameters:
data – Input data.
**kwargs – Arbitrary arguments to HTTP request.
- Returns:
Output model.
- Return type:
- Raises:
atproto.exceptions.AtProtocolError – Base exception.
- async start_phone_verification(data: Data | DataDict, **kwargs: Any) Response¶
Starts a phone verification flow. The phone passed will receive a code via SMS that should be passed to app.bsky.contact.verifyPhone. Requires authentication.
- Parameters:
data – Input data.
**kwargs – Arbitrary arguments to HTTP request.
- Returns:
Output model.
- Return type:
- Raises:
atproto.exceptions.AtProtocolError – Base exception.
- async verify_phone(data: Data | DataDict, **kwargs: Any) Response¶
Verifies control over a phone number with a code received via SMS and starts a contact import session. Requires authentication.
- Parameters:
data – Input data.
**kwargs – Arbitrary arguments to HTTP request.
- Returns:
Output model.
- Return type:
- Raises:
atproto.exceptions.AtProtocolError – Base exception.
- class atproto_client.namespaces.async_ns.AppBskyDraftNamespace(client: AsyncClientRaw)¶
Bases:
AsyncNamespaceBase- async create_draft(data: Data | DataDict, **kwargs: Any) Response¶
Inserts a draft using private storage (stash). An upper limit of drafts might be enforced. Requires authentication.
- Parameters:
data – Input data.
**kwargs – Arbitrary arguments to HTTP request.
- Returns:
Output model.
- Return type:
- Raises:
atproto.exceptions.AtProtocolError – Base exception.
- async delete_draft(data: Data | DataDict, **kwargs: Any) bool¶
Deletes a draft by ID. Requires authentication.
- Parameters:
data – Input data.
**kwargs – Arbitrary arguments to HTTP request.
- Returns:
Success status.
- Return type:
bool- Raises:
atproto.exceptions.AtProtocolError – Base exception.
- async get_drafts(params: Params | ParamsDict | None = None, **kwargs: Any) Response¶
Gets views of user drafts. Requires authentication.
- Parameters:
params – Parameters.
**kwargs – Arbitrary arguments to HTTP request.
- Returns:
Output model.
- Return type:
- Raises:
atproto.exceptions.AtProtocolError – Base exception.
- async update_draft(data: Data | DataDict, **kwargs: Any) bool¶
Updates a draft using private storage (stash). If the draft ID points to a non-existing ID, the update will be silently ignored. This is done because updates don’t enforce draft limit, so it accepts all writes, but will ignore invalid ones. Requires authentication.
- 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.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:
- 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:
- 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:
- 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:
- 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:
- 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:
- 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:
- 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:
- 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:
- 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:
- 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:
- 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:
- 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:
- 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:
- 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:
- 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:
- 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:
- 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:
- 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:
- 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:
- 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:
- 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:
- 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. Note that this API endpoint may require authentication (eg, not public) for some service providers and implementations.
- Parameters:
params – Parameters.
**kwargs – Arbitrary arguments to HTTP request.
- Returns:
Output model.
- Return type:
- 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:
- 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:
- 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:
- 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:
- 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:
- 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:
- 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:
- 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:
- 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:
- 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:
- 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:
- 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:
- 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:
- 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:
- 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:
- 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:
- 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:
- 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:
- 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:
- 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:
- 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:
- 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:
- 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:
- 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:
- 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:
- 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:
- 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:
- 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:
- 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:
- 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:
- 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:
- 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:
- 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:
- 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:
- 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:
- 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:
- 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:
- Raises:
atproto.exceptions.AtProtocolError – Base exception.
- async get_lists_with_membership(params: Params | ParamsDict, **kwargs: Any) Response¶
Enumerates the lists created by the session user, and includes membership information about actor in those lists. Only supports curation and moderation lists (no reference lists, used in starter packs). Requires auth.
- Parameters:
params – Parameters.
**kwargs – Arbitrary arguments to HTTP request.
- Returns:
Output model.
- Return type:
- 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:
- 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:
- 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:
- 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:
- Raises:
atproto.exceptions.AtProtocolError – Base exception.
- async get_starter_packs_with_membership(params: Params | ParamsDict, **kwargs: Any) Response¶
Enumerates the starter packs created by the session user, and includes membership information about actor in those starter packs. Requires auth.
- Parameters:
params – Parameters.
**kwargs – Arbitrary arguments to HTTP request.
- Returns:
Output model.
- Return type:
- 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:
- 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 search_starter_packs(params: Params | ParamsDict, **kwargs: Any) Response¶
Find starter packs matching search criteria. Does not require auth.
- Parameters:
params – Parameters.
**kwargs – Arbitrary arguments to HTTP request.
- Returns:
Output model.
- Return type:
- 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.
- 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:
- 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:
- 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:
- Raises:
atproto.exceptions.AtProtocolError – Base exception.
- class atproto_client.namespaces.async_ns.AppBskyGraphVerificationRecord(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:
- 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:
- 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:
- 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:
- 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:
- 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:
- 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:
- Raises:
atproto.exceptions.AtProtocolError – Base exception.
- class atproto_client.namespaces.async_ns.AppBskyNamespace(client: AsyncClientRaw)¶
Bases:
AsyncNamespaceBase
- class atproto_client.namespaces.async_ns.AppBskyNotificationDeclarationRecord(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:
- 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:
- 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:
- Raises:
atproto.exceptions.AtProtocolError – Base exception.
- class atproto_client.namespaces.async_ns.AppBskyNotificationNamespace(client: AsyncClientRaw)¶
Bases:
AsyncNamespaceBase- async get_preferences(params: Params | ParamsDict | None = None, **kwargs: Any) Response¶
Get notification-related preferences for an account. Requires auth.
- Parameters:
params – Parameters.
**kwargs – Arbitrary arguments to HTTP request.
- Returns:
Output model.
- Return type:
- Raises:
atproto.exceptions.AtProtocolError – Base exception.
- 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:
- Raises:
atproto.exceptions.AtProtocolError – Base exception.
- async list_activity_subscriptions(params: Params | ParamsDict | None = None, **kwargs: Any) Response¶
Enumerate all accounts to which the requesting account is subscribed to receive notifications for. Requires auth.
- Parameters:
params – Parameters.
**kwargs – Arbitrary arguments to HTTP request.
- Returns:
Output model.
- Return type:
models.AppBskyNotificationListActivitySubscriptions.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:
- Raises:
atproto.exceptions.AtProtocolError – Base exception.
- async put_activity_subscription(data: Data | DataDict, **kwargs: Any) Response¶
Puts an activity subscription entry. The key should be omitted for creation and provided for updates. Requires auth.
- Parameters:
data – Input data.
**kwargs – Arbitrary arguments to HTTP request.
- Returns:
Output model.
- Return type:
- 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 put_preferences_v2(data: Data | DataDict | None = None, **kwargs: Any) Response¶
Set notification-related preferences for an account. Requires auth.
- Parameters:
data – Input data.
**kwargs – Arbitrary arguments to HTTP request.
- Returns:
Output model.
- Return type:
- 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 unregister_push(data: Data | DataDict, **kwargs: Any) bool¶
The inverse of registerPush - inform a specified service that push notifications should no longer be sent to the given token 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- async get_age_assurance_state(**kwargs: Any) AgeAssuranceState¶
Returns the current state of the age assurance process for an account. This is used to check if the user has completed age assurance or if further action is required.
- Parameters:
**kwargs – Arbitrary arguments to HTTP request.
- Returns:
Output model.
- Return type:
- Raises:
atproto.exceptions.AtProtocolError – Base exception.
- async get_config(**kwargs: Any) Response¶
Get miscellaneous runtime configuration.
- Parameters:
**kwargs – Arbitrary arguments to HTTP request.
- Returns:
Output model.
- Return type:
- Raises:
atproto.exceptions.AtProtocolError – Base exception.
- async get_onboarding_suggested_starter_packs(params: Params | ParamsDict | None = None, **kwargs: Any) Response¶
Get a list of suggested starterpacks for onboarding.
- Parameters:
params – Parameters.
**kwargs – Arbitrary arguments to HTTP request.
- Returns:
Output model.
- Return type:
models.AppBskyUnspeccedGetOnboardingSuggestedStarterPacks.Response- Raises:
atproto.exceptions.AtProtocolError – Base exception.
- async get_onboarding_suggested_starter_packs_skeleton(params: Params | ParamsDict | None = None, **kwargs: Any) Response¶
Get a skeleton of suggested starterpacks for onboarding. Intended to be called and hydrated by app.bsky.unspecced.getOnboardingSuggestedStarterPacks.
- Parameters:
params – Parameters.
**kwargs – Arbitrary arguments to HTTP request.
- Returns:
Output model.
- Return type:
models.AppBskyUnspeccedGetOnboardingSuggestedStarterPacksSkeleton.Response- Raises:
atproto.exceptions.AtProtocolError – Base exception.
- async get_onboarding_suggested_users_skeleton(params: Params | ParamsDict | None = None, **kwargs: Any) Response¶
Get a skeleton of suggested users for onboarding. Intended to be called and hydrated by app.bsky.unspecced.getSuggestedOnboardingUsers.
- Parameters:
params – Parameters.
**kwargs – Arbitrary arguments to HTTP request.
- Returns:
Output model.
- Return type:
models.AppBskyUnspeccedGetOnboardingSuggestedUsersSkeleton.Response- Raises:
atproto.exceptions.AtProtocolError – Base exception.
- async get_popular_feed_generators(params: Params | ParamsDict | None = None, **kwargs: Any) Response¶
An unspecced view of globally popular feed generators.
- Parameters:
params – Parameters.
**kwargs – Arbitrary arguments to HTTP request.
- Returns:
Output model.
- Return type:
- Raises:
atproto.exceptions.AtProtocolError – Base exception.
- async get_post_thread_other_v2(params: Params | ParamsDict, **kwargs: Any) Response¶
(NOTE: this endpoint is under development and WILL change without notice. Don’t use it until it is moved out of unspecced or your application WILL break) Get additional posts under a thread e.g. replies hidden by threadgate. Based on an anchor post at any depth of the tree, returns top-level replies below that anchor. It does not include ancestors nor the anchor itself. This should be called after exhausting app.bsky.unspecced.getPostThreadV2. 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:
- Raises:
atproto.exceptions.AtProtocolError – Base exception.
- async get_post_thread_v2(params: Params | ParamsDict, **kwargs: Any) Response¶
(NOTE: this endpoint is under development and WILL change without notice. Don’t use it until it is moved out of unspecced or your application WILL break) Get posts in a thread. It is based in an anchor post at any depth of the tree, and returns posts above it (recursively resolving the parent, without further branching to their replies) and below it (recursive replies, with branching to their replies). 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:
- Raises:
atproto.exceptions.AtProtocolError – Base exception.
- async get_suggested_feeds(params: Params | ParamsDict | None = None, **kwargs: Any) Response¶
Get a list of suggested feeds.
- Parameters:
params – Parameters.
**kwargs – Arbitrary arguments to HTTP request.
- Returns:
Output model.
- Return type:
- Raises:
atproto.exceptions.AtProtocolError – Base exception.
- async get_suggested_feeds_skeleton(params: Params | ParamsDict | None = None, **kwargs: Any) Response¶
Get a skeleton of suggested feeds. Intended to be called and hydrated by app.bsky.unspecced.getSuggestedFeeds.
- Parameters:
params – Parameters.
**kwargs – Arbitrary arguments to HTTP request.
- Returns:
Output model.
- Return type:
- Raises:
atproto.exceptions.AtProtocolError – Base exception.
- async get_suggested_onboarding_users(params: Params | ParamsDict | None = None, **kwargs: Any) Response¶
Get a list of suggested users for onboarding.
- Parameters:
params – Parameters.
**kwargs – Arbitrary arguments to HTTP request.
- Returns:
Output model.
- Return type:
- Raises:
atproto.exceptions.AtProtocolError – Base exception.
- async get_suggested_starter_packs(params: Params | ParamsDict | None = None, **kwargs: Any) Response¶
Get a list of suggested starterpacks.
- Parameters:
params – Parameters.
**kwargs – Arbitrary arguments to HTTP request.
- Returns:
Output model.
- Return type:
- Raises:
atproto.exceptions.AtProtocolError – Base exception.
- async get_suggested_starter_packs_skeleton(params: Params | ParamsDict | None = None, **kwargs: Any) Response¶
Get a skeleton of suggested starterpacks. Intended to be called and hydrated by app.bsky.unspecced.getSuggestedStarterpacks.
- Parameters:
params – Parameters.
**kwargs – Arbitrary arguments to HTTP request.
- Returns:
Output model.
- Return type:
models.AppBskyUnspeccedGetSuggestedStarterPacksSkeleton.Response- Raises:
atproto.exceptions.AtProtocolError – Base exception.
- async get_suggested_users(params: Params | ParamsDict | None = None, **kwargs: Any) Response¶
Get a list of suggested users.
- Parameters:
params – Parameters.
**kwargs – Arbitrary arguments to HTTP request.
- Returns:
Output model.
- Return type:
- Raises:
atproto.exceptions.AtProtocolError – Base exception.
- async get_suggested_users_for_discover(params: Params | ParamsDict | None = None, **kwargs: Any) Response¶
Get a list of suggested users for the Discover page.
- Parameters:
params – Parameters.
**kwargs – Arbitrary arguments to HTTP request.
- Returns:
Output model.
- Return type:
models.AppBskyUnspeccedGetSuggestedUsersForDiscover.Response- Raises:
atproto.exceptions.AtProtocolError – Base exception.
- async get_suggested_users_for_discover_skeleton(params: Params | ParamsDict | None = None, **kwargs: Any) Response¶
Get a skeleton of suggested users for the Discover page. Intended to be called and hydrated by app.bsky.unspecced.getSuggestedUsersForDiscover.
- Parameters:
params – Parameters.
**kwargs – Arbitrary arguments to HTTP request.
- Returns:
Output model.
- Return type:
models.AppBskyUnspeccedGetSuggestedUsersForDiscoverSkeleton.Response- Raises:
atproto.exceptions.AtProtocolError – Base exception.
- async get_suggested_users_for_explore(params: Params | ParamsDict | None = None, **kwargs: Any) Response¶
Get a list of suggested users for the Explore page.
- Parameters:
params – Parameters.
**kwargs – Arbitrary arguments to HTTP request.
- Returns:
Output model.
- Return type:
- Raises:
atproto.exceptions.AtProtocolError – Base exception.
- async get_suggested_users_for_explore_skeleton(params: Params | ParamsDict | None = None, **kwargs: Any) Response¶
Get a skeleton of suggested users for the Explore page. Intended to be called and hydrated by app.bsky.unspecced.getSuggestedUsersForExplore.
- Parameters:
params – Parameters.
**kwargs – Arbitrary arguments to HTTP request.
- Returns:
Output model.
- Return type:
models.AppBskyUnspeccedGetSuggestedUsersForExploreSkeleton.Response- Raises:
atproto.exceptions.AtProtocolError – Base exception.
- async get_suggested_users_for_see_more(params: Params | ParamsDict | None = None, **kwargs: Any) Response¶
Get a list of suggested users for the See More page.
- Parameters:
params – Parameters.
**kwargs – Arbitrary arguments to HTTP request.
- Returns:
Output model.
- Return type:
- Raises:
atproto.exceptions.AtProtocolError – Base exception.
- async get_suggested_users_for_see_more_skeleton(params: Params | ParamsDict | None = None, **kwargs: Any) Response¶
Get a skeleton of suggested users for the See More page. Intended to be called and hydrated by app.bsky.unspecced.getSuggestedUsersForSeeMore.
- Parameters:
params – Parameters.
**kwargs – Arbitrary arguments to HTTP request.
- Returns:
Output model.
- Return type:
models.AppBskyUnspeccedGetSuggestedUsersForSeeMoreSkeleton.Response- Raises:
atproto.exceptions.AtProtocolError – Base exception.
- async get_suggested_users_skeleton(params: Params | ParamsDict | None = None, **kwargs: Any) Response¶
Get a skeleton of suggested users. Intended to be called and hydrated by app.bsky.unspecced.getSuggestedUsers.
- Parameters:
params – Parameters.
**kwargs – Arbitrary arguments to HTTP request.
- Returns:
Output model.
- Return type:
- 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:
- 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:
- Raises:
atproto.exceptions.AtProtocolError – Base exception.
- async get_trending_topics(params: Params | ParamsDict | None = None, **kwargs: Any) Response¶
Get a list of trending topics.
- Parameters:
params – Parameters.
**kwargs – Arbitrary arguments to HTTP request.
- Returns:
Output model.
- Return type:
- Raises:
atproto.exceptions.AtProtocolError – Base exception.
- async get_trends(params: Params | ParamsDict | None = None, **kwargs: Any) Response¶
Get the current trends on the network.
- Parameters:
params – Parameters.
**kwargs – Arbitrary arguments to HTTP request.
- Returns:
Output model.
- Return type:
- Raises:
atproto.exceptions.AtProtocolError – Base exception.
- async get_trends_skeleton(params: Params | ParamsDict | None = None, **kwargs: Any) Response¶
Get the skeleton of trends on the network. Intended to be called and then hydrated through app.bsky.unspecced.getTrends.
- Parameters:
params – Parameters.
**kwargs – Arbitrary arguments to HTTP request.
- Returns:
Output model.
- Return type:
- Raises:
atproto.exceptions.AtProtocolError – Base exception.
- async init_age_assurance(data: Data | DataDict, **kwargs: Any) AgeAssuranceState¶
Initiate age assurance for an account. This is a one-time action that will start the process of verifying the user’s age.
- Parameters:
data – Input data.
**kwargs – Arbitrary arguments to HTTP request.
- Returns:
Output model.
- Return type:
- 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:
- 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:
- Raises:
atproto.exceptions.AtProtocolError – Base exception.
- async search_starter_packs_skeleton(params: Params | ParamsDict, **kwargs: Any) Response¶
Backend Starter Pack search, returns only skeleton.
- Parameters:
params – Parameters.
**kwargs – Arbitrary arguments to HTTP request.
- Returns:
Output model.
- Return type:
- 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:
- 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:
- 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:
- 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:
- 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:
- 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:
- 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:
- 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:
- Raises:
atproto.exceptions.AtProtocolError – Base exception.
- class atproto_client.namespaces.async_ns.ChatBskyConvoNamespace(client: AsyncClientRaw)¶
Bases:
AsyncNamespaceBase- async accept_convo(data: Data | DataDict, **kwargs: Any) Response¶
Marks a conversation as accepted, so it is shown in the list of accepted convos instead on the request convos.
- Parameters:
data – Input data.
**kwargs – Arbitrary arguments to HTTP request.
- Returns:
Output model.
- Return type:
- Raises:
atproto.exceptions.AtProtocolError – Base exception.
- async add_reaction(data: Data | DataDict, **kwargs: Any) Response¶
Adds an emoji reaction to a message. Requires authentication. It is idempotent, so multiple calls from the same user with the same emoji result in a single reaction.
- Parameters:
data – Input data.
**kwargs – Arbitrary arguments to HTTP request.
- Returns:
Output model.
- Return type:
- Raises:
atproto.exceptions.AtProtocolError – Base exception.
- async delete_message_for_self(data: Data | DataDict, **kwargs: Any) DeletedMessageView¶
Marks a message as deleted for the viewer, so they won’t see that message in future enumerations.
- Parameters:
data – Input data.
**kwargs – Arbitrary arguments to HTTP request.
- Returns:
Output model.
- Return type:
- Raises:
atproto.exceptions.AtProtocolError – Base exception.
- async get_convo(params: Params | ParamsDict, **kwargs: Any) Response¶
Gets an existing conversation by its ID.
- Parameters:
params – Parameters.
**kwargs – Arbitrary arguments to HTTP request.
- Returns:
Output model.
- Return type:
- Raises:
atproto.exceptions.AtProtocolError – Base exception.
- async get_convo_availability(params: Params | ParamsDict, **kwargs: Any) Response¶
Check whether the requester and the other members can start a 1-1 chat. Only applicable to direct (non-group) conversations. If an existing convo is found for these members, it is returned. Does not create a new convo if it doesn’t exist.
- Parameters:
params – Parameters.
**kwargs – Arbitrary arguments to HTTP request.
- Returns:
Output model.
- Return type:
- Raises:
atproto.exceptions.AtProtocolError – Base exception.
- async get_convo_for_members(params: Params | ParamsDict, **kwargs: Any) Response¶
Get or create a 1-1 conversation for the given members. Always returns the same direct (non-group) conversation. To create a group conversation, use createGroup.
- Parameters:
params – Parameters.
**kwargs – Arbitrary arguments to HTTP request.
- Returns:
Output model.
- Return type:
- Raises:
atproto.exceptions.AtProtocolError – Base exception.
- async get_convo_members(params: Params | ParamsDict, **kwargs: Any) Response¶
Returns a paginated list of members from a conversation.
- Parameters:
params – Parameters.
**kwargs – Arbitrary arguments to HTTP request.
- Returns:
Output model.
- Return type:
- 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:
- Raises:
atproto.exceptions.AtProtocolError – Base exception.
- async get_messages(params: Params | ParamsDict, **kwargs: Any) Response¶
Returns a page of messages from a conversation.
- Parameters:
params – Parameters.
**kwargs – Arbitrary arguments to HTTP request.
- Returns:
Output model.
- Return type:
- Raises:
atproto.exceptions.AtProtocolError – Base exception.
- async leave_convo(data: Data | DataDict, **kwargs: Any) Response¶
Leaves a conversation (direct or group). For group, this effectively removes membership. For direct, membership is never removed, only changed to remove from enumerations by the user who left.
- Parameters:
data – Input data.
**kwargs – Arbitrary arguments to HTTP request.
- Returns:
Output model.
- Return type:
- Raises:
atproto.exceptions.AtProtocolError – Base exception.
- async list_convo_requests(params: Params | ParamsDict | None = None, **kwargs: Any) Response¶
[NOTE: This is under active development and should be considered unstable while this note is here]. Returns a page of incoming conversation requests for the user. Direct convo requests are returned as convoView; group join requests are returned as joinRequestView.
- Parameters:
params – Parameters.
**kwargs – Arbitrary arguments to HTTP request.
- Returns:
Output model.
- Return type:
- Raises:
atproto.exceptions.AtProtocolError – Base exception.
- async list_convos(params: Params | ParamsDict | None = None, **kwargs: Any) Response¶
Returns a page of conversations (direct or group) for the user.
- Parameters:
params – Parameters.
**kwargs – Arbitrary arguments to HTTP request.
- Returns:
Output model.
- Return type:
- Raises:
atproto.exceptions.AtProtocolError – Base exception.
- async lock_convo(data: Data | DataDict, **kwargs: Any) Response¶
[NOTE: This is under active development and should be considered unstable while this note is here]. Locks a group convo so no more content (messages, reactions) can be added to it.
- Parameters:
data – Input data.
**kwargs – Arbitrary arguments to HTTP request.
- Returns:
Output model.
- Return type:
- Raises:
atproto.exceptions.AtProtocolError – Base exception.
- async mute_convo(data: Data | DataDict, **kwargs: Any) Response¶
Mutes a conversation, preventing notifications related to it.
- Parameters:
data – Input data.
**kwargs – Arbitrary arguments to HTTP request.
- Returns:
Output model.
- Return type:
- Raises:
atproto.exceptions.AtProtocolError – Base exception.
- async remove_reaction(data: Data | DataDict, **kwargs: Any) Response¶
Removes an emoji reaction from a message. Requires authentication. It is idempotent, so multiple calls from the same user with the same emoji result in that reaction not being present, even if it already wasn’t.
- Parameters:
data – Input data.
**kwargs – Arbitrary arguments to HTTP request.
- Returns:
Output model.
- Return type:
- Raises:
atproto.exceptions.AtProtocolError – Base exception.
- async send_message(data: Data | DataDict, **kwargs: Any) MessageView¶
Sends a message to a conversation.
- Parameters:
data – Input data.
**kwargs – Arbitrary arguments to HTTP request.
- Returns:
Output model.
- Return type:
- Raises:
atproto.exceptions.AtProtocolError – Base exception.
- async send_message_batch(data: Data | DataDict, **kwargs: Any) Response¶
Sends a batch of messages to a conversation.
- Parameters:
data – Input data.
**kwargs – Arbitrary arguments to HTTP request.
- Returns:
Output model.
- Return type:
- Raises:
atproto.exceptions.AtProtocolError – Base exception.
- async unlock_convo(data: Data | DataDict, **kwargs: Any) Response¶
[NOTE: This is under active development and should be considered unstable while this note is here]. Unlocks a group convo so it is able to receive new content.
- Parameters:
data – Input data.
**kwargs – Arbitrary arguments to HTTP request.
- Returns:
Output model.
- Return type:
- Raises:
atproto.exceptions.AtProtocolError – Base exception.
- async unmute_convo(data: Data | DataDict, **kwargs: Any) Response¶
Unmutes a conversation, allowing notifications related to it.
- Parameters:
data – Input data.
**kwargs – Arbitrary arguments to HTTP request.
- Returns:
Output model.
- Return type:
- Raises:
atproto.exceptions.AtProtocolError – Base exception.
- async update_all_read(data: Data | DataDict | None = None, **kwargs: Any) Response¶
Sets conversations from a user as read to the latest message, with filters.
- Parameters:
data – Input data.
**kwargs – Arbitrary arguments to HTTP request.
- Returns:
Output model.
- Return type:
- Raises:
atproto.exceptions.AtProtocolError – Base exception.
- async update_read(data: Data | DataDict, **kwargs: Any) Response¶
Updates the read state of a conversation from, optionally specifying the last read message.
- Parameters:
data – Input data.
**kwargs – Arbitrary arguments to HTTP request.
- Returns:
Output model.
- Return type:
- Raises:
atproto.exceptions.AtProtocolError – Base exception.
- class atproto_client.namespaces.async_ns.ChatBskyGroupNamespace(client: AsyncClientRaw)¶
Bases:
AsyncNamespaceBase- async add_members(data: Data | DataDict, **kwargs: Any) Response¶
[NOTE: This is under active development and should be considered unstable while this note is here]. Adds members to a group. The members are added in ‘request’ status, so they have to accept it. This creates convo memberships.
- Parameters:
data – Input data.
**kwargs – Arbitrary arguments to HTTP request.
- Returns:
Output model.
- Return type:
- Raises:
atproto.exceptions.AtProtocolError – Base exception.
- async approve_join_request(data: Data | DataDict, **kwargs: Any) Response¶
[NOTE: This is under active development and should be considered unstable while this note is here]. Approves a request to join a group (via join link) the user owns. Action taken by the group owner.
- Parameters:
data – Input data.
**kwargs – Arbitrary arguments to HTTP request.
- Returns:
Output model.
- Return type:
- Raises:
atproto.exceptions.AtProtocolError – Base exception.
- async create_group(data: Data | DataDict, **kwargs: Any) Response¶
[NOTE: This is under active development and should be considered unstable while this note is here]. Creates a group convo, specifying the members to be added to it. Unlike getConvoForMembers, this isn’t idempotent. It will create new groups even if the membership is identical to pre-existing groups. Will create ‘pending’ membership for all members, except the owner who is ‘accepted’.
- Parameters:
data – Input data.
**kwargs – Arbitrary arguments to HTTP request.
- Returns:
Output model.
- Return type:
- Raises:
atproto.exceptions.AtProtocolError – Base exception.
- async create_join_link(data: Data | DataDict, **kwargs: Any) Response¶
[NOTE: This is under active development and should be considered unstable while this note is here]. Creates a join link for the group convo.
- Parameters:
data – Input data.
**kwargs – Arbitrary arguments to HTTP request.
- Returns:
Output model.
- Return type:
- Raises:
atproto.exceptions.AtProtocolError – Base exception.
- async disable_join_link(data: Data | DataDict, **kwargs: Any) Response¶
[NOTE: This is under active development and should be considered unstable while this note is here]. Disables the active join link for the group convo.
- Parameters:
data – Input data.
**kwargs – Arbitrary arguments to HTTP request.
- Returns:
Output model.
- Return type:
- Raises:
atproto.exceptions.AtProtocolError – Base exception.
- async edit_group(data: Data | DataDict, **kwargs: Any) Response¶
[NOTE: This is under active development and should be considered unstable while this note is here]. Edits group settings.
- Parameters:
data – Input data.
**kwargs – Arbitrary arguments to HTTP request.
- Returns:
Output model.
- Return type:
- Raises:
atproto.exceptions.AtProtocolError – Base exception.
- async edit_join_link(data: Data | DataDict, **kwargs: Any) Response¶
[NOTE: This is under active development and should be considered unstable while this note is here]. Edits the existing join link settings for the group convo.
- Parameters:
data – Input data.
**kwargs – Arbitrary arguments to HTTP request.
- Returns:
Output model.
- Return type:
- Raises:
atproto.exceptions.AtProtocolError – Base exception.
- async enable_join_link(data: Data | DataDict, **kwargs: Any) Response¶
[NOTE: This is under active development and should be considered unstable while this note is here]. Re-enables a previously disabled join link for the group convo.
- Parameters:
data – Input data.
**kwargs – Arbitrary arguments to HTTP request.
- Returns:
Output model.
- Return type:
- Raises:
atproto.exceptions.AtProtocolError – Base exception.
- async get_group_public_info(params: Params | ParamsDict, **kwargs: Any) Response¶
[NOTE: This is under active development and should be considered unstable while this note is here]. Get public information about a group from an join link.
- Parameters:
params – Parameters.
**kwargs – Arbitrary arguments to HTTP request.
- Returns:
Output model.
- Return type:
- Raises:
atproto.exceptions.AtProtocolError – Base exception.
- async list_join_requests(params: Params | ParamsDict, **kwargs: Any) Response¶
[NOTE: This is under active development and should be considered unstable while this note is here]. Lists a page of request to join a group (via join link) the user owns. Shows the data from the owner’s point of view.
- Parameters:
params – Parameters.
**kwargs – Arbitrary arguments to HTTP request.
- Returns:
Output model.
- Return type:
- Raises:
atproto.exceptions.AtProtocolError – Base exception.
- async reject_join_request(data: Data | DataDict, **kwargs: Any) Response¶
[NOTE: This is under active development and should be considered unstable while this note is here]. Rejects a request to join a group (via join link) the user owns. Action taken by the group owner.
- Parameters:
data – Input data.
**kwargs – Arbitrary arguments to HTTP request.
- Returns:
Output model.
- Return type:
- Raises:
atproto.exceptions.AtProtocolError – Base exception.
- async remove_members(data: Data | DataDict, **kwargs: Any) Response¶
[NOTE: This is under active development and should be considered unstable while this note is here]. Removes members from a group. This deletes convo memberships, doesn’t just set a status.
- Parameters:
data – Input data.
**kwargs – Arbitrary arguments to HTTP request.
- Returns:
Output model.
- Return type:
- Raises:
atproto.exceptions.AtProtocolError – Base exception.
- async request_join(data: Data | DataDict, **kwargs: Any) Response¶
[NOTE: This is under active development and should be considered unstable while this note is here]. Sends a request to join a group (via join link) to the group owner. Action taken by the prospective group member.
- Parameters:
data – Input data.
**kwargs – Arbitrary arguments to HTTP request.
- Returns:
Output model.
- Return type:
- 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:
- 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:
- 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:
- 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:
- 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:
- 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:
- 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:
- 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:
- 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_account_signing_key(data: Data | DataDict, **kwargs: Any) bool¶
Administrative action to update an account’s signing key in their Did document.
- 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:
- Raises:
atproto.exceptions.AtProtocolError – Base exception.
- class atproto_client.namespaces.async_ns.ComAtprotoIdentityNamespace(client: AsyncClientRaw)¶
Bases:
AsyncNamespaceBase- async get_recommended_did_credentials(**kwargs: Any) Response¶
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 refresh_identity(data: Data | DataDict, **kwargs: Any) IdentityInfo¶
Request that the server re-resolve an identity (DID and handle). The server may ignore this request, or require authentication, depending on the role, implementation, and policy of the server.
- Parameters:
data – Input data.
**kwargs – Arbitrary arguments to HTTP request.
- Returns:
Output model.
- Return type:
- 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_did(params: Params | ParamsDict, **kwargs: Any) Response¶
Resolves DID to DID document. Does not bi-directionally verify handle.
- Parameters:
params – Parameters.
**kwargs – Arbitrary arguments to HTTP request.
- Returns:
Output model.
- Return type:
- Raises:
atproto.exceptions.AtProtocolError – Base exception.
- async resolve_handle(params: Params | ParamsDict, **kwargs: Any) Response¶
Resolves an atproto handle (hostname) to a DID. Does not necessarily bi-directionally verify against the the DID document.
- Parameters:
params – Parameters.
**kwargs – Arbitrary arguments to HTTP request.
- Returns:
Output model.
- Return type:
- Raises:
atproto.exceptions.AtProtocolError – Base exception.
- async resolve_identity(params: Params | ParamsDict, **kwargs: Any) IdentityInfo¶
Resolves an identity (DID or Handle) to a full identity (DID document and verified handle).
- Parameters:
params – Parameters.
**kwargs – Arbitrary arguments to HTTP request.
- Returns:
Output model.
- Return type:
- 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:
- 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:
- Raises:
atproto.exceptions.AtProtocolError – Base exception.
- class atproto_client.namespaces.async_ns.ComAtprotoLexiconNamespace(client: AsyncClientRaw)¶
Bases:
AsyncNamespaceBase- async resolve_lexicon(params: Params | ParamsDict, **kwargs: Any) Response¶
Resolves an atproto lexicon (NSID) to a schema.
- Parameters:
params – Parameters.
**kwargs – Arbitrary arguments to HTTP request.
- Returns:
Output model.
- Return type:
- Raises:
atproto.exceptions.AtProtocolError – Base exception.
- class atproto_client.namespaces.async_ns.ComAtprotoLexiconSchemaRecord(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:
- 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:
- 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:
- 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:
- 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:
- 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:
- 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:
- 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:
- 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:
- 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:
- 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:
- 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:
- 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:
- 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:
- 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:
- 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:
- 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:
- 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:
- 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:
- 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 using the ‘refreshJwt’ (not the ‘accessJwt’).
- 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:
- 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:
- 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:
- 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:
- 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:
- 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:
- 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:
- 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:
- 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.
- 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:
- 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:
- 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:
- 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:
- Raises:
atproto.exceptions.AtProtocolError – Base exception.
- async get_host_status(params: Params | ParamsDict, **kwargs: Any) Response¶
Returns information about a specified upstream host, as consumed by the server. Implemented by relays.
- Parameters:
params – Parameters.
**kwargs – Arbitrary arguments to HTTP request.
- Returns:
Output model.
- Return type:
- 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:
- 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:
- 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:
- 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:
- 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:
- Raises:
atproto.exceptions.AtProtocolError – Base exception.
- async list_hosts(params: Params | ParamsDict | None = None, **kwargs: Any) Response¶
Enumerates upstream hosts (eg, PDS or relay instances) that this service consumes from. Implemented by relays.
- Parameters:
params – Parameters.
**kwargs – Arbitrary arguments to HTTP request.
- Returns:
Output model.
- Return type:
- 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:
- Raises:
atproto.exceptions.AtProtocolError – Base exception.
- async list_repos_by_collection(params: Params | ParamsDict, **kwargs: Any) Response¶
Enumerates all the DIDs which have records with the given collection NSID.
- Parameters:
params – Parameters.
**kwargs – Arbitrary arguments to HTTP request.
- Returns:
Output model.
- Return type:
- 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. DEPRECATED: just use com.atproto.sync.requestCrawl.
- 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 add_reserved_handle(data: Data | DataDict, **kwargs: Any) Response¶
Add a handle to the set of reserved handles.
- Parameters:
data – Input data.
**kwargs – Arbitrary arguments to HTTP request.
- Returns:
Output model.
- Return type:
- Raises:
atproto.exceptions.AtProtocolError – Base exception.
- async check_handle_availability(params: Params | ParamsDict, **kwargs: Any) Response¶
Checks whether the provided handle is available. If the handle is not available, available suggestions will be returned. Optional inputs will be used to generate suggestions.
- Parameters:
params – Parameters.
**kwargs – Arbitrary arguments to HTTP request.
- Returns:
Output model.
- Return type:
- Raises:
atproto.exceptions.AtProtocolError – Base exception.
- 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:
- Raises:
atproto.exceptions.AtProtocolError – Base exception.
- async dereference_scope(params: Params | ParamsDict, **kwargs: Any) Response¶
Allows finding the oauth permission scope from a reference.
- Parameters:
params – Parameters.
**kwargs – Arbitrary arguments to HTTP request.
- Returns:
Output model.
- Return type:
- 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:
- 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.
- async revoke_account_credentials(data: Data | DataDict, **kwargs: Any) bool¶
Revoke sessions, password, and app passwords associated with account. May be resolved by a password reset.
- 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.ComGermnetworkDeclarationRecord(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:
- 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:
- 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:
- Raises:
atproto.exceptions.AtProtocolError – Base exception.
- class atproto_client.namespaces.async_ns.ComGermnetworkNamespace(client: AsyncClientRaw)¶
Bases:
AsyncNamespaceBase
- 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:
- 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:
- 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:
- Raises:
atproto.exceptions.AtProtocolError – Base exception.
- class atproto_client.namespaces.async_ns.ToolsOzoneHostingNamespace(client: AsyncClientRaw)¶
Bases:
AsyncNamespaceBase- async get_account_history(params: Params | ParamsDict, **kwargs: Any) Response¶
Get account history, e.g. log of updated email addresses or other identity information.
- Parameters:
params – Parameters.
**kwargs – Arbitrary arguments to HTTP request.
- Returns:
Output model.
- Return type:
- Raises:
atproto.exceptions.AtProtocolError – Base exception.
- class atproto_client.namespaces.async_ns.ToolsOzoneModerationNamespace(client: AsyncClientRaw)¶
Bases:
AsyncNamespaceBase- async cancel_scheduled_actions(data: Data | DataDict, **kwargs: Any) CancellationResults¶
Cancel all pending scheduled moderation actions for specified subjects.
- Parameters:
data – Input data.
**kwargs – Arbitrary arguments to HTTP request.
- Returns:
Output model.
- Return type:
models.ToolsOzoneModerationCancelScheduledActions.CancellationResults- Raises:
atproto.exceptions.AtProtocolError – Base exception.
- 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:
- Raises:
atproto.exceptions.AtProtocolError – Base exception.
- async get_account_timeline(params: Params | ParamsDict, **kwargs: Any) Response¶
Get timeline of all available events of an account. This includes moderation events, account history and did history.
- Parameters:
params – Parameters.
**kwargs – Arbitrary arguments to HTTP request.
- Returns:
Output model.
- Return type:
- 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:
- 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:
- Raises:
atproto.exceptions.AtProtocolError – Base exception.
- async get_records(params: Params | ParamsDict, **kwargs: Any) Response¶
Get details about some records.
- Parameters:
params – Parameters.
**kwargs – Arbitrary arguments to HTTP request.
- Returns:
Output model.
- Return type:
- 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:
- Raises:
atproto.exceptions.AtProtocolError – Base exception.
- async get_reporter_stats(params: Params | ParamsDict, **kwargs: Any) Response¶
Get reporter stats for a list of users.
- Parameters:
params – Parameters.
**kwargs – Arbitrary arguments to HTTP request.
- Returns:
Output model.
- Return type:
- Raises:
atproto.exceptions.AtProtocolError – Base exception.
- async get_repos(params: Params | ParamsDict, **kwargs: Any) Response¶
Get details about some repositories.
- Parameters:
params – Parameters.
**kwargs – Arbitrary arguments to HTTP request.
- Returns:
Output model.
- Return type:
- Raises:
atproto.exceptions.AtProtocolError – Base exception.
- async get_subjects(params: Params | ParamsDict, **kwargs: Any) Response¶
Get details about subjects.
- Parameters:
params – Parameters.
**kwargs – Arbitrary arguments to HTTP request.
- Returns:
Output model.
- Return type:
- Raises:
atproto.exceptions.AtProtocolError – Base exception.
- async list_scheduled_actions(data: Data | DataDict, **kwargs: Any) Response¶
List scheduled moderation actions with optional filtering.
- Parameters:
data – Input data.
**kwargs – Arbitrary arguments to HTTP request.
- Returns:
Output model.
- Return type:
- 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:
- 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:
- Raises:
atproto.exceptions.AtProtocolError – Base exception.
- async schedule_action(data: Data | DataDict, **kwargs: Any) ScheduledActionResults¶
Schedule a moderation action to be executed at a future time.
- Parameters:
data – Input data.
**kwargs – Arbitrary arguments to HTTP request.
- Returns:
Output model.
- Return type:
models.ToolsOzoneModerationScheduleAction.ScheduledActionResults- 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:
- Raises:
atproto.exceptions.AtProtocolError – Base exception.
- class atproto_client.namespaces.async_ns.ToolsOzoneNamespace(client: AsyncClientRaw)¶
Bases:
AsyncNamespaceBase
- class atproto_client.namespaces.async_ns.ToolsOzoneSafelinkNamespace(client: AsyncClientRaw)¶
Bases:
AsyncNamespaceBase- async add_rule(data: Data | DataDict, **kwargs: Any) Event¶
Add a new URL safety rule.
- Parameters:
data – Input data.
**kwargs – Arbitrary arguments to HTTP request.
- Returns:
Output model.
- Return type:
- Raises:
atproto.exceptions.AtProtocolError – Base exception.
- async query_events(data: Data | DataDict | None = None, **kwargs: Any) Response¶
Query URL safety audit events.
- Parameters:
data – Input data.
**kwargs – Arbitrary arguments to HTTP request.
- Returns:
Output model.
- Return type:
- Raises:
atproto.exceptions.AtProtocolError – Base exception.
- async query_rules(data: Data | DataDict | None = None, **kwargs: Any) Response¶
Query URL safety rules.
- Parameters:
data – Input data.
**kwargs – Arbitrary arguments to HTTP request.
- Returns:
Output model.
- Return type:
- Raises:
atproto.exceptions.AtProtocolError – Base exception.
- async remove_rule(data: Data | DataDict, **kwargs: Any) Event¶
Remove an existing URL safety rule.
- Parameters:
data – Input data.
**kwargs – Arbitrary arguments to HTTP request.
- Returns:
Output model.
- Return type:
- Raises:
atproto.exceptions.AtProtocolError – Base exception.
- class atproto_client.namespaces.async_ns.ToolsOzoneServerNamespace(client: AsyncClientRaw)¶
Bases:
AsyncNamespaceBase
- class atproto_client.namespaces.async_ns.ToolsOzoneSetNamespace(client: AsyncClientRaw)¶
Bases:
AsyncNamespaceBase- async add_values(data: Data | DataDict, **kwargs: Any) bool¶
Add values to a specific set. Attempting to add values to a set that does not exist will result in an error.
- Parameters:
data – Input data.
**kwargs – Arbitrary arguments to HTTP request.
- Returns:
Success status.
- Return type:
bool- Raises:
atproto.exceptions.AtProtocolError – Base exception.
- async delete_set(data: Data | DataDict, **kwargs: Any) Response¶
Delete an entire set. Attempting to delete a set that does not exist will result in an error.
- Parameters:
data – Input data.
**kwargs – Arbitrary arguments to HTTP request.
- Returns:
Output model.
- Return type:
- Raises:
atproto.exceptions.AtProtocolError – Base exception.
- async delete_values(data: Data | DataDict, **kwargs: Any) bool¶
Delete values from a specific set. Attempting to delete values that are not in the set will not result in an error.
- Parameters:
data – Input data.
**kwargs – Arbitrary arguments to HTTP request.
- Returns:
Success status.
- Return type:
bool- Raises:
atproto.exceptions.AtProtocolError – Base exception.
- async get_values(params: Params | ParamsDict, **kwargs: Any) Response¶
Get a specific set and its values.
- Parameters:
params – Parameters.
**kwargs – Arbitrary arguments to HTTP request.
- Returns:
Output model.
- Return type:
- Raises:
atproto.exceptions.AtProtocolError – Base exception.
- async query_sets(params: Params | ParamsDict | None = None, **kwargs: Any) Response¶
Query available sets.
- Parameters:
params – Parameters.
**kwargs – Arbitrary arguments to HTTP request.
- Returns:
Output model.
- Return type:
- Raises:
atproto.exceptions.AtProtocolError – Base exception.
- class atproto_client.namespaces.async_ns.ToolsOzoneSettingNamespace(client: AsyncClientRaw)¶
Bases:
AsyncNamespaceBase- async list_options(params: Params | ParamsDict | None = None, **kwargs: Any) Response¶
List settings with optional filtering.
- Parameters:
params – Parameters.
**kwargs – Arbitrary arguments to HTTP request.
- Returns:
Output model.
- Return type:
- Raises:
atproto.exceptions.AtProtocolError – Base exception.
- async remove_options(data: Data | DataDict, **kwargs: Any) Response¶
Delete settings by key.
- Parameters:
data – Input data.
**kwargs – Arbitrary arguments to HTTP request.
- Returns:
Output model.
- Return type:
- Raises:
atproto.exceptions.AtProtocolError – Base exception.
- class atproto_client.namespaces.async_ns.ToolsOzoneSignatureNamespace(client: AsyncClientRaw)¶
Bases:
AsyncNamespaceBase- async find_correlation(params: Params | ParamsDict, **kwargs: Any) Response¶
Find all correlated threat signatures between 2 or more accounts.
- Parameters:
params – Parameters.
**kwargs – Arbitrary arguments to HTTP request.
- Returns:
Output model.
- Return type:
- Raises:
atproto.exceptions.AtProtocolError – Base exception.
Get accounts that share some matching threat signatures with the root account.
- Parameters:
params – Parameters.
**kwargs – Arbitrary arguments to HTTP request.
- Returns:
Output model.
- Return type:
- Raises:
atproto.exceptions.AtProtocolError – Base exception.
- async search_accounts(params: Params | ParamsDict, **kwargs: Any) Response¶
Search for accounts that match one or more threat signature values.
- Parameters:
params – Parameters.
**kwargs – Arbitrary arguments to HTTP request.
- Returns:
Output model.
- Return type:
- 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:
- 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:
- 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:
- Raises:
atproto.exceptions.AtProtocolError – Base exception.
- class atproto_client.namespaces.async_ns.ToolsOzoneVerificationNamespace(client: AsyncClientRaw)¶
Bases:
AsyncNamespaceBase- async grant_verifications(data: Data | DataDict, **kwargs: Any) Response¶
Grant verifications to multiple subjects. Allows batch processing of up to 100 verifications at once.
- Parameters:
data – Input data.
**kwargs – Arbitrary arguments to HTTP request.
- Returns:
Output model.
- Return type:
- Raises:
atproto.exceptions.AtProtocolError – Base exception.
- async list_verifications(params: Params | ParamsDict | None = None, **kwargs: Any) Response¶
List verifications.
- Parameters:
params – Parameters.
**kwargs – Arbitrary arguments to HTTP request.
- Returns:
Output model.
- Return type:
- Raises:
atproto.exceptions.AtProtocolError – Base exception.
- async revoke_verifications(data: Data | DataDict, **kwargs: Any) Response¶
Revoke previously granted verifications in batches of up to 100.
- Parameters:
data – Input data.
**kwargs – Arbitrary arguments to HTTP request.
- Returns:
Output model.
- Return type:
- Raises:
atproto.exceptions.AtProtocolError – Base exception.