Skip to content

Latest commit

 

History

History

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 

README.md

Inworld Realtime API — Python Quick-Start Examples

Minimal Python examples for the Inworld Realtime API using WebSockets and WebRTC.

Setup

pip install -r requirements.txt
cp .env.example .env

Edit .env with your credentials from the Inworld Portal > API Keys:

Variable Description
INWORLD_API_KEY Base64-encoded API key (used by basic examples)
INWORLD_KEY API key ID (used by jwt examples to mint tokens)
INWORLD_SECRET API key secret (used by jwt examples to mint tokens)
INWORLD_WORKSPACE Workspace ID prefixed with workspaces/, e.g. workspaces/your_workspace_id

Examples

Each example starts a local server at http://localhost:3000.

Realtime Voice — WebSockets

python websockets/basic/server.py          # Basic auth
python websockets/jwt/server.py            # JWT auth

Realtime Voice — WebRTC

python webrtc/basic/server.py              # Basic auth
python webrtc/jwt/server.py                # JWT auth

Project Structure

├── auth/mint_jwt.py         # JWT minting helper
├── websockets/
│   ├── basic/               # WS + Basic auth
│   └── jwt/                 # WS + JWT auth
├── webrtc/
│   ├── basic/               # WebRTC + Basic auth
│   └── jwt/                 # WebRTC + JWT auth
├── requirements.txt
└── .env.example