getstream 0.0.42__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (50) hide show
  1. getstream-0.0.42/.env.example +3 -0
  2. getstream-0.0.42/.github/release.yml +17 -0
  3. getstream-0.0.42/.github/workflows/ci.yml +37 -0
  4. getstream-0.0.42/.github/workflows/initiate_release.yml +45 -0
  5. getstream-0.0.42/.github/workflows/release.yml +39 -0
  6. getstream-0.0.42/.gitignore +24 -0
  7. getstream-0.0.42/.pre-commit-config.yaml +14 -0
  8. getstream-0.0.42/CHANGELOG.md +15 -0
  9. getstream-0.0.42/LICENSE.md +219 -0
  10. getstream-0.0.42/PKG-INFO +151 -0
  11. getstream-0.0.42/README.md +137 -0
  12. getstream-0.0.42/generate.sh +23 -0
  13. getstream-0.0.42/getstream/__init__.py +1 -0
  14. getstream-0.0.42/getstream/base.py +193 -0
  15. getstream-0.0.42/getstream/chat/__init__.py +0 -0
  16. getstream-0.0.42/getstream/chat/channel.py +2 -0
  17. getstream-0.0.42/getstream/chat/client.py +8 -0
  18. getstream-0.0.42/getstream/chat/rest_client.py +1628 -0
  19. getstream-0.0.42/getstream/common/__init__.py +0 -0
  20. getstream-0.0.42/getstream/common/client.py +8 -0
  21. getstream-0.0.42/getstream/common/rest_client.py +632 -0
  22. getstream-0.0.42/getstream/config.py +36 -0
  23. getstream-0.0.42/getstream/generic.py +4 -0
  24. getstream-0.0.42/getstream/meta.py +15 -0
  25. getstream-0.0.42/getstream/models/__init__.py +13469 -0
  26. getstream-0.0.42/getstream/rate_limit.py +38 -0
  27. getstream-0.0.42/getstream/stream.py +152 -0
  28. getstream-0.0.42/getstream/stream_response.py +35 -0
  29. getstream-0.0.42/getstream/utils.py +148 -0
  30. getstream-0.0.42/getstream/version.py +1 -0
  31. getstream-0.0.42/getstream/video/__init__.py +0 -0
  32. getstream-0.0.42/getstream/video/call.py +409 -0
  33. getstream-0.0.42/getstream/video/client.py +22 -0
  34. getstream-0.0.42/getstream/video/rest_client.py +863 -0
  35. getstream-0.0.42/pyproject.toml +47 -0
  36. getstream-0.0.42/pytest.ini +2 -0
  37. getstream-0.0.42/tests/__init__.py +0 -0
  38. getstream-0.0.42/tests/base.py +42 -0
  39. getstream-0.0.42/tests/conftest.py +10 -0
  40. getstream-0.0.42/tests/fixtures/get_call_response.json +268 -0
  41. getstream-0.0.42/tests/fixtures.py +54 -0
  42. getstream-0.0.42/tests/test.env.example +3 -0
  43. getstream-0.0.42/tests/test_api_error_remap.py +26 -0
  44. getstream-0.0.42/tests/test_chat_integration.py +77 -0
  45. getstream-0.0.42/tests/test_client.py +34 -0
  46. getstream-0.0.42/tests/test_decoding.py +352 -0
  47. getstream-0.0.42/tests/test_stream_response.py +85 -0
  48. getstream-0.0.42/tests/test_video_examples.py +372 -0
  49. getstream-0.0.42/tests/test_video_integration.py +399 -0
  50. getstream-0.0.42/uv.lock +764 -0
