Skip to content

Commit e5c5b9f

Browse files
authored
Update README.md
1 parent 99c0206 commit e5c5b9f

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

README.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,23 @@ TODO: add a sample Python chat program
3838
- User search
3939
- Channel search
4040

41+
### Quickstart
42+
43+
```python
44+
chat = StreamChat(api_key="STREAM_KEY", api_secret="STREAM_SECRET")
45+
46+
# add a user
47+
chat.update_user({"id": "chuck", "name": "Chuck"})
48+
49+
# create a channel about kung-fu
50+
channel = chat.channel("messaging", "kung-fu")
51+
channel.create("chuck")
52+
53+
# add a first message to the channel
54+
channel.send_message({"text": "AMA about kung-fu"})
55+
56+
```
57+
4158
### Contributing
4259

4360
First, make sure you can run the test suite. Tests are run via py.test

0 commit comments

Comments
 (0)