Skip to content

Commit 0184e0e

Browse files
authored
merge with main: (#9)
1 parent a026fb8 commit 0184e0e

9 files changed

Lines changed: 284 additions & 39 deletions

File tree

.github/workflows/ci.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,16 @@ jobs:
2121
pip install -e .
2222
pip install -r requirements-dev.txt
2323
24+
- name: Check requirements-dev.txt is up to date
25+
if: matrix.python-version == '3.14'
26+
run: |
27+
./scripts/compile_requirements.sh
28+
git diff --exit-code requirements-dev.txt || {
29+
echo "requirements-dev.txt is out of date. Regenerate it with:"
30+
echo " ./scripts/compile_requirements.sh"
31+
exit 1
32+
}
33+
2434
- name: Compile all examples
2535
run: |
2636
for file in $(find examples -name "*.py"); do

README.md

Lines changed: 19 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,11 @@ Here you'll find documentation related to the Sinch Python SDK, including how to
77

88
To use Sinch services, you'll need a Sinch account and access keys. You can sign up for an account and create access keys at [dashboard.sinch.com](https://dashboard.sinch.com).
99

10-
For more information on the SDK, refer to the dedicated [Python SDK documentation](https://developers.sinch.com/docs/sdks/python) section, and for the Sinch APIs on which this SDK is based, refer to the official [developer documentation portal](https://developers.sinch.com).
11-
1210

1311
## Table of contents:
1412

1513
- [Prerequisites](#prerequisites)
14+
- [Documentation](#documentation)
1615
- [Installation](#installation)
1716
- [Supported APIs](#supported-apis)
1817
- [Getting started](#getting-started)
@@ -35,6 +34,15 @@ For more information on the SDK, refer to the dedicated [Python SDK documentatio
3534
> **Warning**:
3635
> This SDK is intended for server-side (backend) use only. Do not use it in front-end or client-side applications (web, mobile, or desktop), regardless of language or framework. Doing so can expose your Sinch credentials to end-users.
3736
37+
38+
## Documentation
39+
40+
For more information on the SDK, refer to the dedicated [Python SDK documentation](https://developers.sinch.com/docs/sdks/python).
41+
42+
For the SDK's programmatic API surface, see the online [SDK reference](https://developers.sinch.com/sdk/sinch-sdk-python/latest).
43+
44+
For broader Sinch product documentation, including the underlying REST APIs, visit the official [Sinch developer portal](https://developers.sinch.com/).
45+
3846
## Installation
3947

4048
Run the following command to install the SDK:
@@ -106,7 +114,7 @@ event = sinch_events.parse_event(raw_body, headers)
106114

107115
`SINCH_EVENT_SECRET` is optional and set per app in the [Conversation dashboard](https://dashboard.sinch.com/convapi/apps). `parse_event` works without validating the request, but then its origin can't be verified, so calling `validate_authentication_header` (which returns `True`/`False`) is recommended in production.
108116

109-
You can find a complete example in [examples/sinch_events/conversation_api](./examples/sinch_events/conversation_api).
117+
You can find a complete example in [examples/sinch_events/conversation_api](https://github.com/sinch/sinch-sdk-python/blob/main/examples/sinch_events/conversation_api).
110118

111119
### SMS API
112120

@@ -163,7 +171,7 @@ event = sinch_events.parse_event(raw_body, headers)
163171

164172
Signature authentication for SMS events must be enabled for your account by your account manager; until then the signature headers are absent and `parse_event` can be used on its own. See the [SMS events documentation](https://developers.sinch.com/docs/sms/api-reference/sms/tag/Webhooks/#tag/Webhooks/section/Callbacks).
165173

166-
You can find a complete example in [examples/sinch_events/sms_api](./examples/sinch_events/sms_api).
174+
You can find a complete example in [examples/sinch_events/sms_api](https://github.com/sinch/sinch-sdk-python/blob/main/examples/sinch_events/sms_api).
167175

168176
### Numbers API
169177

@@ -181,7 +189,7 @@ event = sinch_events.parse_event(raw_body, headers)
181189

182190
`SINCH_EVENT_SECRET` is the value configured on the Event Destination. `parse_event` works without validating the request, but then its origin can't be verified, so calling `validate_authentication_header` is recommended in production.
183191

184-
You can find a complete example in [examples/sinch_events/numbers_api](./examples/sinch_events/numbers_api).
192+
You can find a complete example in [examples/sinch_events/numbers_api](https://github.com/sinch/sinch-sdk-python/blob/main/examples/sinch_events/numbers_api).
185193

186194
### Number Lookup API
187195

@@ -313,20 +321,20 @@ The SDK relies on the following third-party dependencies:
313321
## Examples
314322

315323
You can find:
316-
- a Python example of each request in the [examples/snippets](./examples/snippets) folder.
317-
- getting started guides for specific use cases in the [examples/getting-started](./examples/getting-started) folder.
318-
- server-side event handling examples in the [examples/sinch_events](./examples/sinch_events) folder.
324+
- a Python example of each request in the [examples/snippets](https://github.com/sinch/sinch-sdk-python/blob/main/examples/snippets) folder.
325+
- getting started guides for specific use cases in the [examples/getting-started](https://github.com/sinch/sinch-sdk-python/blob/main/examples/getting-started) folder.
326+
- server-side event handling examples in the [examples/sinch_events](https://github.com/sinch/sinch-sdk-python/blob/main/examples/sinch_events) folder.
319327

320328
## Changelog & Migration
321329

322-
For information about the latest changes in the SDK, please refer to the [CHANGELOG](CHANGELOG.md) file
323-
and the [MIGRATION_GUIDE](MIGRATION_GUIDE.md) for instructions on how to update your code when upgrading to a new major version of the SDK.
330+
For information about the latest changes in the SDK, please refer to the [CHANGELOG](https://github.com/sinch/sinch-sdk-python/blob/main/CHANGELOG.md) file
331+
and the [MIGRATION_GUIDE](https://github.com/sinch/sinch-sdk-python/blob/main/MIGRATION_GUIDE.md) for instructions on how to update your code when upgrading to a new major version of the SDK.
324332

325333
## License
326334

327335
This project is licensed under the Apache License.
328336

329-
See the [LICENSE](LICENSE) file for the license text.
337+
See the [LICENSE](https://github.com/sinch/sinch-sdk-python/blob/main/LICENSE) file for the license text.
330338

331339

332340
## Contact

examples/getting-started/conversation/send_handle_incoming_sms/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ see that the MO was received and processed.
1010

1111
## Requirements
1212

13-
- [Python 3.9+](https://www.python.org/)
13+
- [Python 3.10+](https://www.python.org/)
1414
- [Flask](https://flask.palletsprojects.com/en/stable/)
1515
- [Sinch account](https://dashboard.sinch.com/)
1616
- An existing Conversation API app configured for SMS (with a Sinch number)

examples/getting-started/conversation/send_handle_incoming_sms/pyproject.toml

Lines changed: 23 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,30 @@ description = "Getting Started: send and handle incoming SMS with Conversation A
55
readme = "README.md"
66
package-mode = false
77

8+
# Dependency versions below were generated/resolved using Python 3.14.5
89
[tool.poetry.dependencies]
9-
python = "^3.9"
10-
python-dotenv = "^1.0.0"
11-
flask = "^3.0.0"
10+
python = "^3.10"
11+
python-dotenv = "1.2.2"
12+
flask = "3.1.3"
13+
sinch = "^2.0.0"
14+
15+
# Transitive dependencies (pulled in by flask and sinch above)
16+
annotated-types = "0.7.0"
17+
blinker = "1.9.0"
18+
certifi = "2026.7.22"
19+
charset-normalizer = "3.4.9"
20+
click = "8.4.2"
21+
idna = "3.18"
22+
itsdangerous = "2.2.0"
23+
jinja2 = "3.1.6"
24+
markupsafe = "3.0.3"
25+
pydantic = "2.13.4"
26+
pydantic-core = "2.46.4"
27+
requests = "2.34.2"
28+
typing-inspection = "0.4.2"
29+
typing-extensions = "4.16.0"
30+
urllib3 = "2.7.0"
31+
werkzeug = "3.1.8"
1232

1333
[build-system]
1434
requires = ["poetry-core"]

examples/sinch_events/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ This directory contains both the Event handlers and the server application (`ser
1212

1313
## Requirements
1414

15-
- [Python 3.9+](https://www.python.org/)
15+
- [Python 3.10+](https://www.python.org/)
1616
- [Flask](https://flask.palletsprojects.com/en/stable/)
1717
- [Sinch account](https://dashboard.sinch.com/)
1818
- [ngrok](https://ngrok.com/docs)

examples/sinch_events/pyproject.toml

Lines changed: 23 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,31 @@ description = "Sinch SDK Python Quickstart Sinch Events Server"
55
readme = "README.md"
66
package-mode = false
77

8+
# Dependency versions below were generated/resolved using Python 3.14.5
89
[tool.poetry.dependencies]
9-
python = "^3.9"
10-
python-dotenv = "^1.0.0"
11-
flask = "^3.0.0"
10+
python = "^3.10"
11+
python-dotenv = "1.2.2"
12+
flask = "3.1.3"
1213
sinch = "^2.0.0"
1314

15+
# Transitive dependencies (pulled in by flask and sinch above)
16+
annotated-types = "0.7.0"
17+
blinker = "1.9.0"
18+
certifi = "2026.7.22"
19+
charset-normalizer = "3.4.9"
20+
click = "8.4.2"
21+
idna = "3.18"
22+
itsdangerous = "2.2.0"
23+
jinja2 = "3.1.6"
24+
markupsafe = "3.0.3"
25+
pydantic = "2.13.4"
26+
pydantic-core = "2.46.4"
27+
requests = "2.34.2"
28+
typing-inspection = "0.4.2"
29+
typing-extensions = "4.16.0"
30+
urllib3 = "2.7.0"
31+
werkzeug = "3.1.8"
32+
1433
[build-system]
1534
requires = ["poetry-core"]
16-
build-backend = "poetry.core.masonry.api"
35+
build-backend = "poetry.core.masonry.api"

requirements-dev.txt

Lines changed: 172 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,172 @@
1-
# Testing
2-
pytest
3-
pytest-mock
4-
coverage
5-
behave
6-
7-
# Code Quality
8-
ruff
9-
10-
# HTTP Libraries
11-
requests>=2.0.0
12-
13-
# Data Validation
14-
pydantic >= 2.0.0
15-
16-
# Documentation
17-
# Sphinx 7.1 introduced python_maximum_signature_line_length and 7.x is also the last series supporting Python 3.9.
18-
sphinx >= 7.1
19-
sphinx-rtd-theme >= 2.0
1+
# This file was autogenerated by uv via the following command:
2+
# ./scripts/compile_requirements.sh
3+
alabaster==0.7.16 ; python_full_version < '3.10'
4+
# via sphinx
5+
alabaster==1.0.0 ; python_full_version >= '3.10'
6+
# via sphinx
7+
annotated-types==0.7.0 ; python_full_version < '3.10'
8+
# via pydantic
9+
annotated-types==0.8.0 ; python_full_version >= '3.10'
10+
# via pydantic
11+
babel==2.18.0
12+
# via sphinx
13+
behave==1.3.3
14+
# via -r requirements.in
15+
certifi==2026.7.22
16+
# via requests
17+
charset-normalizer==3.4.9
18+
# via requests
19+
colorama==0.4.6
20+
# via
21+
# behave
22+
# pytest
23+
# sphinx
24+
coverage==7.10.7 ; python_full_version < '3.10'
25+
# via -r requirements.in
26+
coverage==7.15.2 ; python_full_version >= '3.10'
27+
# via -r requirements.in
28+
cucumber-expressions==18.0.1 ; python_full_version < '3.10'
29+
# via behave
30+
cucumber-expressions==20.0.0 ; python_full_version >= '3.10'
31+
# via behave
32+
cucumber-tag-expressions==7.0.0 ; python_full_version < '3.10'
33+
# via behave
34+
cucumber-tag-expressions==11.0.0 ; python_full_version >= '3.10'
35+
# via behave
36+
docutils==0.21.2 ; python_full_version < '3.11'
37+
# via
38+
# sphinx
39+
# sphinx-rtd-theme
40+
docutils==0.22.4 ; python_full_version >= '3.11'
41+
# via
42+
# sphinx
43+
# sphinx-rtd-theme
44+
exceptiongroup==1.3.1 ; python_full_version < '3.11'
45+
# via pytest
46+
idna==3.18
47+
# via requests
48+
imagesize==1.5.0 ; python_full_version < '3.10'
49+
# via sphinx
50+
imagesize==2.0.0 ; python_full_version >= '3.10'
51+
# via sphinx
52+
importlib-metadata==8.7.1 ; python_full_version < '3.10'
53+
# via sphinx
54+
iniconfig==2.1.0 ; python_full_version < '3.10'
55+
# via pytest
56+
iniconfig==2.3.0 ; python_full_version >= '3.10'
57+
# via pytest
58+
jinja2==3.1.6
59+
# via sphinx
60+
markupsafe==3.0.3
61+
# via jinja2
62+
packaging==26.2
63+
# via
64+
# pytest
65+
# sphinx
66+
parse==1.22.1
67+
# via
68+
# behave
69+
# parse-type
70+
parse-type==0.6.6
71+
# via behave
72+
pluggy==1.6.0
73+
# via pytest
74+
pydantic==2.13.4
75+
# via -r requirements.in
76+
pydantic-core==2.46.4
77+
# via pydantic
78+
pygments==2.20.0
79+
# via
80+
# pytest
81+
# sphinx
82+
pytest==8.4.2 ; python_full_version < '3.10'
83+
# via
84+
# -r requirements.in
85+
# pytest-mock
86+
pytest==9.1.1 ; python_full_version >= '3.10'
87+
# via
88+
# -r requirements.in
89+
# pytest-mock
90+
pytest-mock==3.15.1
91+
# via -r requirements.in
92+
requests==2.32.5 ; python_full_version < '3.10'
93+
# via
94+
# -r requirements.in
95+
# sphinx
96+
requests==2.34.2 ; python_full_version >= '3.10'
97+
# via
98+
# -r requirements.in
99+
# sphinx
100+
roman-numerals==4.1.0 ; python_full_version >= '3.11'
101+
# via sphinx
102+
ruff==0.15.22
103+
# via -r requirements.in
104+
six==1.17.0
105+
# via
106+
# behave
107+
# parse-type
108+
snowballstemmer==3.1.1
109+
# via sphinx
110+
sphinx==7.4.7 ; python_full_version < '3.10'
111+
# via
112+
# -r requirements.in
113+
# sphinx-rtd-theme
114+
# sphinxcontrib-jquery
115+
sphinx==8.1.3 ; python_full_version == '3.10.*'
116+
# via
117+
# -r requirements.in
118+
# sphinx-rtd-theme
119+
# sphinxcontrib-jquery
120+
sphinx==9.0.4 ; python_full_version == '3.11.*'
121+
# via
122+
# -r requirements.in
123+
# sphinx-rtd-theme
124+
# sphinxcontrib-jquery
125+
sphinx==9.1.0 ; python_full_version >= '3.12'
126+
# via
127+
# -r requirements.in
128+
# sphinx-rtd-theme
129+
# sphinxcontrib-jquery
130+
sphinx-rtd-theme==3.1.0
131+
# via -r requirements.in
132+
sphinxcontrib-applehelp==2.0.0
133+
# via sphinx
134+
sphinxcontrib-devhelp==2.0.0
135+
# via sphinx
136+
sphinxcontrib-htmlhelp==2.1.0
137+
# via sphinx
138+
sphinxcontrib-jquery==4.1
139+
# via sphinx-rtd-theme
140+
sphinxcontrib-jsmath==1.0.1
141+
# via sphinx
142+
sphinxcontrib-qthelp==2.0.0
143+
# via sphinx
144+
sphinxcontrib-serializinghtml==2.0.0
145+
# via sphinx
146+
tomli==2.4.1 ; python_full_version < '3.11'
147+
# via
148+
# behave
149+
# pytest
150+
# sphinx
151+
typing-extensions==4.16.0
152+
# via
153+
# exceptiongroup
154+
# pydantic
155+
# pydantic-core
156+
# typing-inspection
157+
typing-inspection==0.4.2
158+
# via pydantic
159+
urllib3==2.6.3 ; python_full_version < '3.10'
160+
# via
161+
# -r requirements.in
162+
# requests
163+
urllib3==2.7.0 ; python_full_version >= '3.10'
164+
# via
165+
# -r requirements.in
166+
# requests
167+
uv==0.11.32
168+
# via -r requirements.in
169+
win-unicode-console==0.5 ; python_full_version < '3.10'
170+
# via behave
171+
zipp==3.23.1 ; python_full_version < '3.10'
172+
# via importlib-metadata

0 commit comments

Comments
 (0)