chitose.app.bsky.richtext package#

Submodules#

chitose.app.bsky.richtext.facet module#

class chitose.app.bsky.richtext.facet.ByteSlice(byte_start: int, byte_end: int)#

Bases: Object

Specifies the sub-string range a facet feature applies to. Start index is inclusive, end index is exclusive. Indices are zero-indexed, counting bytes of the UTF-8 encoded text. NOTE: some languages, like Javascript, use UTF-16 or Unicode codepoints for string slice indexing; in these languages, convert to byte arrays before working with facets.

to_dict() dict[str, Any]#
class chitose.app.bsky.richtext.facet.Facet(index: ByteSlice, features: list[Mention | Link | Tag])#

Bases: Object

Annotation of a sub-string within rich text.

to_dict() dict[str, Any]#

Bases: Object

Facet feature for a URL. The text URL may have been simplified or truncated, but the facet reference should be a complete URL.

to_dict() dict[str, Any]#
class chitose.app.bsky.richtext.facet.Mention(did: str)#

Bases: Object

Facet feature for mention of another account. The text is usually a handle, including a ‘@’ prefix, but the facet reference is a DID.

to_dict() dict[str, Any]#
class chitose.app.bsky.richtext.facet.Tag(tag: str)#

Bases: Object

Facet feature for a hashtag. The text usually includes a ‘#’ prefix, but the facet reference should not (except in the case of ‘double hash tags’).

to_dict() dict[str, Any]#

Module contents#

class chitose.app.bsky.richtext.Richtext_(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.