{"id":37701781,"url":"https://github.com/GetStream/stream-chat-python","last_synced_at":"2026-01-23T23:00:45.925Z","repository":{"id":34838362,"uuid":"176735869","full_name":"GetStream/stream-chat-python","owner":"GetStream","description":"Stream Chat official Python API Client","archived":false,"fork":false,"pushed_at":"2026-01-15T08:03:02.000Z","size":513,"stargazers_count":71,"open_issues_count":11,"forks_count":21,"subscribers_count":28,"default_branch":"master","last_synced_at":"2026-01-15T14:48:32.102Z","etag":null,"topics":["chat","chat-api","python","rest"],"latest_commit_sha":null,"homepage":"https://getstream.io/chat/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/GetStream.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2019-03-20T13:07:13.000Z","updated_at":"2026-01-15T08:03:05.000Z","dependencies_parsed_at":"2026-01-15T10:28:18.597Z","dependency_job_id":null,"html_url":"https://github.com/GetStream/stream-chat-python","commit_stats":{"total_commits":236,"total_committers":30,"mean_commits":7.866666666666666,"dds":0.711864406779661,"last_synced_commit":"376512eecf5c4258f011e346ad1a566b0168b0b0"},"previous_names":[],"tags_count":79,"template":false,"template_full_name":null,"purl":"pkg:github/GetStream/stream-chat-python","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GetStream%2Fstream-chat-python","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GetStream%2Fstream-chat-python/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GetStream%2Fstream-chat-python/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GetStream%2Fstream-chat-python/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/GetStream","download_url":"https://codeload.github.com/GetStream/stream-chat-python/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GetStream%2Fstream-chat-python/sbom","scorecard":{"id":56085,"data":{"date":"2025-08-11","repo":{"name":"github.com/GetStream/stream-chat-python","commit":"91beb006944ea4d6113b3151934bd06326355ce0"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":5.6,"checks":[{"name":"Maintained","score":3,"reason":"4 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 3","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Security-Policy","score":10,"reason":"security policy file detected","details":["Info: security policy file detected: SECURITY.md:1","Info: Found linked content: SECURITY.md:1","Info: Found disclosure, vulnerability, and/or timelines in security policy: SECURITY.md:1","Info: Found text in security policy: SECURITY.md:1"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Code-Review","score":8,"reason":"Found 16/18 approved changesets -- score normalized to 8","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/ci.yml:1","Warn: no topLevel permission defined: .github/workflows/initiate_release.yml:1","Warn: no topLevel permission defined: .github/workflows/release.yml:1","Warn: no topLevel permission defined: .github/workflows/reviewdog.yml:1","Warn: no topLevel permission defined: .github/workflows/scheduled_test.yml:1","Info: no jobLevel write permissions found"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yml:23: update your workflow using https://app.stepsecurity.io/secureworkflow/GetStream/stream-chat-python/ci.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yml:27: update your workflow using https://app.stepsecurity.io/secureworkflow/GetStream/stream-chat-python/ci.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/initiate_release.yml:15: update your workflow using https://app.stepsecurity.io/secureworkflow/GetStream/stream-chat-python/initiate_release.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/initiate_release.yml:31: update your workflow using https://app.stepsecurity.io/secureworkflow/GetStream/stream-chat-python/initiate_release.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/release.yml:15: update your workflow using https://app.stepsecurity.io/secureworkflow/GetStream/stream-chat-python/release.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/release.yml:19: update your workflow using https://app.stepsecurity.io/secureworkflow/GetStream/stream-chat-python/release.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/release.yml:30: update your workflow using https://app.stepsecurity.io/secureworkflow/GetStream/stream-chat-python/release.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/release.yml:44: update your workflow using https://app.stepsecurity.io/secureworkflow/GetStream/stream-chat-python/release.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/reviewdog.yml:14: update your workflow using https://app.stepsecurity.io/secureworkflow/GetStream/stream-chat-python/reviewdog.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/reviewdog.yml:16: update your workflow using https://app.stepsecurity.io/secureworkflow/GetStream/stream-chat-python/reviewdog.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/reviewdog.yml:20: update your workflow using https://app.stepsecurity.io/secureworkflow/GetStream/stream-chat-python/reviewdog.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/scheduled_test.yml:13: update your workflow using https://app.stepsecurity.io/secureworkflow/GetStream/stream-chat-python/scheduled_test.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/scheduled_test.yml:15: update your workflow using https://app.stepsecurity.io/secureworkflow/GetStream/stream-chat-python/scheduled_test.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/scheduled_test.yml:35: update your workflow using https://app.stepsecurity.io/secureworkflow/GetStream/stream-chat-python/scheduled_test.yml/master?enable=pin","Warn: pipCommand not pinned by hash: .github/workflows/ci.yml:33","Warn: pipCommand not pinned by hash: .github/workflows/release.yml:39","Warn: pipCommand not pinned by hash: .github/workflows/reviewdog.yml:26","Warn: pipCommand not pinned by hash: .github/workflows/scheduled_test.yml:21","Info:   0 out of  11 GitHub-owned GitHubAction dependencies pinned","Info:   0 out of   3 third-party GitHubAction dependencies pinned","Info:   0 out of   4 pipCommand dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":9,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Warn: project license file does not contain an FSF or OSI license."],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":-1,"reason":"internal error: error during branchesHandler.setup: internal error: githubv4.Query: Resource not accessible by integration","details":null,"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 30 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}}]},"last_synced_at":"2025-08-15T00:47:04.532Z","repository_id":34838362,"created_at":"2025-08-15T00:47:04.532Z","updated_at":"2025-08-15T00:47:04.532Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28702893,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-23T17:25:48.045Z","status":"ssl_error","status_checked_at":"2026-01-23T17:25:47.153Z","response_time":59,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["chat","chat-api","python","rest"],"created_at":"2026-01-16T13:00:26.529Z","updated_at":"2026-01-23T23:00:45.891Z","avatar_url":"https://github.com/GetStream.png","language":"Python","readme":"# Official Python SDK for [Stream Chat](https://getstream.io/chat/)\n\n[![build](https://github.com/GetStream/stream-chat-python/workflows/build/badge.svg)](https://github.com/GetStream/stream-chat-python/actions) [![PyPI version](https://badge.fury.io/py/stream-chat.svg)](http://badge.fury.io/py/stream-chat) ![PyPI - Python Version](https://img.shields.io/pypi/pyversions/stream-chat.svg) [![Checked with mypy](http://www.mypy-lang.org/static/mypy_badge.svg)](http://mypy-lang.org/)\n\n\u003cp align=\"center\"\u003e\n    \u003cimg src=\"./assets/logo.svg\" width=\"50%\" height=\"50%\"\u003e\n\u003c/p\u003e\n\u003cp align=\"center\"\u003e\n    Official Python API client for Stream Chat, a service for building chat applications.\n    \u003cbr /\u003e\n    \u003ca href=\"https://getstream.io/chat/docs/\"\u003e\u003cstrong\u003eExplore the docs »\u003c/strong\u003e\u003c/a\u003e\n    \u003cbr /\u003e\n    \u003cbr /\u003e\n    \u003ca href=\"https://github.com/GetStream/python-chat-example\"\u003eCode Samples\u003c/a\u003e\n    ·\n    \u003ca href=\"https://github.com/GetStream/stream-chat-python/issues\"\u003eReport Bug\u003c/a\u003e\n    ·\n    \u003ca href=\"https://github.com/GetStream/stream-chat-python/issues\"\u003eRequest Feature\u003c/a\u003e\n\u003c/p\u003e\n\n---\n\u003e ### :bulb: Major update in v4.0 \u003c\n\u003e The returned response objects are instances of [`StreamResponse`](https://github.com/GetStream/stream-chat-python/blob/master/stream_chat/types/stream_response.py) class. It inherits from `dict`, so it's fully backward compatible. Additionally, it provides other benefits such as rate limit information (`resp.rate_limit()`), response headers (`resp.headers()`) or status code (`resp.status_code()`).\n---\n\n## 📝 About Stream\n\nYou can sign up for a Stream account at our [Get Started](https://getstream.io/chat/get_started/) page.\n\nYou can use this library to access chat API endpoints server-side.\n\nFor the client-side integrations (web and mobile) have a look at the JavaScript, iOS and Android SDK libraries ([docs](https://getstream.io/chat/)).\n\n## ⚙️ Installation\n\n```shell\n$ pip install stream-chat\n```\n\n## ✨ Getting started\n\n\u003e :bulb: The library is almost 100% typed. Feel free to enable [mypy](https://github.com/python/mypy) for our library. We will introduce more improvements in the future in this area.\n\n```python\nfrom stream_chat import StreamChat\n\nchat = StreamChat(api_key=\"STREAM_KEY\", api_secret=\"STREAM_SECRET\")\n\n# add a user\nchat.upsert_user({\"id\": \"chuck\", \"name\": \"Chuck\"})\n\n# create a channel about kung-fu\nchannel = chat.channel(\"messaging\", \"kung-fu\")\nchannel.create(\"chuck\")\n\n# add a first message to the channel\nchannel.send_message({\"text\": \"AMA about kung-fu\"}, \"chuck\")\n\n# we also expose some response metadata through a custom dictionary\nresp = chat.deactivate_user(\"bruce_lee\")\n\nprint(type(resp)) # \u003cclass 'stream_chat.types.stream_response.StreamResponse'\u003e\nprint(resp[\"user\"][\"id\"]) # bruce_lee\n\nrate_limit = resp.rate_limit()\nprint(f\"{rate_limit.limit} / {rate_limit.remaining} / {rate_limit.reset}\") # 60 / 59 /2022-01-06 12:35:00+00:00\n\nheaders = resp.headers()\nprint(headers) # { 'Content-Encoding': 'gzip', 'Content-Length': '33', ... }\n\nstatus_code = resp.status_code()\nprint(status_code) # 200\n\n```\n\n### Async\n\n```python\nimport asyncio\nfrom stream_chat import StreamChatAsync\n\n\nasync def main():\n    async with StreamChatAsync(api_key=\"STREAM_KEY\", api_secret=\"STREAM_SECRET\") as chat:\n        # add a user\n        await chat.upsert_user({\"id\": \"chuck\", \"name\": \"Chuck\"})\n\n        # create a channel about kung-fu\n        channel = chat.channel(\"messaging\", \"kung-fu\")\n        await channel.create(\"chuck\")\n\n        # add a first message to the channel\n        await channel.send_message({\"text\": \"AMA about kung-fu\"}, \"chuck\")\n\n        # we also expose some response metadata through a custom dictionary\n        resp = await chat.deactivate_user(\"bruce_lee\")\n        print(type(resp)) # \u003cclass 'stream_chat.types.stream_response.StreamResponse'\u003e\n        print(resp[\"user\"][\"id\"]) # bruce_lee\n\n        rate_limit = resp.rate_limit()\n        print(f\"{rate_limit.limit} / {rate_limit.remaining} / {rate_limit.reset}\") # 60 / 59 / 2022-01-06 12:35:00+00:00\n\n        headers = resp.headers()\n        print(headers) # { 'Content-Encoding': 'gzip', 'Content-Length': '33', ... }\n\n        status_code = resp.status_code()\n        print(status_code) # 200\n\n\nif __name__ == '__main__':\n    loop = asyncio.get_event_loop()\n    try:\n        loop.run_until_complete(main())\n    finally:\n        loop.run_until_complete(loop.shutdown_asyncgens())\n        loop.close()\n\n```\n\n## ✍️ Contributing\n\nWe welcome code changes that improve this library or fix a problem, please make sure to follow all best practices and add tests if applicable before submitting a Pull Request on Github. We are very happy to merge your code in the official repository. Make sure to sign our [Contributor License Agreement (CLA)](https://docs.google.com/forms/d/e/1FAIpQLScFKsKkAJI7mhCr7K9rEIOpqIDThrWxuvxnwUq2XkHyG154vQ/viewform) first. See our [license file](./LICENSE) for more details.\n\nHead over to [CONTRIBUTING.md](./CONTRIBUTING.md) for some development tips.\n\n## 🧑‍💻 We are hiring!\n\nWe've recently closed a [$38 million Series B funding round](https://techcrunch.com/2021/03/04/stream-raises-38m-as-its-chat-and-activity-feed-apis-power-communications-for-1b-users/) and we keep actively growing.\nOur APIs are used by more than a billion end-users, and you'll have a chance to make a huge impact on the product within a team of the strongest engineers all over the world.\n\nCheck out our current openings and apply via [Stream's website](https://getstream.io/team/#jobs).\n","funding_links":[],"categories":["Official SDKs \u0026 Tutorials"],"sub_categories":["Backend SDKs"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FGetStream%2Fstream-chat-python","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FGetStream%2Fstream-chat-python","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FGetStream%2Fstream-chat-python/lists"}