chitose.app.bsky.embed package#

Submodules#

chitose.app.bsky.embed.defs module#

class chitose.app.bsky.embed.defs.AspectRatio(width: int, height: int)#

Bases: Object

width:height represents an aspect ratio. It may be approximate, and may not correspond to absolute dimensions in any given unit.

to_dict() dict[str, Any]#

chitose.app.bsky.embed.external module#

class chitose.app.bsky.embed.external.External(external: ExternalExternal)#

Bases: Object

A representation of some externally linked content (eg, a URL and ‘card’), embedded in a Bluesky record (eg, a post).

to_dict() dict[str, Any]#
class chitose.app.bsky.embed.external.ExternalExternal(uri: str, title: str, description: str, thumb: Blob | None = None)#

Bases: Object

to_dict() dict[str, Any]#
class chitose.app.bsky.embed.external.View(external: ViewExternal)#

Bases: Object

to_dict() dict[str, Any]#
class chitose.app.bsky.embed.external.ViewExternal(uri: str, title: str, description: str, thumb: str | None = None)#

Bases: Object

to_dict() dict[str, Any]#

chitose.app.bsky.embed.images module#

A set of images embedded in a Bluesky record (eg, a post).

class chitose.app.bsky.embed.images.Image(image: Blob, alt: str, aspect_ratio: AspectRatio | None = None)#

Bases: Object

Parameters:

alt – Alt text description of the image, for accessibility.

to_dict() dict[str, Any]#
class chitose.app.bsky.embed.images.Images(images: list[Image])#

Bases: Object

to_dict() dict[str, Any]#
class chitose.app.bsky.embed.images.View(images: list[ViewImage])#

Bases: Object

to_dict() dict[str, Any]#
class chitose.app.bsky.embed.images.ViewImage(thumb: str, fullsize: str, alt: str, aspect_ratio: AspectRatio | None = None)#

Bases: Object

Parameters:
  • thumb – Fully-qualified URL where a thumbnail of the image can be fetched. For example, CDN location provided by the App View.

  • fullsize – Fully-qualified URL where a large version of the image can be fetched. May or may not be the exact original blob. For example, CDN location provided by the App View.

  • alt – Alt text description of the image, for accessibility.

to_dict() dict[str, Any]#

chitose.app.bsky.embed.record module#

A representation of a record embedded in a Bluesky record (eg, a post). For example, a quote-post, or sharing a feed generator record.

class chitose.app.bsky.embed.record.Record(record: StrongRef)#

Bases: Object

to_dict() dict[str, Any]#
class chitose.app.bsky.embed.record.View(record: ViewRecord | ViewNotFound | ViewBlocked | ViewDetached | GeneratorView | ListView | LabelerView | StarterPackViewBasic)#

Bases: Object

to_dict() dict[str, Any]#
class chitose.app.bsky.embed.record.ViewBlocked(uri: str, blocked: bool, author: BlockedAuthor)#

Bases: Object

to_dict() dict[str, Any]#
class chitose.app.bsky.embed.record.ViewDetached(uri: str, detached: bool)#

Bases: Object

to_dict() dict[str, Any]#
class chitose.app.bsky.embed.record.ViewNotFound(uri: str, not_found: bool)#

Bases: Object

to_dict() dict[str, Any]#
class chitose.app.bsky.embed.record.ViewRecord(uri: str, cid: str, author: ProfileViewBasic, value: Any, indexed_at: str, labels: list[Label] | None = None, reply_count: int | None = None, repost_count: int | None = None, like_count: int | None = None, quote_count: int | None = None, embeds: list[View | View | View | View | View] | None = None)#

Bases: Object

Parameters:

value – The record data itself.

to_dict() dict[str, Any]#

chitose.app.bsky.embed.record_with_media module#

A representation of a record embedded in a Bluesky record (eg, a post), alongside other compatible embeds. For example, a quote post and image, or a quote post and external URL card.

class chitose.app.bsky.embed.record_with_media.RecordWithMedia(record: Record, media: Images | Video | External)#

Bases: Object

to_dict() dict[str, Any]#
class chitose.app.bsky.embed.record_with_media.View(record: View, media: View | View | View)#

Bases: Object

to_dict() dict[str, Any]#

chitose.app.bsky.embed.video module#

A video embedded in a Bluesky record (eg, a post).

class chitose.app.bsky.embed.video.Caption(lang: str, file: Blob)#

Bases: Object

to_dict() dict[str, Any]#
class chitose.app.bsky.embed.video.Video(video: Blob, captions: list[Caption] | None = None, alt: str | None = None, aspect_ratio: AspectRatio | None = None)#

Bases: Object

Parameters:

alt – Alt text description of the video, for accessibility.

to_dict() dict[str, Any]#
class chitose.app.bsky.embed.video.View(cid: str, playlist: str, thumbnail: str | None = None, alt: str | None = None, aspect_ratio: AspectRatio | None = None)#

Bases: Object

to_dict() dict[str, Any]#

Module contents#

class chitose.app.bsky.embed.Embed_(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.