BlueSkyClient library
- class skyter.bsky.BlueSkyClient(pds_url: str | None = None)
Higher-level wrapper for atproto async operations.
- async block_user(handle: str) str | None
Block a user by their handle.
- Parameters:
handle (str) – The user’s handle
- Returns:
URI of the block record if successful, None if failed
- Return type:
str
- async build_post_text(text) TextBuilder
Build TextBuilder with regex pattern matching for hashtags, mentions and links.
- Parameters:
text (str) – text to process
- Returns:
TextBuilder object identifying tags, mentions, links
- Return type:
TextBuilder
- async delete_block(uri: str) bool
Unblock a user via block URI.
- Parameters:
uri (str) – URI of block to delete
- Returns:
True if successful
- Return type:
bool
- async delete_like(uri: str) bool
Unlike a post via like URI.
- Parameters:
uri (str) – URI of like to delete
- Returns:
True if successful
- Return type:
bool
- async delete_post(uri: str) bool
Delete a post.
- Parameters:
uri (str) – URI of post to delete
- Returns:
True if successful
- Return type:
bool
- async delete_repost(uri: str) bool
Delete a repost via repost URI.
- Parameters:
uri (str) – URI of repost to delete
- Returns:
True if successful
- Return type:
bool
- async static download_file(url: str) bytes
Download file at url
- async extract_media_from_post(post, media_types: list[str] = [], include_quoted_media: bool = True, quote_nesting: int = 1)
Extract specified media types from a post object
- Parameters:
post – post object retrieved from atproto feed endpoint
media_types (list[str]) – A list of media types (e.g., [‘image’, ‘video’]) to extract. Defaults to an empty list, which includes all supported types.
include_quoted_media (bool) – If True, also includes media found in quoted content. Defaults to True.
quote_nesting (int) – The maximum depth of quote nesting to process. Only applies if include_quoted_media is True. Defaults to 1.
- Returns:
Dictionary of embedded media (images, videos, external links, quote posts)
- Return type:
dict
- async follow(handle: str) bool
Follow a user.
- Parameters:
handle (str) – Handle of user to follow
- Returns:
True if successful
- Return type:
bool
- async get_adult_enabled() bool
Get moderation setting for adult content.
- Returns:
True if adult content enabled
- Return type:
bool
- async get_block_list(limit: int = 100, new_items: bool = False, reset_pagination: bool = False) list[dict]
Get list of blocked accounts.
- Parameters:
limit (int) – Maximum number of accounts to return.
new_items (bool) – If True, will fetch any new items since the paginator was initialized instead of fetching the next page. Defaults to False
reset_pagination (bool) – If True, resets FeedPaginator to first page of results.
- Returns:
List of dictionaries containing account and viewer information
- Return type:
list
- async get_content_policies(include_subscribed_labelers: bool = True) dict
Get label definitions with user’s applied visibility settings
- Returns:
Dictionary of content policies
- Return type:
dict
- async get_feed(uri: str, limit: int = 20, extract_media: bool = True, media_types: list[str] = [], include_quoted_media: bool = True, quote_nesting: int = 1, extract_reply_parents: bool = True, new_items: bool = False, reset_pagination: bool = False) list[dict]
Fetch custom feed posts.
- Parameters:
uri (str) – URI of feed
limit (int) – Number of posts to fetch
extract_media (bool) – If True, attempts to extract media content from the object. Defaults to True.
media_types (list[str]) – A list of media types (e.g., [‘image’, ‘video’]) to extract. Defaults to an empty list, which includes all supported types.
include_quoted_media (bool) – If True, also includes media found in quoted content. Defaults to True.
quote_nesting (int) – The maximum depth of quote nesting to process. Only applies if include_quoted_media is True. Defaults to 1.
extract_reply_parents (bool) – If True, attempts to extract parent posts from the object (if reply). Defaults to True.
new_items (bool) – If True, will fetch any new items since the paginator was initialized instead of fetching the next page. Defaults to False
reset_pagination (bool) – If True, resets FeedPaginator to first page of results.
- Returns:
List of post dicts
- Return type:
list
- async get_feed_data(uri: str) dict | None
Get detailed information about a feed from URI.
- Parameters:
uri (str) – The URI of the feed
- Returns:
Dictionary containing feed information or None if not found
- Return type:
dict
- async get_followers(handle: str | None = None, limit: int = 20, new_items: bool = False, reset_pagination: bool = False) list[dict]
Get list of followers.
- Parameters:
handle (str, optional) – Handle to get followers for (defaults to current user)
limit (int) – Maximum number of followers to return. Note: suspended accounts will not appear in results but will count towards the limit
new_items (bool) – If True, will fetch any new items since the paginator was initialized instead of fetching the next page. Defaults to False
reset_pagination (bool) – If True, resets FeedPaginator to first page of results.
- Returns:
List of follower dictionaries
- Return type:
list
- async get_followers_detailed(handle: str | None = None, limit: int = 20, new_items: bool = False, reset_pagination: bool = False) list[dict]
Get list of followers with detailed info, including follow + post metrics.
- Parameters:
handle (str) – Handle to get followers for (defaults to current user)
limit (int) – Maximum number of followers to return. Note: suspended accounts will not appear in results but will count towards the limit
new_items (bool) – If True, will fetch any new items since the paginator was initialized instead of fetching the next page. Defaults to False
reset_pagination (bool) – If True, resets FeedPaginator to first page of results.
- Returns:
List of follower profile dictionaries
- Return type:
list
- async get_follows(handle: str | None = None, limit: int = 20, new_items: bool = False, reset_pagination: bool = False) list[dict]
Get list of users that are being followed.
- Parameters:
handle (str, optional) – Handle to get follows for (defaults to current user)
limit (int) – Maximum number of follows to return.
new_items (bool) – If True, will fetch any new items since the paginator was initialized instead of fetching the next page. Defaults to False
reset_pagination (bool) – If True, resets FeedPaginator to first page of results.
- Returns:
List of follower dictionaries
- Return type:
list
- async get_follows_detailed(handle: str | None = None, limit: int = 20, new_items: bool = False, reset_pagination: bool = False) list[dict]
Get list of users that are being followed with detailed info, including follow + post metrics.
- Parameters:
handle (str, optional) – Handle to get follows for (defaults to current user)
limit (int) – Maximum number of follows to return. Note: suspended accounts will not appear in results but will count towards the limit
new_items (bool) – If True, will fetch any new items since the paginator was initialized instead of fetching the next page. Defaults to False
reset_pagination (bool) – If True, resets FeedPaginator to first page of results.
- Returns:
List of follower profile dictionaries
- Return type:
list
- async get_label_visibility_prefs() dict
Get moderation label visibility preferences.
- Returns:
Dictionary of label content preferences.
- Return type:
dict
- async get_labeler_data(did: str) dict
Get detailed data for a labeler
- Parameters:
did (str) – The labeler’s DID identifier
- Returns:
Dictionary containing labeler information and policies
- Return type:
dict
- async get_likes(uri: str, limit: int = 20, new_items: bool = False, reset_pagination: bool = False) list[dict]
Get list of users that have liked a given post.
- Parameters:
uri (str) – URI of post
limit (int) – Maximum number of users to return.
new_items (bool) – If True, will fetch any new items since the paginator was initialized instead of fetching the next page. Defaults to False
reset_pagination (bool) – If True, resets FeedPaginator to first page of results.
- Returns:
List of user dictionaries
- Return type:
list
- async get_list_data(uri: str) dict | None
Get detailed information about a list from URI. (Does not include users, use get_list_people to get users of a list.)
- Parameters:
uri (str) – The URI of the list
- Returns:
Dictionary containing list information or None if not found
- Return type:
dict
- async get_list_feed(uri: str, limit: int = 20, extract_media: bool = True, media_types: list[str] = [], include_quoted_media: bool = True, quote_nesting: int = 1, extract_reply_parents: bool = True, new_items: bool = False, reset_pagination: bool = False) list[dict]
Fetch list feed posts.
- Parameters:
uri (str) – URI of list
limit (int) – Number of posts to fetch
extract_media (bool) – If True, attempts to extract media content from the object. Defaults to True.
media_types (list[str]) – A list of media types (e.g., [‘image’, ‘video’]) to extract. Defaults to an empty list, which includes all supported types.
include_quoted_media (bool) – If True, also includes media found in quoted content. Defaults to True.
quote_nesting (int) – The maximum depth of quote nesting to process. Only applies if include_quoted_media is True. Defaults to 1.
extract_reply_parents (bool) – If True, attempts to extract parent posts from the object (if reply). Defaults to True.
new_items (bool) – If True, will fetch any new items since the paginator was initialized instead of fetching the next page. Defaults to False
reset_pagination (bool) – If True, resets FeedPaginator to first page of results.
- Returns:
List of post dicts
- Return type:
list
- async get_list_people(uri: str, limit: int = 100, new_items: bool = False, reset_pagination: bool = False) list[dict]
Get users included in a given list.
- Parameters:
uri (str) – The URI of the list
limit (int) – Number of results to return
new_items (bool) – If True, will fetch any new items since the paginator was initialized instead of fetching the next page. Defaults to False
reset_pagination (bool) – If True, resets FeedPaginator to first page of results.
- Returns:
List of dictionaries containing user information
- Return type:
list
- async get_mute_list(limit: int = 100, new_items: bool = False, reset_pagination: bool = False) list[dict]
Get list of muted accounts.
- Parameters:
limit (int) – Maximum number of accounts to return.
new_items (bool) – If True, will fetch any new items since the paginator was initialized instead of fetching the next page. Defaults to False
reset_pagination (bool) – If True, resets FeedPaginator to first page of results.
- Returns:
List of dictionaries containing account and viewer information
- Return type:
list
- async get_notifications(reasons: list[str] = [], limit: int = 20, unpack_records: bool = True, new_items: bool = False, reset_pagination: bool = False) list[dict]
Get notifications.
- Parameters:
reasons (list) – List of notification reasons to include (e.g., follow, like, repost, reply, mention, quote). Defaults to all
limit (int) – Number of notifications to retrieve
unpack_records (bool) – If True, includes post/profile data for record and subject fields, if applicable.
new_items (bool) – If True, will fetch any new items since the paginator was initialized instead of fetching the next page. Defaults to False
reset_pagination (bool) – If True, resets FeedPaginator to first page of results.
- Returns:
List of notification dictionaries
- Return type:
list
- async get_post_data(uri: str, extract_media: bool = True, media_types: list[str] = [], include_quoted_media: bool = True, quote_nesting: int = 1, extract_reply_parents: bool = True) dict | None
Get detailed data from individual post using uri.
- Parameters:
uri (str) – Post URI
extract_media (bool) – If True, attempts to extract media content from the object. Defaults to True.
media_types (list[str]) – A list of media types (e.g., [‘image’, ‘video’]) to extract. Defaults to an empty list, which includes all supported types.
include_quoted_media (bool) – If True, also includes media found in quoted content. Defaults to True.
quote_nesting (int) – The maximum depth of quote nesting to process. Only applies if include_quoted_media is True. Defaults to 1.
extract_reply_parents (bool) – If True, attempts to extract parent posts from the object (if reply). Defaults to True.
- Returns:
dict of post data
- Return type:
dict
- async get_post_url(uri: str, handle: str | None = None) str
Extract URL from post URI.
- Parameters:
uri (str) – URI of post
handle (str) – handle of post author. Will retrieve from URI if not supplied. Optional
- Returns:
URL of post
- Return type:
str
- async get_profile(handle: str | None = None) dict | None
Get profile information.
- Parameters:
handle (str, optional) – Handle to get profile for (defaults to own profile)
- Returns:
Profile dictionary or None if failed
- Return type:
dict
- get_profile_url(handle: str) str
Return profile URL for handle.
- Parameters:
handle (str) – handle of profile
- Returns:
URL of profile
- Return type:
str
- async get_quotes(uri: str, limit: int = 20, extract_media: bool = True, media_types: list[str] = [], include_quoted_media: bool = True, quote_nesting: int = 1, extract_reply_parents: bool = True, new_items: bool = False, reset_pagination: bool = False) list[dict]
Get list of quote posts of a given post.
- Parameters:
uri (str) – URI of post
limit (int) – Maximum number of posts to return.
new_items (bool) – If True, will fetch any new items since the paginator was initialized instead of fetching the next page. Defaults to False
reset_pagination (bool) – If True, resets FeedPaginator to first page of results.
- Returns:
List of post dictionaries
- Return type:
list
- async get_reposts(uri: str, limit: int = 20, new_items: bool = False, reset_pagination: bool = False) list[dict]
Get list of users that have reposted a given post.
- Parameters:
uri (str) – URI of post
limit (int) – Maximum number of users to return.
new_items (bool) – If True, will fetch any new items since the paginator was initialized instead of fetching the next page. Defaults to False
reset_pagination (bool) – If True, resets FeedPaginator to first page of results.
- Returns:
List of user dictionaries
- Return type:
list
- async get_saved_feeds(only_pinned: bool = False, get_feed_data: bool = True, include_timeline: bool = True) list[dict] | None
Get saved feeds.
- Parameters:
only_pinned (bool) – If true, only include pinned feeds. Defaults to false.
get_feed_data (bool) – If true, fetch full feed information using feed URI. Defaults to true.
include_timeline (bool) – If true, include following timeline in results. Defaults to true.
- Returns:
List of saved feed dicts.
- Return type:
list
- async get_subscribed_labelers(detailed: bool = False) list
Get data and policies definition for subscribed labelers
- Returns:
List of dictionaries containing subscribed labeler information and policies
- Return type:
list
- async get_suggested_starter_packs() list[dict]
Get suggested starter packs
- Returns:
List of 3 suggested starter pack dicts
- Return type:
list
- async get_thread(uri: str, limit: int | None = 20, max_depth: int = 10, parent_height: int = 10, tree_mode: bool = False) dict
Get a post thread with replies organized hierarchically.
- Parameters:
uri (str) – URI of the post to get thread for
limit (int or None) – Number of posts to retrieve at given depth level. If tree_mode is False, will only use for depth level 1. Note: this will only limit reply reponses after they are received from the API. Default is 20
max_depth (int) – Maximum depth to traverse. Max depth for API call is 10
parent_height (int) – Maximum number of parent posts to retrieve. Default is 10
tree_mode (bool) – If True, respects limit at every depth level; if False, uses limit only for top level and max 1 for deeper levels. Default is False
- Returns:
Dictionary with post thread information
- Return type:
dict
- async get_timeline(limit: int = 20, extract_media: bool = True, media_types: list[str] = [], include_quoted_media: bool = True, quote_nesting: int = 1, extract_reply_parents: bool = True, new_items: bool = False, reset_pagination: bool = False) list[dict]
Fetch following timeline posts.
- Parameters:
limit (int) – Number of posts to fetch
extract_media (bool) – If True, attempts to extract media content from the object. Defaults to True.
media_types (list[str]) – A list of media types (e.g., [‘image’, ‘video’]) to extract. Defaults to an empty list, which includes all supported types.
include_quoted_media (bool) – If True, also includes media found in quoted content. Defaults to True.
quote_nesting (int) – The maximum depth of quote nesting to process. Only applies if include_quoted_media is True. Defaults to 1.
extract_reply_parents (bool) – If True, attempts to extract parent posts from the object (if reply). Defaults to True.
new_items (bool) – If True, will fetch any new items since the paginator was initialized instead of fetching the next page. Defaults to False
reset_pagination (bool) – If True, resets FeedPaginator to first page of results.
- Returns:
List of post dicts
- Return type:
list
- async get_unread_notification_count() int
Get number of unread notifications.
- Returns:
Number of unread notifications
- Return type:
int
- async get_user_likes(handle: str | None = None, limit: int = 20, reverse_chronological: bool = True, extract_media: bool = True, media_types: list[str] = [], include_quoted_media: bool = True, quote_nesting: int = 1, extract_reply_parents: bool = True, new_items: bool = False, reset_pagination: bool = False) list[dict]
Get liked posts by a specific user.
- Parameters:
handle (str, optional) – User’s handle or DID
post_type (str) – Type of posts to include. Default is ‘post_with_replies’. Valid options: ‘posts_with_replies’, ‘posts_no_replies’, ‘posts_with_media’, ‘posts_and_author_threads’, ‘posts_with_video’
limit (int) – Number of posts to retrieve (default: 50, max: 100)
reverse_chronological (bool) – If False, will start with first chronological likes. Defaults to True.
extract_media (bool) – If True, attempts to extract media content from the object. Defaults to True.
media_types (list[str]) – A list of media types (e.g., [‘image’, ‘video’]) to extract. Defaults to an empty list, which includes all supported types.
include_quoted_media (bool) – If True, also includes media found in quoted content. Defaults to True.
quote_nesting (int) – The maximum depth of quote nesting to process. Only applies if include_quoted_media is True. Defaults to 1.
extract_reply_parents (bool) – If True, attempts to extract parent posts from the object (if reply). Defaults to True.
new_items (bool) – If True, will fetch any new items since the paginator was initialized instead of fetching the next page. Defaults to False
reset_pagination (bool) – If True, resets FeedPaginator to first page of results.
- Returns:
List of post dicts
- Return type:
list
- async get_user_lists(handle: str | None = None, limit: int = 20, new_items: bool = False, reset_pagination: bool = False) list[dict]
Get lists created by a given user
- Parameters:
handle (str, optional) – User handle. If no handle is provided, will return own created lists.
limit (int) – Number of results to return
new_items (bool) – If True, will fetch any new items since the paginator was initialized instead of fetching the next page. Defaults to False
reset_pagination (bool) – If True, resets FeedPaginator to first page of results.
- Returns:
List of list dicts
- Return type:
list
- async get_user_posts(handle: str | None = None, post_type: str = 'posts_with_replies', limit: int = 20, extract_media: bool = True, media_types: list[str] = [], include_quoted_media: bool = True, quote_nesting: int = 1, extract_reply_parents: bool = True, new_items: bool = False, reset_pagination: bool = False) list[dict]
Get posts from a specific user’s timeline.
- Parameters:
handle (str, optional) – User’s handle or DID
post_type (str) – Type of posts to include. Default is ‘post_with_replies’. Valid options: ‘posts_with_replies’, ‘posts_no_replies’, ‘posts_with_media’, ‘posts_and_author_threads’, ‘posts_with_video’
limit (int) – Number of posts to retrieve (default: 50, max: 100)
extract_media (bool) – If True, attempts to extract media content from the object. Defaults to True.
media_types (list[str]) – A list of media types (e.g., [‘image’, ‘video’]) to extract. Defaults to an empty list, which includes all supported types.
include_quoted_media (bool) – If True, also includes media found in quoted content. Defaults to True.
quote_nesting (int) – The maximum depth of quote nesting to process. Only applies if include_quoted_media is True. Defaults to 1.
extract_reply_parents (bool) – If True, attempts to extract parent posts from the object (if reply). Defaults to True.
new_items (bool) – If True, will fetch any new items since the paginator was initialized instead of fetching the next page. Defaults to False
reset_pagination (bool) – If True, resets FeedPaginator to first page of results.
- Returns:
List of post dicts
- Return type:
list
- async get_user_starter_packs(handle: str | None = None, limit: int = 20, new_items: bool = False, reset_pagination: bool = False) list[dict]
Get starter packs created by a given user
- Parameters:
handle (str, optional) – User handle. If no handle is provided, will return own created lists.
limit (int) – Number of results to return
new_items (bool) – If True, will fetch any new items since the paginator was initialized instead of fetching the next page. Defaults to False
reset_pagination (bool) – If True, resets FeedPaginator to first page of results.
- Returns:
List of starter pack dicts
- Return type:
list
- static global_policies() dict
Dictionary of hard-coded content policies with default options.
- Returns:
Dictionary of global policies
- Return type:
dict
- async is_feed_saved(uri: str) bool | None
Checks whether feed URI is in saved feeds
- Parameters:
uri (str) – URI of feed to check
- Returns:
True if saved
- Return type:
bool
- async is_post_deleted(uri: str) bool
Determine whether a URI represents a deleted post (i.e., missing post not due to being blocked)
- Parameters:
uri (str) – post URI to query
- Returns:
True if deleted
- Return type:
bool
- async label_posts(posts: list[dict], labelers: list[str] | None = None) list[dict]
Attach labels from subscribed labelers to posts
- Parameters:
posts (list) – Posts to query
labelers (list, optional) – list of labeler DIDs to query against. If None, will use subscribed labelers. Defaults to None
- Returns:
list of post dictionaries with subscribed labels appended
- Return type:
list
- async label_users(users: list[dict], labelers: list[str] | None = None) list[dict]
Attach labels from subscribed labelers to users
- Parameters:
users (list) – Users to query
labelers (list, optional) – list of labeler DIDs to query against. If None, will use subscribed labelers. Defaults to None
- Returns:
list of user dictionaries with subscribed labels appended
- Return type:
list
- async like(uri: str, cid: str | None = None) str | None
Like a post.
- Parameters:
uri (str) – URI of post to like
cid (str, optional) – Content ID of the post (will be fetched if not provided)
- Returns:
created like record uri or None if unsuccessful
- Return type:
str
- async login(username: str, password: str, pds: str | None = None) bool
Login to Bluesky account.
- Parameters:
username (str) – Bluesky handle or email address
password (str) – Account password or app password
- Returns:
True if login successful
- Return type:
bool
- async mute_user(handle: str) str | None
Mute a user by their handle.
- Parameters:
handle (str) – The user’s handle
- Returns:
True if successful, False if failed
- Return type:
bool
- async pin_saved_feed(uri: str) bool
Pin saved feed
- Parameters:
uri (str) – URI of saved feed to pin
- Returns:
True if successful
- Return type:
bool
- async post(text: str, reply_to: str | None = None, images: list[dict] | None = None, video: dict | None = None, link: str | None = None, quote: str | None = None, no_rich_text: bool = False) str | None
Create a new post.
- Parameters:
text (str) – Post content
reply_to (str, optional) – URI of post to reply to
images (list[dict], optional) – List of image dictionaries to attach
video (dict, optional) – Video dictionary to attach
link (dict, optional) – External link dictionary to attach
quote (str, optional) – URI of post to quote
no_rich_text (bool) – If True, will skip link/tag/mention processing for post content. Defaults to False
- Returns:
URI of created post, or None if failed
- Return type:
str
- async query_labelers(targets: list[str], labelers: list[str] | None = None) dict
Query URIs/DIDs with labeling services
- Parameters:
targets (list) – Post URIs and/or profile DIDs to query
labelers (list, optional) – list of labeler DIDs to query against. If None, will use subscribed labelers. Defaults to None
- Returns:
dict of label dictionaries with uri response as keys
- Return type:
dict
- async read_notifications() bool
Mark all current notifications as read
- Returns:
True if successful
- Return type:
bool
- async remove_follow_record(uri: str) bool
Unfollow user via follow uri.
- Parameters:
uri (str) – uri of follow record to delete.
- Returns:
True if successful
- Return type:
bool
- async remove_saved_feed(uri: str) bool
Remove saved feed
- Parameters:
uri (str) – URI of feed to remove
- Returns:
True if successful
- Return type:
bool
- async repost(uri: str, cid: str | None = None) str | None
Repost a post.
- Parameters:
uri (str) – URI of post to repost
cid (str, optional) – Content ID of the post (will be fetched if not provided)
- Returns:
created repost record uri or None if unsuccessful
- Return type:
str
- async save_feed(uri: str, pin: bool = False) bool
Add feed or list to list of saved feeds
- Parameters:
uri (str) – URI of feed/list to save
pin (bool) – If true, saves feed to pinned feeds
- Returns:
True if successful
- Return type:
bool
- async search_feeds(query: str | None = None, limit: int = 20, new_items: bool = False, reset_pagination: bool = False) list[dict]
Search for custom feeds.
- Parameters:
query (str, optional) – Search query. If no query is provided, will return suggested feeds
limit (int) – Number of results to return
new_items (bool) – If True, will fetch any new items since the paginator was initialized instead of fetching the next page. Defaults to False
reset_pagination (bool) – If True, resets FeedPaginator to first page of results.
- Returns:
List of user dicts
- Return type:
list
- async search_posts(query: str, limit: int = 20, top_posts: bool = False, since: datetime | None = None, until: datetime | None = None, language: str | None = None, extract_media: bool = True, media_types: list[str] = [], include_quoted_media: bool = True, quote_nesting: int = 1, extract_reply_parents: bool = True, new_items: bool = False, reset_pagination: bool = False) list[dict]
Search for posts.
- Parameters:
query (str) – Search query
limit (int) – Number of results to return
top_posts (bool) – Whether to query ‘top’ posts. Defaults to False (queries ‘latest’ posts)
since (Datetime) – Query posts after this date. Defaults to None.
until (Datetime) – Query posts before this date. Defaults to None.
language (str) – Query posts in a specific language based on supplied shortcode, e.g. “en”, “es”, “fr”. If no argument is supplied, results in any language will be returned.
extract_media (bool) – If True, attempts to extract media content from the object. Defaults to True.
media_types (list[str]) – A list of media types (e.g., [‘image’, ‘video’]) to extract. Defaults to an empty list, which includes all supported types.
include_quoted_media (bool) – If True, also includes media found in quoted content. Defaults to True.
quote_nesting (int) – The maximum depth of quote nesting to process. Only applies if include_quoted_media is True. Defaults to 1.
extract_reply_parents (bool) – If True, attempts to extract parent posts from the object (if reply). Defaults to True.
new_items (bool) – If True, will fetch any new items since the paginator was initialized instead of fetching the next page. Defaults to False
reset_pagination (bool) – If True, resets FeedPaginator to first page of results.
- Returns:
List of post dicts
- Return type:
list
- async search_users(query: str, limit: int = 20, new_items: bool = False, reset_pagination: bool = False) list[dict]
Search for users.
- Parameters:
query (str) – Search query
limit (int) – Number of results to return
new_items (bool) – If True, will fetch any new items since the paginator was initialized instead of fetching the next page. Defaults to False
reset_pagination (bool) – If True, resets FeedPaginator to first page of results.
- Returns:
List of user dicts
- Return type:
list
- async unblock_user(handle: str) bool
Unblock a user by handle.
- Parameters:
handle (str) – The user’s handle
- Returns:
True if successful
- Return type:
bool
- async undo_repost(uri: str) bool
Undo repost via original post URI.
- Parameters:
uri (str) – URI of post to undo repost of
- Returns:
True if successful
- Return type:
bool
- async unfollow(handle: str) bool
Unfollow a user.
- Parameters:
handle (str) – Handle of user to unfollow
- Returns:
True if successful
- Return type:
bool
- async unlike(uri: str) bool
Unlike a post via post URI.
- Parameters:
uri (str) – URI of post to unlike
- Returns:
True if successful
- Return type:
bool
- async unmute_user(handle: str) str | None
Unmute a muted user by their handle.
- Parameters:
handle (str) – The user’s handle
- Returns:
True if successful, False if failed
- Return type:
bool
- async unpin_feed(uri: str) bool
Unpin a pinned feed. Feed will stay in saved feeds.
- Parameters:
uri (str) – URI of feed to unpin
- Returns:
True if successful
- Return type:
bool
- update_pds_url(url: str) bool
Change base URL of client, i.e., to switch PDS
- Parameters:
url (str) – URL
- Returns:
True if changed
- Return type:
bool
- skyter.bsky.auth_required(func: T) T
Decorator to check if the client is authenticated before trying function
- class skyter.bsky.FeedPaginator(feed: str, params: dict, id_extractor: callable, api_method: callable, response_data_field: str)
Tracks pagination state and handles API method calls for bsky get endpoints with cursors.
- MAX_FETCH_PER_CALL = 100
- async check_new_available() bool
Check if new items are available.
- Returns:
True if there are new items
- Return type:
bool
- get_status()
Get current pagination status.
- mark_error()
Mark that an error occurred (stops further pagination).
- async new() list
Get new items using api_method.
- Returns:
List of feed items from API response
- Return type:
list
- async next_page() list
Get next page of results using api_method and update state.
- Returns:
List of feed items from API response
- Return type:
list