@@ -0,0 +1,3 @@
1
+ STREAM_API_KEY=892s22ypvt6m
2
+ STREAM_API_SECRET=5cssrefv55rs3cnkk38kfjam2k7c2ykwn4h79dqh66ym89gm65cxy4h9jx4cypd6
3
+ STREAM_BASE_URL=http://127.0.0.1:3030
@@ -0,0 +1,17 @@
1
+ changelog:
2
+ exclude:
3
+ labels:
4
+ - ignore-for-release
5
+ authors:
6
+ - octocat
7
+ - github-actions
8
+ categories:
9
+ - title: Breaking Changes 🛠
10
+ labels:
11
+ - breaking-change
12
+ - title: Exciting New Features 🎉
13
+ labels:
14
+ - enhancement
15
+ - title: Changes
16
+ labels:
17
+ - "*"
@@ -0,0 +1,37 @@
1
+ name: CI
2
+
3
+ on:
4
+ push:
5
+ branches:
6
+ - main
7
+ pull_request:
8
+ branches:
9
+ - main
10
+
11
+ jobs:
12
+ test:
13
+ name: Tests
14
+ environment: ci
15
+ runs-on: ubuntu-latest
16
+ continue-on-error: true
17
+ strategy:
18
+ fail-fast: false
19
+ matrix:
20
+ python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"]
21
+ steps:
22
+ - name: Check out repo
23
+ uses: actions/checkout@v4
24
+ - uses: chartboost/ruff-action@v1
25
+ continue-on-error: false
26
+ - name: Install uv and set the python version
27
+ uses: astral-sh/setup-uv@v5
28
+ with:
29
+ python-version: ${{ matrix.python-version }}
30
+ - name: Install the project
31
+ run: uv sync --all-extras --dev
32
+ - name: Run tests
33
+ env:
34
+ STREAM_BASE_URL: ${{ vars.STREAM_BASE_URL }}
35
+ STREAM_API_KEY: ${{ vars.STREAM_API_KEY }}
36
+ STREAM_API_SECRET: ${{ secrets.STREAM_API_SECRET }}
37
+ run: uv run pytest tests/ getstream/
@@ -0,0 +1,45 @@
1
+ name: Create release PR
2
+
3
+ on:
4
+ workflow_dispatch:
5
+ inputs:
6
+ version:
7
+ description: "The new version number following semantic versioning convention. Example: 1.40.1"
8
+ required: true
9
+
10
+ jobs:
11
+ init_release:
12
+ name: 🚀 Create release PR
13
+ runs-on: ubuntu-latest
14
+ steps:
15
+ - uses: actions/checkout@v4
16
+ with:
17
+ fetch-depth: 0 # gives the changelog generator access to all previous commits
18
+ - name: Install uv and set the python version
19
+ uses: astral-sh/setup-uv@v5
20
+ with:
21
+ python-version: "3.12"
22
+ - name: Update version.py and push release branch
23
+ env:
24
+ VERSION: ${{ github.event.inputs.version }}
25
+ run: |
26
+ # Update pyproject.toml with sed since uv doesn't have a version command
27
+ sed -i "s/^version = \".*\"/version = \"$VERSION\"/" pyproject.toml
28
+ # Update version.py directly
29
+ sed -i "s/^VERSION = \".*\"/VERSION = \"$VERSION\"/" getstream/version.py
30
+ # Configure git and push release branch
31
+ git config --global user.name 'github-actions'
32
+ git config --global user.email 'release@getstream.io'
33
+ git checkout -q -b "release-$VERSION"
34
+ git commit -am "chore(release): $VERSION"
35
+ git push -q -u origin "release-$VERSION"
36
+ - name: Open pull request
37
+ env:
38
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
39
+ run: |
40
+ gh pr create \
41
+ -t "Release ${{ github.event.inputs.version }}" \
42
+ -l "ignore-for-release" \
43
+ -b "# :rocket: ${{ github.event.inputs.version }}
44
+ Make sure to use squash & merge when merging!
45
+ Once this is merged, another job will kick off automatically and publish the package."
@@ -0,0 +1,39 @@
1
+ name: Release
2
+
3
+ on:
4
+ pull_request:
5
+ types: [closed]
6
+ branches:
7
+ - main
8
+
9
+ jobs:
10
+ Release:
11
+ name: 🚀 Release
12
+ if: github.event.pull_request.merged && startsWith(github.head_ref, 'release-')
13
+ runs-on: ubuntu-latest
14
+ permissions: write-all
15
+ steps:
16
+ - uses: actions/github-script@v7
17
+ with:
18
+ script: |
19
+ // Getting the release version from the PR source branch
20
+ // Source branch looks like this: release-1.0.0
21
+ const version = context.payload.pull_request.head.ref.split('-')[1]
22
+ core.exportVariable('VERSION', version)
23
+ - uses: actions/checkout@v4
24
+ with:
25
+ fetch-depth: 0
26
+ - name: Install uv and set the python version
27
+ uses: astral-sh/setup-uv@v5
28
+ with:
29
+ python-version: "3.12"
30
+ - name: Build project
31
+ run: uv build
32
+ - name: Publish package distributions to PyPI
33
+ uses: pypa/gh-action-pypi-publish@release/v1
34
+ - name: Create release on GitHub
35
+ uses: ncipollo/release-action@v1
36
+ with:
37
+ tag: ${{ env.VERSION }}
38
+ token: ${{ secrets.GITHUB_TOKEN }}
39
+ generateReleaseNotes: true
@@ -0,0 +1,24 @@
1
+ */__pycache__
2
+ */chat/__pycache__
3
+ */video/__pycache__
4
+ */chat/sync/__pycache__
5
+ */chat/async_/__pycache__
6
+ */sync/__pycache__
7
+ */async_/__pycache__
8
+ */video/sync/__pycache__
9
+ */model/__pycache__/
10
+ */cli/__pycache__
11
+ */cli/__pycache__
12
+ .env
13
+ .vscode/settings.json
14
+ *.pyc
15
+ dist/*
16
+ dist/*
17
+ *.log
18
+ .python-version
19
+ pyvenv.cfg
20
+ .idea*
21
+ bin/*
22
+ lib/*
23
+ shell.nix
24
+ pyrightconfig.json
@@ -0,0 +1,14 @@
1
+ repos:
2
+ - repo: https://github.com/astral-sh/ruff-pre-commit
3
+ rev: v0.4.3
4
+ hooks:
5
+ - id: ruff
6
+ args: [ --fix ]
7
+ - id: ruff-format
8
+ - repo: https://github.com/pre-commit/pre-commit-hooks
9
+ rev: v3.2.0
10
+ hooks:
11
+ - id: trailing-whitespace
12
+ - id: end-of-file-fixer
13
+ - id: check-yaml
14
+ - id: check-added-large-files
@@ -0,0 +1,15 @@
1
+ # 0.4.0 (11-04-2024): Fix OwnCapability enum
2
+ - Fix/Breaking: OwnCapability as an enum was causing issues, we changed it to a class with Final attributes
3
+
4
+ # 0.3.0 (25-03-2024): External Storage and Transcriptions
5
+ - New: Support for external storage endpoints
6
+ - New: Support for transcriptions endpoints
7
+
8
+ # 0.2.0 (06-12-2023): Support User management endpoints
9
+
10
+ - New: reactivate_users and deactivate_users
11
+ - New: upsert_users and delete_users
12
+ - New: query_users
13
+ - breaking change: rename Apierror -> ApiError
14
+
15
+ # 0.1.2: Initial release of the package to PyPI (25-10-2023)
@@ -0,0 +1,219 @@
1
+ SOURCE CODE LICENSE AGREEMENT
2
+
3
+ IMPORTANT - READ THIS CAREFULLY BEFORE DOWNLOADING, INSTALLING, USING OR
4
+ ELECTRONICALLY ACCESSING THIS PROPRIETARY PRODUCT.
5
+
6
+ THIS IS A LEGAL AGREEMENT BETWEEN STREAM.IO, INC. (“STREAM.IO”) AND THE
7
+ BUSINESS ENTITY OR PERSON FOR WHOM YOU (“YOU”) ARE ACTING (“CUSTOMER”) AS THE
8
+ LICENSEE OF THE PROPRIETARY SOFTWARE INTO WHICH THIS AGREEMENT HAS BEEN
9
+ INCLUDED (THE “AGREEMENT”). YOU AGREE THAT YOU ARE THE CUSTOMER, OR YOU ARE AN
10
+ EMPLOYEE OR AGENT OF CUSTOMER AND ARE ENTERING INTO THIS AGREEMENT FOR LICENSE
11
+ OF THE SOFTWARE BY CUSTOMER FOR CUSTOMER’S BUSINESS PURPOSES AS DESCRIBED IN
12
+ AND IN ACCORDANCE WITH THIS AGREEMENT. YOU HEREBY AGREE THAT YOU ENTER INTO
13
+ THIS AGREEMENT ON BEHALF OF CUSTOMER AND THAT YOU HAVE THE AUTHORITY TO BIND
14
+ CUSTOMER TO THIS AGREEMENT.
15
+
16
+ STREAM.IO IS WILLING TO LICENSE THE SOFTWARE TO CUSTOMER ONLY ON THE FOLLOWING
17
+ CONDITIONS: (1) YOU ARE A CURRENT CUSTOMER OF STREAM.IO; (2) YOU ARE NOT A
18
+ COMPETITOR OF STREAM.IO; AND (3) THAT YOU ACCEPT ALL THE TERMS IN THIS
19
+ AGREEMENT. BY DOWNLOADING, INSTALLING, CONFIGURING, ACCESSING OR OTHERWISE
20
+ USING THE SOFTWARE, INCLUDING ANY UPDATES, UPGRADES, OR NEWER VERSIONS, YOU
21
+ REPRESENT, WARRANT AND ACKNOWLEDGE THAT (A) CUSTOMER IS A CURRENT CUSTOMER OF
22
+ STREAM.IO; (B) CUSTOMER IS NOT A COMPETITOR OF STREAM.IO; AND THAT (C) YOU HAVE
23
+ READ THIS AGREEMENT, UNDERSTAND THIS AGREEMENT, AND THAT CUSTOMER AGREES TO BE
24
+ BOUND BY ALL THE TERMS OF THIS AGREEMENT.
25
+
26
+ IF YOU DO NOT AGREE TO ALL THE TERMS AND CONDITIONS OF THIS AGREEMENT,
27
+ STREAM.IO IS UNWILLING TO LICENSE THE SOFTWARE TO CUSTOMER, AND THEREFORE, DO
28
+ NOT COMPLETE THE DOWNLOAD PROCESS, ACCESS OR OTHERWISE USE THE SOFTWARE, AND
29
+ CUSTOMER SHOULD IMMEDIATELY RETURN THE SOFTWARE AND CEASE ANY USE OF THE
30
+ SOFTWARE.
31
+
32
+ 1. SOFTWARE. The Stream.io software accompanying this Agreement, may include
33
+ Source Code, Executable Object Code, associated media, printed materials and
34
+ documentation (collectively, the “Software”). The Software also includes any
35
+ updates or upgrades to or new versions of the original Software, if and when
36
+ made available to you by Stream.io. “Source Code” means computer programming
37
+ code in human readable form that is not suitable for machine execution without
38
+ the intervening steps of interpretation or compilation. “Executable Object
39
+ Code" means the computer programming code in any other form than Source Code
40
+ that is not readily perceivable by humans and suitable for machine execution
41
+ without the intervening steps of interpretation or compilation. “Site” means a
42
+ Customer location controlled by Customer. “Authorized User” means any employee
43
+ or contractor of Customer working at the Site, who has signed a written
44
+ confidentiality agreement with Customer or is otherwise bound in writing by
45
+ confidentiality and use obligations at least as restrictive as those imposed
46
+ under this Agreement.
47
+
48
+ 2. LICENSE GRANT. Subject to the terms and conditions of this Agreement, in
49
+ consideration for the representations, warranties, and covenants made by
50
+ Customer in this Agreement, Stream.io grants to Customer, during the term of
51
+ this Agreement, a personal, non-exclusive, non-transferable, non-sublicensable
52
+ license to:
53
+
54
+ a. install and use Software Source Code on password protected computers at a Site,
55
+ restricted to Authorized Users;
56
+
57
+ b. create derivative works, improvements (whether or not patentable), extensions
58
+ and other modifications to the Software Source Code (“Modifications”) to build
59
+ unique scalable newsfeeds, activity streams, and in-app messaging via Stream’s
60
+ application program interface (“API”);
61
+
62
+ c. compile the Software Source Code to create Executable Object Code versions of
63
+ the Software Source Code and Modifications to build such newsfeeds, activity
64
+ streams, and in-app messaging via the API;
65
+
66
+ d. install, execute and use such Executable Object Code versions solely for
67
+ Customer’s internal business use (including development of websites through
68
+ which data generated by Stream services will be streamed (“Apps”));
69
+
70
+ e. use and distribute such Executable Object Code as part of Customer’s Apps; and
71
+
72
+ f. make electronic copies of the Software and Modifications as required for backup
73
+ or archival purposes.
74
+
75
+ 3. RESTRICTIONS. Customer is responsible for all activities that occur in
76
+ connection with the Software. Customer will not, and will not attempt to: (a)
77
+ sublicense or transfer the Software or any Source Code related to the Software
78
+ or any of Customer’s rights under this Agreement, except as otherwise provided
79
+ in this Agreement, (b) use the Software Source Code for the benefit of a third
80
+ party or to operate a service; (c) allow any third party to access or use the
81
+ Software Source Code; (d) sublicense or distribute the Software Source Code or
82
+ any Modifications in Source Code or other derivative works based on any part of
83
+ the Software Source Code; (e) use the Software in any manner that competes with
84
+ Stream.io or its business; or (e) otherwise use the Software in any manner that
85
+ exceeds the scope of use permitted in this Agreement. Customer shall use the
86
+ Software in compliance with any accompanying documentation any laws applicable
87
+ to Customer.
88
+
89
+ 4. OPEN SOURCE. Customer and its Authorized Users shall not use any software or
90
+ software components that are open source in conjunction with the Software
91
+ Source Code or any Modifications in Source Code or in any way that could
92
+ subject the Software to any open source licenses.
93
+
94
+ 5. CONTRACTORS. Under the rights granted to Customer under this Agreement,
95
+ Customer may permit its employees, contractors, and agencies of Customer to
96
+ become Authorized Users to exercise the rights to the Software granted to
97
+ Customer in accordance with this Agreement solely on behalf of Customer to
98
+ provide services to Customer; provided that Customer shall be liable for the
99
+ acts and omissions of all Authorized Users to the extent any of such acts or
100
+ omissions, if performed by Customer, would constitute a breach of, or otherwise
101
+ give rise to liability to Customer under, this Agreement. Customer shall not
102
+ and shall not permit any Authorized User to use the Software except as
103
+ expressly permitted in this Agreement.
104
+
105
+ 6. COMPETITIVE PRODUCT DEVELOPMENT. Customer shall not use the Software in any way
106
+ to engage in the development of products or services which could be reasonably
107
+ construed to provide a complete or partial functional or commercial alternative
108
+ to Stream.io’s products or services (a “Competitive Product”). Customer shall
109
+ ensure that there is no direct or indirect use of, or sharing of, Software
110
+ source code, or other information based upon or derived from the Software to
111
+ develop such products or services. Without derogating from the generality of
112
+ the foregoing, development of Competitive Products shall include having direct
113
+ or indirect access to, supervising, consulting or assisting in the development
114
+ of, or producing any specifications, documentation, object code or source code
115
+ for, all or part of a Competitive Product.
116
+
117
+ 7. LIMITATION ON MODIFICATIONS. Notwithstanding any provision in this Agreement,
118
+ Modifications may only be created and used by Customer as permitted by this
119
+ Agreement and Modification Source Code may not be distributed to third parties.
120
+ Customer will not assert against Stream.io, its affiliates, or their customers,
121
+ direct or indirect, agents and contractors, in any way, any patent rights that
122
+ Customer may obtain relating to any Modifications for Stream.io, its
123
+ affiliates’, or their customers’, direct or indirect, agents’ and contractors’
124
+ manufacture, use, import, offer for sale or sale of any Stream.io products or
125
+ services.
126
+
127
+ 8. DELIVERY AND ACCEPTANCE. The Software will be delivered electronically pursuant
128
+ to Stream.io standard download procedures. The Software is deemed accepted upon
129
+ delivery.
130
+
131
+ 9. IMPLEMENTATION AND SUPPORT. Stream.io has no obligation under this Agreement to
132
+ provide any support or consultation concerning the Software.
133
+
134
+ 10. TERM AND TERMINATION. The term of this Agreement begins when the Software is
135
+ downloaded or accessed and shall continue until terminated. Either party may
136
+ terminate this Agreement upon written notice. This Agreement shall
137
+ automatically terminate if Customer is or becomes a competitor of Stream.io or
138
+ makes or sells any Competitive Products. Upon termination of this Agreement for
139
+ any reason, (a) all rights granted to Customer in this Agreement immediately
140
+ cease to exist, (b) Customer must promptly discontinue all use of the Software
141
+ and return to Stream.io or destroy all copies of the Software in Customer’s
142
+ possession or control. Any continued use of the Software by Customer or attempt
143
+ by Customer to exercise any rights under this Agreement after this Agreement
144
+ has terminated shall be considered copyright infringement and subject Customer
145
+ to applicable remedies for copyright infringement. Sections 2, 5, 6, 8 and 9
146
+ shall survive expiration or termination of this Agreement for any reason.
147
+
148
+ 11. OWNERSHIP. As between the parties, the Software and all worldwide intellectual
149
+ property rights and proprietary rights relating thereto or embodied therein,
150
+ are the exclusive property of Stream.io and its suppliers. Stream.io and its
151
+ suppliers reserve all rights in and to the Software not expressly granted to
152
+ Customer in this Agreement, and no other licenses or rights are granted by
153
+ implication, estoppel or otherwise.
154
+
155
+ 12. WARRANTY DISCLAIMER. USE OF THIS SOFTWARE IS ENTIRELY AT YOURS AND CUSTOMER’S
156
+ OWN RISK. THE SOFTWARE IS PROVIDED “AS IS” WITHOUT ANY WARRANTY OF ANY KIND
157
+ WHATSOEVER. STREAM.IO DOES NOT MAKE, AND HEREBY DISCLAIMS, ANY WARRANTY OF ANY
158
+ KIND, WHETHER EXPRESS, IMPLIED, STATUTORY OR OTHERWISE, INCLUDING WITHOUT
159
+ LIMITATION, THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
160
+ PURPOSE, TITLE, NON-INFRINGEMENT OF THIRD-PARTY RIGHTS, RESULTS, EFFORTS,
161
+ QUALITY OR QUIET ENJOYMENT. STREAM.IO DOES NOT WARRANT THAT THE SOFTWARE IS
162
+ ERROR-FREE, WILL FUNCTION WITHOUT INTERRUPTION, WILL MEET ANY SPECIFIC NEED
163
+ THAT CUSTOMER HAS, THAT ALL DEFECTS WILL BE CORRECTED OR THAT IT IS
164
+ SUFFICIENTLY DOCUMENTED TO BE USABLE BY CUSTOMER. TO THE EXTENT THAT STREAM.IO
165
+ MAY NOT DISCLAIM ANY WARRANTY AS A MATTER OF APPLICABLE LAW, THE SCOPE AND
166
+ DURATION OF SUCH WARRANTY WILL BE THE MINIMUM PERMITTED UNDER SUCH LAW.
167
+ CUSTOMER ACKNOWLEDGES THAT IT HAS RELIED ON NO WARRANTIES OTHER THAN THE
168
+ EXPRESS WARRANTIES IN THIS AGREEMENT.
169
+
170
+ 13. LIMITATION OF LIABILITY. TO THE FULLEST EXTENT PERMISSIBLE BY LAW, STREAM.IO’S
171
+ TOTAL LIABILITY FOR ALL DAMAGES ARISING OUT OF OR RELATED TO THE SOFTWARE OR
172
+ THIS AGREEMENT, WHETHER IN CONTRACT, TORT (INCLUDING NEGLIGENCE) OR OTHERWISE,
173
+ SHALL NOT EXCEED $100. IN NO EVENT WILL STREAM.IO BE LIABLE FOR ANY INDIRECT,
174
+ CONSEQUENTIAL, EXEMPLARY, PUNITIVE, SPECIAL OR INCIDENTAL DAMAGES OF ANY KIND
175
+ WHATSOEVER, INCLUDING ANY LOST DATA AND LOST PROFITS, ARISING FROM OR RELATING
176
+ TO THE SOFTWARE EVEN IF STREAM.IO HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
177
+ DAMAGES. CUSTOMER ACKNOWLEDGES THAT THIS PROVISION REFLECTS THE AGREED UPON
178
+ ALLOCATION OF RISK FOR THIS AGREEMENT AND THAT STREAM.IO WOULD NOT ENTER INTO
179
+ THIS AGREEMENT WITHOUT THESE LIMITATIONS ON ITS LIABILITY.
180
+
181
+ 14. General. Customer may not assign or transfer this Agreement, by operation of
182
+ law or otherwise, or any of its rights under this Agreement (including the
183
+ license rights granted to Customer) to any third party without Stream.io’s
184
+ prior written consent, which consent will not be unreasonably withheld or
185
+ delayed. Stream.io may assign this Agreement, without consent, including, but
186
+ limited to, affiliate or any successor to all or substantially all its business
187
+ or assets to which this Agreement relates, whether by merger, sale of assets,
188
+ sale of stock, reorganization or otherwise. Any attempted assignment or
189
+ transfer in violation of the foregoing will be null and void. Stream.io shall
190
+ not be liable hereunder by reason of any failure or delay in the performance of
191
+ its obligations hereunder for any cause which is beyond the reasonable control.
192
+ All notices, consents, and approvals under this Agreement must be delivered in
193
+ writing by courier, by electronic mail, or by certified or registered mail,
194
+ (postage prepaid and return receipt requested) to the other party at the
195
+ address set forth in the customer agreement between Stream.io and Customer and
196
+ will be effective upon receipt or when delivery is refused. This Agreement will
197
+ be governed by and interpreted in accordance with the laws of the State of
198
+ Colorado, without reference to its choice of laws rules. The United Nations
199
+ Convention on Contracts for the International Sale of Goods does not apply to
200
+ this Agreement. Any action or proceeding arising from or relating to this
201
+ Agreement shall be brought in a federal or state court in Denver, Colorado, and
202
+ each party irrevocably submits to the jurisdiction and venue of any such court
203
+ in any such action or proceeding. All waivers must be in writing. Any waiver or
204
+ failure to enforce any provision of this Agreement on one occasion will not be
205
+ deemed a waiver of any other provision or of such provision on any other
206
+ occasion. If any provision of this Agreement is unenforceable, such provision
207
+ will be changed and interpreted to accomplish the objectives of such provision
208
+ to the greatest extent possible under applicable law and the remaining
209
+ provisions will continue in full force and effect. Customer shall not violate
210
+ any applicable law, rule or regulation, including those regarding the export of
211
+ technical data. The headings of Sections of this Agreement are for convenience
212
+ and are not to be used in interpreting this Agreement. As used in this
213
+ Agreement, the word “including” means “including but not limited to.” This
214
+ Agreement (including all exhibits and attachments) constitutes the entire
215
+ agreement between the parties regarding the subject hereof and supersedes all
216
+ prior or contemporaneous agreements, understandings and communication, whether
217
+ written or oral. This Agreement may be amended only by a written document
218
+ signed by both parties. The terms of any purchase order or similar document
219
+ submitted by Customer to Stream.io will have no effect.
@@ -0,0 +1,151 @@
1
+ Metadata-Version: 2.4
2
+ Name: getstream
3
+ Version: 0.0.42
4
+ Author-email: sachaarbonel <sacha.arbonel@hotmail.fr>, tbarbugli <tbarbugli@gmail.com>
5
+ License-File: LICENSE.md
6
+ Requires-Python: <4.0.0,>=3.9
7
+ Requires-Dist: dataclasses-json<0.7,>=0.6.0
8
+ Requires-Dist: httpx<0.28,>=0.27.0
9
+ Requires-Dist: marshmallow<4,>=3.21.0
10
+ Requires-Dist: pyjwt<3,>=2.8.0
11
+ Provides-Extra: openai-realtime
12
+ Requires-Dist: openai>=1.65.4; extra == 'openai-realtime'
13
+ Description-Content-Type: text/markdown
14
+
15
+ # Official Python SDK for [Stream](https://getstream.io/)
16
+
17
+ [![build](https://github.com/GetStream/stream-py/actions/workflows/ci.yml/badge.svg)](https://github.com/GetStream/stream-py/actions) [![PyPI version](https://badge.fury.io/py/getstream.svg)](http://badge.fury.io/py/getstream) ![PyPI - Python Version](https://img.shields.io/pypi/pyversions/getstream.svg)
18
+
19
+ Check out our:
20
+
21
+ - ⭐ [Chat API](https://getstream.io/chat/)
22
+ - 📱 [Video API](https://getstream.io/video/)
23
+ - 🔔 [Activity Feeds](https://getstream.io/activity-feeds/)
24
+
25
+ ## Features
26
+
27
+ - Video call creation and management
28
+ - Chat session creation and management
29
+ - Token generation for user authentication
30
+
31
+ ## Installation
32
+
33
+ To install the Stream Client Library, run the following command:
34
+
35
+ ```sh
36
+ pip install getstream
37
+ ```
38
+
39
+ ## Usage
40
+
41
+ To get started, you need to import the `Stream` class from the library and create a new instance with your API key and secret:
42
+
43
+ ```python
44
+ from getstream import Stream
45
+
46
+ client = Stream(api_key="your_api_key", api_secret="your_api_secret")
47
+ ```
48
+
49
+ ### Users and Authentication
50
+
51
+ ```python
52
+ from getstream.models import UserRequest
53
+
54
+ # sync two users using the update_users method, both users will get insert or updated
55
+ client.upsert_users(
56
+ UserRequest(
57
+ id="tommaso-id", name="tommaso", role="admin", custom={"country": "NL"}
58
+ ),
59
+ UserRequest(
60
+ id="thierry-id", name="thierry", role="admin", custom={"country": "US"}
61
+ ),
62
+ )
63
+
64
+ # Create a JWT token for the user to connect client-side (e.g. browser/mobile app)
65
+ token = client.create_token("tommaso-id")
66
+ ```
67
+
68
+ ### Video API - Calls
69
+
70
+ To create a video call, use the `client.video.call` method:
71
+
72
+ ```python
73
+ import uuid
74
+ from getstream.models import (
75
+ CallRequest,
76
+ MemberRequest,
77
+ )
78
+
79
+ call = client.video.call("default", uuid.uuid4())
80
+ call.get_or_create(
81
+ data=CallRequest(
82
+ created_by_id="tommaso-id",
83
+ members=[
84
+ MemberRequest(user_id="thierry-id"),
85
+ MemberRequest(user_id="tommaso-id"),
86
+ ],
87
+ ),
88
+ )
89
+ ```
90
+
91
+ ### App configuration
92
+
93
+ ```python
94
+ # Video: update settings for a call type
95
+
96
+ # Chat: update settings for a channel type
97
+ ```
98
+
99
+
100
+ ### Chat API - Channels
101
+
102
+ To work with chat sessions, use the `client.chat` object and implement the desired chat methods in the `Chat` class:
103
+
104
+ ```python
105
+ chat_instance = client.chat
106
+
107
+ # TODO: implement and call chat-related methods with chat_instance
108
+ ```
109
+
110
+ ## Development
111
+
112
+ We use [uv](https://github.com/astral-sh/uv) to manage dependencies and run tests. It's a package manager for Python that allows you to declare the libraries your project depends on and manage them.
113
+ To install the development dependencies, run the following command:
114
+
115
+ ```sh
116
+ uv venv --python 3.12.2
117
+ uv sync --all-extras --dev
118
+ pre-commit install
119
+ ```
120
+
121
+ To run tests, create a `.env` using the `.env.example` and adjust it to have valid API credentials
122
+ ```sh
123
+ uv run pytest tests/ getstream/
124
+ ```
125
+
126
+ Before pushing changes make sure to have git hooks installed correctly, so that you get linting done locally `pre-commit install`
127
+
128
+ You can also run the code formatting yourself if needed:
129
+
130
+ ```sh
131
+ uv run ruff format getstream/ tests/
132
+ ```
133
+
134
+ ### Writing new tests
135
+
136
+ pytest is used to run tests and to inject fixtures, simple tests can be written as simple python functions making assert calls. Make sure to have a look at the available test fixtures under `tests/fixtures.py`
137
+
138
+ ### Generate code from spec
139
+
140
+ To regenerate the Python source from OpenAPI, just run the `./generate.sh` script from this repo.
141
+
142
+ > [!NOTE]
143
+ > Code generation currently relies on tooling that is not publicly available, only Stream devs can regenerate SDK source code from the OpenAPI spec.
144
+
145
+ ## License
146
+
147
+ This project is licensed under the [MIT License](LICENSE).
148
+
149
+ ## Contributing
150
+
151
+ Contributions are welcome! Please read the [contributing guidelines](CONTRIBUTING.md) to get started.