chitose.com.atproto.sync package

Submodules

chitose.com.atproto.sync.get_blob module

chitose.com.atproto.sync.get_blocks module

chitose.com.atproto.sync.get_checkout module

chitose.com.atproto.sync.get_commit_path module

chitose.com.atproto.sync.get_head module

chitose.com.atproto.sync.get_record module

chitose.com.atproto.sync.get_repo module

chitose.com.atproto.sync.list_blobs module

chitose.com.atproto.sync.list_repos module

class chitose.com.atproto.sync.list_repos.Repo(did: str, head: str)

Bases: Object

to_dict()

chitose.com.atproto.sync.notify_of_update module

chitose.com.atproto.sync.request_crawl module

chitose.com.atproto.sync.subscribe_repos module

class chitose.com.atproto.sync.subscribe_repos.Commit(seq: int, rebase: str, too_big: str, repo: str, commit: Any, prev: Any, blocks: Any, ops: list[RepoOp], blobs: list[Any], time: str)

Bases: Object

to_dict()
class chitose.com.atproto.sync.subscribe_repos.Handle(seq: int, did: str, handle: str, time: str)

Bases: Object

to_dict()
class chitose.com.atproto.sync.subscribe_repos.Info(name: str, message: str | None = None)

Bases: Object

to_dict()
class chitose.com.atproto.sync.subscribe_repos.Migrate(seq: int, did: str, migrate_to: str, time: str)

Bases: Object

to_dict()
class chitose.com.atproto.sync.subscribe_repos.RepoOp(action: str, path: str, cid: Any)

Bases: Object

to_dict()
class chitose.com.atproto.sync.subscribe_repos.Tombstone(seq: int, did: str, time: str)

Bases: Object

to_dict()

Module contents

class chitose.com.atproto.sync.Sync_(service: str, headers: dict[str, str])

Bases: object

get_blob(did: str, cid: str)

Get a blob associated with a given repo.

Parameters:
  • did – The DID of the repo.

  • cid – The CID of the blob to fetch

get_blocks(did: str, cids: list[str])

Gets blocks from a given repo.

Parameters:

did – The DID of the repo.

get_checkout(did: str, commit: str | None = None)

Gets the repo state.

Parameters:
  • did – The DID of the repo.

  • commit – The commit to get the checkout from. Defaults to current HEAD.

get_commit_path(did: str, latest: str | None = None, earliest: str | None = None)

Gets the path of repo commits

Parameters:
  • did – The DID of the repo.

  • latest – The most recent commit

  • earliest – The earliest commit to start from

get_head(did: str)

Gets the current HEAD CID of a repo.

Parameters:

did – The DID of the repo.

get_record(did: str, collection: str, rkey: str, commit: str | None = None)

Gets blocks needed for existence or non-existence of record.

Parameters:
  • did – The DID of the repo.

  • commit – An optional past commit CID.

get_repo(did: str, earliest: str | None = None, latest: str | None = None)

Gets the repo state.

Parameters:
  • did – The DID of the repo.

  • earliest – The earliest commit in the commit range (not inclusive)

  • latest – The latest commit in the commit range (inclusive)

list_blobs(did: str, latest: str | None = None, earliest: str | None = None)

List blob cids for some range of commits

Parameters:
  • did – The DID of the repo.

  • latest – The most recent commit

  • earliest – The earliest commit to start from

list_repos(limit: int | None = None, cursor: str | None = None)

List dids and root cids of hosted repos

notify_of_update(hostname: str)

Notify a crawling service of a recent update. Often when a long break between updates causes the connection with the crawling service to break.

Parameters:

hostname – Hostname of the service that is notifying of update.

request_crawl(hostname: str)

Request a service to persistently crawl hosted repos.

Parameters:

hostname – Hostname of the service that is requesting to be crawled.