amoorion_bluesky.base

bluesky plugin: the AT Protocol’s XRPC API over HTTP.

Secrets (bluesky/<key>): username (handle or e-mail), password (an app password, not the account’s), optional uri (the PDS, default https://bsky.social). Links and tags of a post are appended to its text and made clickable with facets; posts longer than 300 graphemes are refused before sending.

Classes

Bluesky(vault[, view])

Bluesky over the AT Protocol: posts are records in the account's repository.

class amoorion_bluesky.base.Bluesky(vault, view=None)[source]

Bases: HttpPlugin

Bluesky over the AT Protocol: posts are records in the account’s repository.

A session is opened on first use, with an app password from the vault.

Parameters:
property service: str

The server; another PDS can be set by the uri secret.

post(post)[source]

Publish a post; answers the message as the platform stored it.

Parameters:

post (Post)

Return type:

Message

read(limit=20)[source]

The latest messages, newest first, at most limit.

Parameters:

limit (int)

Return type:

list[Message]

reply(to, text)[source]

Answer a message by its id; answers the new message.

Parameters:
Return type:

Message

delete(message)[source]

Delete a message by its id.

Parameters:

message (Message)

Return type:

None

profile()[source]

The name this account gets in the dataset.

Return type:

str