Async Python Jetstream Client

improve README.md some more

+13 -5
README.md
··· 2 2 3 3 Small, typed, and async package to receive [Jetstream][jetstream] events from the [AT Protocol][atproto]. 4 4 5 + ## install 6 + 7 + Using your package manager, install the [`atproto_jetstream`][pypi] dependency. 8 + 9 + - `pip install atproto_jetstream` 10 + - `uv add atproto_jetstream` 11 + 5 12 ## usage 6 13 7 14 ```python ··· 11 18 12 19 async def main(): 13 20 async with Jetstream("jetstream1.us-east.bsky.network") as stream: 14 - async for message in stream: 15 - match message.kind: 21 + async for event in stream: 22 + match event.kind: 16 23 case "account": 17 - print(message.account) 24 + print(event.account) 18 25 case "identity": 19 - print(message.identity) 26 + print(event.identity) 20 27 case "commit": 21 - print(message.commit) 28 + print(event.commit) 22 29 23 30 24 31 if __name__ == "__main__": ··· 27 34 28 35 [atproto]: https://atproto.com/ 29 36 [jetstream]: https://docs.bsky.app/blog/jetstream 37 + [pypi]: https://pypi.org/project/atproto_jetstream/
+5 -5
example.py
··· 4 4 5 5 async def main(): 6 6 async with Jetstream("jetstream1.us-east.bsky.network") as stream: 7 - async for message in stream: 8 - match message.kind: 7 + async for event in stream: 8 + match event.kind: 9 9 case "account": 10 - print(message.account) 10 + print(event.account) 11 11 case "identity": 12 - print(message.identity) 12 + print(event.identity) 13 13 case "commit": 14 - print(message.commit) 14 + print(event.commit) 15 15 16 16 17 17 if __name__ == "__main__":
+3
pyproject.toml
··· 9 9 dependencies = [ 10 10 "aiohttp>=3.13.0", 11 11 ] 12 + 13 + [project.urls] 14 + Repository = "https://tangled.org/@nauta.one/atproto_jetstream"