The Sinch Python SDK was designed for developers. The SDK components are built with the specific language first and foremost in mind. After that, our focus was to keep the design simple for users that only want to leverage specific API calls they use but ensure customizability and future-proof access to other parts of our infrastructure.
The Python SDK has added common capabilities to further streamline the interaction with our platform:
Simple HTTP component but allow users to override that with their own custom version if needed.
Asynchronous support for all API calls, regardless of the original endpoint functionality.
Automated token management/refresh code, so developers can use the system without micromanaging their authorization/authentication.
With all these common items, we hope to build out consistent frameworks with functionality all users require.
Another goal of ours while designing this new Python SDK was to mimic our REST APIs as much as possible, while still providing Pythonic developer experience. We also use IDE type hints which, along with the REST API specification, allows the user to perform most API interactions without the need to use reference documentation.
Discoverability is one of the key components of great DX, hence Python SDK namespaces are small and specific yet descriptive. For example:
numbers_response = sinch_client.numbers.available.list( region_code="US", number_type="LOCAL", page_size=10 )
The main client class organizes the Sinch product portfolio (called domains within SDK) and its features into hierarchy that produces an API that is easy to read and discover:
No third-party libraries are used by the Python SDK apart from industry standard Python HTTP libraries - requests and aiohttp.
Currently, Python versions: 3.9, 3.10, 3.11, 3.12 are supported. New stable versions will be added in the future, while older/EOL versions will be deprecated.
For now, the SMS, Numbers, Conversation API and Verification APIs are supported, with other public Sinch APIs to be added soon.
More Details and Download Info
For further details and to download our SDK, please refer to:
GitHub: https://github.com/sinch/sinch-sdk-python
PyPi: https://pypi.org/project/sinch/
... View more