Since it blew up after the 2024 election Twitter exodus, I’ve been learning about the Bluesky social network and the underlying Authenticated Transfer protocol (better known as the ATProtocol).
I’m interested in understanding the primitives and writing useful Python code to interact with the service.
Current notes:
- Self-hosting a Bluesky PDS with Dokku
- Bluesky’s Jetstream with just a few lines of Python
- Converting between DIDs and Bluesky handles with Python
- Decoding the Bluesky Firehose with zero Python dependencies
External writing about Bluesky:
- How decentralized is Bluesky, really? (Answer: in practice, not very!)
External documentation and code links:
- Bluesky’s official documentation
- The ATProtocol specification
bluesky-social/atproto
: a typescript reference implementation of the ATProtobluesky-social/indigo
: Bluesky’s ATProto library and utilities in golang.did-method-plc
: Bluesky’s super complex DID method spec and implementation.
There are a few Python libraries worth mentioning here:
cbor2
— a mature implementation of CBOR aka RFC 8949. If you need to work with CBOR in Python, this is the library to use.multiformats
— a Python library for working with multiformats, a set of self-describing binary encoding formats. I find this to be the most reliable way to work with underlying ATProto and IPLD data in Python.libipld
— a Python wrapper around the Rust IPLD library. I’ve got my eye on this library but, as of late November 2024, it’s a work in progress and I wouldn’t recommend using it. In practice, it causes frequent hard crashes in the Python interpreter.atproto
— is an early effort to build a full-featured Python library for interacting with the ATProtocol. It builds onlibipld
and is also a work in progress. I wouldn’t recommend using it for production code yet but it shows promise.