AT URI Scheme

More info: https://atproto.com/specs/at-uri-scheme

class atproto_core.uri.AtUri(host: str, pathname: str = '', hash_: str = '', search_params: List[Tuple[str, Any]] | None = None)

Bases: object

ATP URI Scheme.

Examples

Repository: at://alice.host.com

Repository: at://did:plc:bv6ggog3tya2z3vxsub7hnal

Collection: at://alice.host.com/io.example.song

Record: at://alice.host.com/io.example.song/3yI5-c1z-cc2p-1a

Record Field: at://alice.host.com/io.example.song/3yI5-c1z-cc2p-1a#/title

property collection: str

Get collection name.

classmethod from_relative_str(base: str, uri: str) AtUri

Create AtUri instance from relative URI.

classmethod from_str(uri: str) AtUri

Create AtUri instance from URI.

property hostname: str

Get hostname.

property http: str

Convert instance to HTTP URI.

classmethod make(handle_or_did: str, collection: str | None = None, rkey: str | None = None) AtUri

Create AtUri instance from handle or DID.

property origin: str

Get origin.

property protocol: str

Get protocol.

property rkey: str

Get record key (rkey).

property search: str

Get search params.