Sinch Python SDK Code Snippets Repository
This repository contains code snippets demonstrating usage of the Sinch Python SDK.
- Python 3.9 or later
- Poetry for dependency management
- Sinch account
- Sinch package
When executing a snippet, you will need to provide some information about your Sinch account (credentials, Sinch virtual phone number, ...)
These settings can be placed directly in the snippet source code, or you can use an environment file (.env). Using an environment file allows the settings to be shared and used automatically by every snippet.
Linux / Mac:
cp .env.example .envWindows (Command Prompt):
copy .env.example .envWindows (PowerShell):
Copy-Item .env.example .envOpen the newly created .env file in your preferred text editor and fill in the required values (e.g., SINCH_PROJECT_ID=your_project_id).
Note: Do not share your .env file or credentials publicly.
poetry installAll available code snippets are located in the snippets/ directory, structured by feature and corresponding actions.
To execute a specific snippet, navigate to the appropriate subdirectory and run:
python run python snippet.py