Metadata-Version: 2.4
Name: atproto_jetstream
Version: 0.2.0
Summary: Receive Jetstream events from the AT Protocol
License-Expression: MIT
Project-URL: Repository, https://tangled.org/@nauta.one/atproto_jetstream
Project-URL: Issues, https://tangled.org/@nauta.one/atproto_jetstream/issues
Requires-Python: >=3.12
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: aiohttp>=3.13.0
Dynamic: license-file

# atproto_jetstream

Small, typed, and async package to receive [Jetstream][jetstream] events from the [AT Protocol][atproto].

## install

Using your package manager, install the [`atproto_jetstream`][pypi] dependency.

- `pip install atproto_jetstream`
- `uv add atproto_jetstream`

## usage

```python
from asyncio import run
from atproto_jetstream import Jetstream


async def main():
    async with Jetstream("jetstream1.us-east.bsky.network") as stream:
        async for event in stream:
            match event.kind:
                case "account":
                    print(event.account)
                case "identity":
                    print(event.identity)
                case "commit":
                    print(event.commit)


if __name__ == "__main__":
    run(main())
```

[atproto]: https://atproto.com/
[jetstream]: https://docs.bsky.app/blog/jetstream
[pypi]: https://pypi.org/project/atproto_jetstream/
