chitose.app.bsky.graph package#

Submodules#

chitose.app.bsky.graph.block module#

class chitose.app.bsky.graph.block.Block(subject: str, created_at: str)#

Bases: Record

Parameters:

subject – DID of the account to be blocked.

to_dict() dict[str, Any]#

chitose.app.bsky.graph.defs module#

class chitose.app.bsky.graph.defs.ListItemView(uri: str, subject: ProfileView)#

Bases: Object

to_dict() dict[str, Any]#
class chitose.app.bsky.graph.defs.ListView(uri: str, cid: str, creator: ProfileView, name: str, purpose: Literal['app.bsky.graph.defs#modlist', 'app.bsky.graph.defs#curatelist', 'app.bsky.graph.defs#referencelist'], indexed_at: str, description: str | None = None, description_facets: list[Facet] | None = None, avatar: str | None = None, list_item_count: int | None = None, labels: list[Label] | None = None, viewer: ListViewerState | None = None)#

Bases: Object

to_dict() dict[str, Any]#
class chitose.app.bsky.graph.defs.ListViewBasic(uri: str, cid: str, name: str, purpose: Literal['app.bsky.graph.defs#modlist', 'app.bsky.graph.defs#curatelist', 'app.bsky.graph.defs#referencelist'], avatar: str | None = None, list_item_count: int | None = None, labels: list[Label] | None = None, viewer: ListViewerState | None = None, indexed_at: str | None = None)#

Bases: Object

to_dict() dict[str, Any]#
class chitose.app.bsky.graph.defs.ListViewerState(muted: bool | None = None, blocked: str | None = None)#

Bases: Object

to_dict() dict[str, Any]#
class chitose.app.bsky.graph.defs.NotFoundActor(actor: str, not_found: bool)#

Bases: Object

indicates that a handle or DID could not be resolved

to_dict() dict[str, Any]#
class chitose.app.bsky.graph.defs.Relationship(did: str, following: str | None = None, followed_by: str | None = None)#

Bases: Object

lists the bi-directional graph relationships between one actor (not indicated in the object), and the target actors (the DID included in the object)

Parameters:
  • following – if the actor follows this DID, this is the AT-URI of the follow record

  • followed_by – if the actor is followed by this DID, contains the AT-URI of the follow record

to_dict() dict[str, Any]#
class chitose.app.bsky.graph.defs.StarterPackView(uri: str, cid: str, record: Any, creator: ProfileViewBasic, indexed_at: str, list: ListViewBasic | None = None, list_items_sample: list[ListItemView] | None = None, feeds: list[GeneratorView] | None = None, joined_week_count: int | None = None, joined_all_time_count: int | None = None, labels: list[Label] | None = None)#

Bases: Object

to_dict() dict[str, Any]#
class chitose.app.bsky.graph.defs.StarterPackViewBasic(uri: str, cid: str, record: Any, creator: ProfileViewBasic, indexed_at: str, list_item_count: int | None = None, joined_week_count: int | None = None, joined_all_time_count: int | None = None, labels: list[Label] | None = None)#

Bases: Object

to_dict() dict[str, Any]#

chitose.app.bsky.graph.follow module#

class chitose.app.bsky.graph.follow.Follow(subject: str, created_at: str)#

Bases: Record

to_dict() dict[str, Any]#

chitose.app.bsky.graph.get_actor_starter_packs module#

chitose.app.bsky.graph.get_blocks module#

chitose.app.bsky.graph.get_followers module#

chitose.app.bsky.graph.get_follows module#

chitose.app.bsky.graph.get_known_followers module#

chitose.app.bsky.graph.get_list module#

chitose.app.bsky.graph.get_list_blocks module#

chitose.app.bsky.graph.get_list_mutes module#

chitose.app.bsky.graph.get_lists module#

chitose.app.bsky.graph.get_mutes module#

chitose.app.bsky.graph.get_relationships module#

chitose.app.bsky.graph.get_starter_pack module#

chitose.app.bsky.graph.get_starter_packs module#

chitose.app.bsky.graph.get_suggested_follows_by_actor module#

chitose.app.bsky.graph.list module#

class chitose.app.bsky.graph.list.List(purpose: Literal['app.bsky.graph.defs#modlist', 'app.bsky.graph.defs#curatelist', 'app.bsky.graph.defs#referencelist'], name: str, created_at: str, description: str | None = None, description_facets: list[Facet] | None = None, avatar: Blob | None = None, labels: SelfLabels | None = None)#

