Metadata-Version: 2.4
Name: geniete-channels
Version: 0.1.1
Summary: GenieTé ChannelService Python SDK — managed realtime pub/sub channels
License: MIT
License-File: LICENSE
Keywords: pubsub,websocket,realtime,channels,geniete
Author: Genie, Inc.
Author-email: renat@geniete.com
Requires-Python: >=3.10
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Provides-Extra: ws
Requires-Dist: httpx (>=0.27.0)
Requires-Dist: websockets (>=13.0) ; extra == "ws"
Project-URL: Company, https://www.genieinc.com/
Project-URL: Documentation, https://channels.geniete.com/docs/channels/
Project-URL: Homepage, https://channels.geniete.com/
Description-Content-Type: text/markdown

# geniete-channels

Python SDK for [GenieTé ChannelService](https://channels.geniete.com/) —
managed realtime pub/sub channels: publish from anywhere, subscribe from
browsers or servers, no relay infrastructure of your own.

```bash
pip install geniete-channels          # publish + tickets
pip install 'geniete-channels[ws]'    # + async subscribe stream
```

```python
from geniete_channels import Channel

ch = Channel(token="tok_...", channel_id="chan_...")
ch.publish({"type": "message", "from": "bot", "text": "hello, channel"})
ticket = ch.ticket()      # one-time 30s credential for a browser client
```

```python
from geniete_channels import AsyncChannel

ch = AsyncChannel(token="tok_...", channel_id="chan_...")
async for msg in ch.subscribe():      # pings filtered for you
    print(msg)
```

Channel and token management with your account API key:

```python
from geniete_channels import ChannelsAdmin
admin = ChannelsAdmin(api_key="...")
chan = admin.create_channel("chat-general")
tok = admin.create_token(chan["id"], label="browser", can_read=True, can_write=True)
```

Full docs: <https://channels.geniete.com/docs/channels/>. Errors raise
`ChannelsError` with the server's reason.

MIT © Genie, Inc.

