Skip to main content

Client for Stream Chat.

Project description

stream-chat-python

Build Status codecov PyPI version PyPI - Python Version

the official Python API client for Stream chat a service for building chat applications.

You can sign up for a Stream account at https://getstream.io/chat/get_started/.

You can use this library to access chat API endpoints server-side, for the client-side integrations (web and mobile) have a look at the Javascript, iOS and Android SDK libraries (https://getstream.io/chat/).

Installation

pip install stream-chat

Documentation

Official API docs

How to build a chat app with Python tutorial

Chat with Python, Django and React

Supported features

  • Chat channels
  • Messages
  • Chat channel types
  • User management
  • Moderation API
  • Push configuration
  • User devices
  • User search
  • Channel search

Quickstart

chat = StreamChat(api_key="STREAM_KEY", api_secret="STREAM_SECRET")

# add a user
chat.update_user({"id": "chuck", "name": "Chuck"})

# create a channel about kung-fu
channel = chat.channel("messaging", "kung-fu")
channel.create("chuck")

# add a first message to the channel
channel.send_message({"text": "AMA about kung-fu"}, "chuck")

Contributing

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

STREAM_KEY=my_api_key STREAM_SECRET=my_api_secret py.test stream_chat/ -v

Install black and pycodestyle

pip install black
pip install pycodestyle

Releasing a new version

In order to release new version you need to be a maintainer on Pypi.

  • Update CHANGELOG
  • Make sure you have twine installed (pip install twine)
  • Update the version on setup.py
  • Commit and push to Github
  • Create a new tag for the version (eg. v2.9.0)
  • Create a new dist with python python setup.py sdist
  • Upload the new distributable with twine twine upload dist/stream-chat-VERSION-NAME.tar.gz

If unsure you can also test using the Pypi test servers twine upload --repository-url https://test.pypi.org/legacy/ dist/stream-chat-VERSION-NAME.tar.gz

Project details


Release history Release notifications | RSS feed

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

stream-chat-1.7.0.tar.gz (14.2 kB view details)

Uploaded Source

Built Distribution

stream_chat-1.7.0-py3-none-any.whl (20.1 kB view details)

Uploaded Python 3

File details

Details for the file stream-chat-1.7.0.tar.gz.

File metadata

  • Download URL: stream-chat-1.7.0.tar.gz
  • Upload date:
  • Size: 14.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.6.0 requests/2.24.0 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.50.2 CPython/3.8.6

File hashes

Hashes for stream-chat-1.7.0.tar.gz
Algorithm Hash digest
SHA256 ce38079f5d61756d1e2a03f19d443cdce5b26f5af11a5e723eba53668f1b127d
MD5 abeb9bcd5bfb29d506b4ee90ef72cef1
BLAKE2b-256 4af2f82f5262411c00a7b598fa4f5eab3cdd4609ec3d50f7fd5381419224478a

See more details on using hashes here.

File details

Details for the file stream_chat-1.7.0-py3-none-any.whl.

File metadata

  • Download URL: stream_chat-1.7.0-py3-none-any.whl
  • Upload date:
  • Size: 20.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.6.0 requests/2.24.0 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.50.2 CPython/3.8.6

File hashes

Hashes for stream_chat-1.7.0-py3-none-any.whl
Algorithm Hash digest
SHA256 d22fdbda95dda0804524a06dd94712855750c619f2ccd0ced923834d1499608a
MD5 4fc4e2504be2d8a40085ca8a8368ba92
BLAKE2b-256 e3d417d893dd428ddee9cc725aaeb6fd11034fc61c5e1d54739d57803621570a

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page