Bases: Record

Parameters:
  • purpose – Defines the purpose of the list (aka, moderation-oriented or curration-oriented)

  • name – Display name for list; can not be empty.

to_dict() dict[str, Any]#

chitose.app.bsky.graph.listblock module#

class chitose.app.bsky.graph.listblock.Listblock(subject: str, created_at: str)#

Bases: Record

Parameters:

subject – Reference (AT-URI) to the mod list record.

to_dict() dict[str, Any]#

chitose.app.bsky.graph.listitem module#

class chitose.app.bsky.graph.listitem.Listitem(subject: str, list: str, created_at: str)#

Bases: Record

Parameters:
  • subject – The account which is included on the list.

  • list – Reference (AT-URI) to the list record (app.bsky.graph.list).

to_dict() dict[str, Any]#

chitose.app.bsky.graph.mute_actor module#

chitose.app.bsky.graph.mute_actor_list module#

chitose.app.bsky.graph.mute_thread module#

chitose.app.bsky.graph.starterpack module#

class chitose.app.bsky.graph.starterpack.FeedItem(uri: str)#

Bases: Object

to_dict() dict[str, Any]#
class chitose.app.bsky.graph.starterpack.Starterpack(name: str, list: str, created_at: str, description: str | None = None, description_facets: list[Facet] | None = None, feeds: list[FeedItem] | None = None)#

Bases: Record

Parameters:
  • name – Display name for starter pack; can not be empty.

  • list – Reference (AT-URI) to the list record.

to_dict() dict[str, Any]#

chitose.app.bsky.graph.unmute_actor module#

chitose.app.bsky.graph.unmute_actor_list module#

chitose.app.bsky.graph.unmute_thread module#

Module contents#

class chitose.app.bsky.graph.Graph_(call: Callable[[str, list[tuple[str, str | None | int | list[str]]], bytes | dict[str, Any] | None, dict[str, str]], bytes], subscribe: Callable[[str, list[tuple[str, str | None | int | list[str]]], Callable[[str | bytes], None]], None])#

Bases: object

We recommend calling methods in this class via the chitose.BskyAgent class instead of creating instances of this class directly.

get_actor_starter_packs(actor: str, limit: int | None = None, cursor: str | None = None) bytes#

Get a list of starter packs created by the actor.

get_blocks(limit: int | None = None, cursor: str | None = None) bytes#

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

get_followers(actor: str, limit: int | None = None, cursor: str | None = None) bytes#

Enumerates accounts which follow a specified account (actor).

get_follows(actor: str, limit: int | None = None, cursor: str | None = None) bytes#

Enumerates accounts which a specified account (actor) follows.

get_known_followers(actor: str, limit: int | None = None, cursor: str | None = None) bytes#

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

get_list(list: str, limit: int | None = None, cursor: str | None = None) bytes#

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

Parameters:

list – Reference (AT-URI) of the list record to hydrate.

get_list_blocks(limit: int | None = None, cursor: str | None = None) bytes#

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

get_list_mutes(limit: int | None = None, cursor: str | None = None) bytes#

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

get_lists(actor: str, limit: int | None = None, cursor: str | None = None) bytes#

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

Parameters:

actor – The account (actor) to enumerate lists from.

get_mutes(limit: int | None = None, cursor: str | None = None) bytes#

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

get_relationships(actor: str, others: Optional[list[str]] = None) bytes#

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

Parameters:
  • actor – Primary account requesting relationships for.

  • others – List of ‘other’ accounts to be related back to the primary.

get_starter_pack(starter_pack: str) bytes#

Gets a view of a starter pack.

Parameters:

starter_pack – Reference (AT-URI) of the starter pack record.

get_starter_packs(uris: list[str]) bytes#

Get views for a list of starter packs.

get_suggested_follows_by_actor(actor: str) bytes#

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

mute_actor(actor: str) bytes#

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

mute_actor_list(list: str) bytes#

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

mute_thread(root: str) bytes#

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

unmute_actor(actor: str) bytes#

Unmutes the specified account. Requires auth.

unmute_actor_list(list: str) bytes#

Unmutes the specified list of accounts. Requires auth.

unmute_thread(root: str) bytes#

Unmutes the specified thread. Requires auth.