# telesign/python_telesign architecture

> Architecture diagram of the GitHub repository telesign/python_telesign, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-09-28). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/telesign/python_telesign
- Repository: https://github.com/telesign/python_telesign

## Overview

TeleSign Self-service Python SDK lets application developers call TeleSign messaging, voice, phone-data, and risk APIs. The main workflow is an application selecting a domain client, submitting a request, and receiving the REST response; messaging and voice also expose status lookups. Domain clients use a shared REST layer for authentication and HTTP transport. Utility functions additionally support callback-signature verification and common formatting or randomness tasks. The README confirms SDK-managed authentication; sampled source shows request signing and domain methods, but omits parts of REST execution.

Main entry points: [`telesign/rest.py`](https://github.com/telesign/python_telesign/blob/master/telesign/rest.py) (REST Client), [`telesign/messaging.py`](https://github.com/telesign/python_telesign/blob/master/telesign/messaging.py) (Messaging Client), [`telesign/voice.py`](https://github.com/telesign/python_telesign/blob/master/telesign/voice.py) (Voice Client), [`telesign/phoneid.py`](https://github.com/telesign/python_telesign/blob/master/telesign/phoneid.py) (PhoneID Client)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_communications["Communications"]
  node_messaging["Messaging Client<br/>[messaging.py]"]
  node_voice["Voice Client<br/>[voice.py]"]
end

subgraph group_intelligence["Phone And Risk"]
  node_phoneid["PhoneID Client<br/>[phoneid.py]"]
  node_score["Score Client<br/>[score.py]"]
end

subgraph group_transport["REST Transport"]
  node_rest["REST Client<br/>[rest.py]"]
end

subgraph group_utilities["Utilities"]
  node_util["Helpers<br/>[util.py]"]
end

node_developer_app(("Application"))
node_telesign_api["TeleSign API"]

node_developer_app -->|"calls"| node_messaging
node_developer_app -->|"calls"| node_voice
node_developer_app -->|"calls"| node_phoneid
node_developer_app -->|"calls"| node_score
node_messaging -->|"POST/GET"| node_rest
node_voice -->|"POST/GET"| node_rest
node_phoneid -->|"POST"| node_rest
node_score -->|"POST"| node_rest
node_rest -->|"sends requests"| node_telesign_api
node_telesign_api -->|"returns responses"| node_rest
node_developer_app -->|"uses helpers"| node_util

click node_messaging "https://github.com/telesign/python_telesign/blob/master/telesign/messaging.py"
click node_voice "https://github.com/telesign/python_telesign/blob/master/telesign/voice.py"
click node_phoneid "https://github.com/telesign/python_telesign/blob/master/telesign/phoneid.py"
click node_score "https://github.com/telesign/python_telesign/blob/master/telesign/score.py"
click node_rest "https://github.com/telesign/python_telesign/blob/master/telesign/rest.py"
click node_util "https://github.com/telesign/python_telesign/blob/master/telesign/util.py"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_messaging,node_voice toneBlue
class node_phoneid,node_score toneAmber
class node_rest,node_telesign_api toneMint
class node_util toneRose
class node_developer_app toneIndigo
```

## Components

### Communications

- [Messaging Client](https://github.com/telesign/python_telesign/blob/master/telesign/messaging.py): `telesign/messaging.py`
- [Voice Client](https://github.com/telesign/python_telesign/blob/master/telesign/voice.py): `telesign/voice.py`

### Phone And Risk

- [PhoneID Client](https://github.com/telesign/python_telesign/blob/master/telesign/phoneid.py): `telesign/phoneid.py`
- [Score Client](https://github.com/telesign/python_telesign/blob/master/telesign/score.py): `telesign/score.py`

### REST Transport

- [REST Client](https://github.com/telesign/python_telesign/blob/master/telesign/rest.py): `telesign/rest.py`

### Utilities

- [Helpers](https://github.com/telesign/python_telesign/blob/master/telesign/util.py): `telesign/util.py`

### Other components

- **Application**
- **TeleSign API**

## Connections

- Application → Messaging Client: calls
- Application → Voice Client: calls
- Application → PhoneID Client: calls
- Application → Score Client: calls
- Messaging Client → REST Client: POST/GET
- Voice Client → REST Client: POST/GET
- PhoneID Client → REST Client: POST
- Score Client → REST Client: POST
- REST Client → TeleSign API: sends requests
- TeleSign API → REST Client: returns responses
- Application → Helpers: uses helpers
