# accelbyte/accelbyte-python-sdk architecture

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

- Interactive diagram: https://gitdiagram.com/accelbyte/accelbyte-python-sdk
- Repository: https://github.com/accelbyte/accelbyte-python-sdk

## Overview

AccelByte Python SDK is a client library for configuring access to AccelByte services, authenticating, and issuing service API requests. The documented user workflow initializes an SDK, logs in to obtain a token, then uses SDK capabilities to interact with services; refresh can be manual, on-demand, or background. The repository also includes WebSocket support and token validation. Generated API areas cover identity, sessions, achievements, game-server management, platform commerce, and other services. Some API and internal connections are not shown in the sampled excerpts, so those links are omitted or marked unverified.

Main entry points: [`accelbyte_py_sdk/services/auth/_login.py`](https://github.com/accelbyte/accelbyte-python-sdk/blob/main/accelbyte_py_sdk/services/auth/_login.py) (Login Flows), [`accelbyte_py_sdk/__init__.py`](https://github.com/accelbyte/accelbyte-python-sdk/blob/main/accelbyte_py_sdk/__init__.py) (Initialize SDK), [`accelbyte_py_sdk/core/_sdk.py`](https://github.com/accelbyte/accelbyte-python-sdk/blob/main/accelbyte_py_sdk/core/_sdk.py) (SDK Configuration), [`accelbyte_py_sdk/services/auth/_login_client.py`](https://github.com/accelbyte/accelbyte-python-sdk/blob/main/accelbyte_py_sdk/services/auth/_login_client.py) (Client Credentials)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_setup["SDK Setup"]
  node_initialize["Initialize SDK<br/>[__init__.py]"]
  node_sdk["SDK Configuration<br/>[_sdk.py]"]
  node_config["Config Repositories"]
end

subgraph group_auth["Authentication"]
  node_login["Login Flows<br/>[_login.py]"]
  node_client_login["Client Credentials<br/>[_login_client.py]"]
  node_refresh["Token Refresh<br/>[_login_refresh.py]"]
  node_token_store[("Token Repository")]
end

subgraph group_runtime["Request Runtime"]
  node_http["HTTP Transport<br/>[_http_client.py]"]
  node_http_utils["HTTP Utilities<br/>[_http_utils.py]"]
  node_websocket["WebSocket Client"]
end

subgraph group_services["Service APIs"]
  node_iam_api["IAM Operations"]
  node_achievement["Achievements"]
  node_ams["Server Management"]
  node_basic["Namespace &amp; Profiles"]
  node_session["Sessions &amp; Parties"]
  node_commerce["Commerce APIs"]
  node_other_apis["Other Service APIs"]
end

subgraph group_security["Token Validation"]
  node_validation["Token Validation<br/>[_validation.py]"]
  node_validation_cache["Validation Cache<br/>[caching.py]"]
end

node_developer(("SDK Consumer"))

node_developer -->|"initializes"| node_initialize
node_initialize -->|"configures"| node_sdk
node_developer -->|"logs in"| node_login
node_login -->|"dispatches"| node_client_login
node_client_login -->|"requests token"| node_iam_api
node_login -.->|"stores token"| node_token_store
node_developer -->|"refreshes token"| node_refresh
node_sdk -->|"uses configuration"| node_config
node_http -->|"uses utilities"| node_http_utils
node_developer -.->|"uses API"| node_achievement
node_developer -.->|"uses API"| node_ams
node_developer -.->|"uses API"| node_basic
node_developer -.->|"uses API"| node_session
node_developer -.->|"uses API"| node_commerce
node_developer -.->|"uses API"| node_other_apis
node_developer -.->|"uses WebSockets"| node_websocket
node_developer -.->|"validates tokens"| node_validation
node_validation -->|"uses cache"| node_validation_cache
node_developer -->|"reads refresh token"| node_token_store

click node_initialize "https://github.com/accelbyte/accelbyte-python-sdk/blob/main/accelbyte_py_sdk/__init__.py"
click node_sdk "https://github.com/accelbyte/accelbyte-python-sdk/blob/main/accelbyte_py_sdk/core/_sdk.py"
click node_config "https://github.com/accelbyte/accelbyte-python-sdk/blob/main/accelbyte_py_sdk/core/_config_repository.py"
click node_login "https://github.com/accelbyte/accelbyte-python-sdk/blob/main/accelbyte_py_sdk/services/auth/_login.py"
click node_client_login "https://github.com/accelbyte/accelbyte-python-sdk/blob/main/accelbyte_py_sdk/services/auth/_login_client.py"
click node_refresh "https://github.com/accelbyte/accelbyte-python-sdk/blob/main/accelbyte_py_sdk/services/auth/_login_refresh.py"
click node_token_store "https://github.com/accelbyte/accelbyte-python-sdk/blob/main/accelbyte_py_sdk/core/_token_repository.py"
click node_iam_api "https://github.com/accelbyte/accelbyte-python-sdk/tree/main/accelbyte_py_sdk/api/iam/operations"
click node_http "https://github.com/accelbyte/accelbyte-python-sdk/blob/main/accelbyte_py_sdk/core/_http_client.py"
click node_http_utils "https://github.com/accelbyte/accelbyte-python-sdk/blob/main/accelbyte_py_sdk/core/_http_utils.py"
click node_websocket "https://github.com/accelbyte/accelbyte-python-sdk/blob/main/accelbyte_py_sdk/core/_websocket_client.py"
click node_achievement "https://github.com/accelbyte/accelbyte-python-sdk/tree/main/accelbyte_py_sdk/api/achievement/operations"
click node_ams "https://github.com/accelbyte/accelbyte-python-sdk/tree/main/accelbyte_py_sdk/api/ams/operations"
click node_basic "https://github.com/accelbyte/accelbyte-python-sdk/tree/main/accelbyte_py_sdk/api/basic/operations"
click node_session "https://github.com/accelbyte/accelbyte-python-sdk/tree/main/accelbyte_py_sdk/api/session/operations"
click node_commerce "https://github.com/accelbyte/accelbyte-python-sdk/tree/main/accelbyte_py_sdk/api/platform/operations"
click node_other_apis "https://github.com/accelbyte/accelbyte-python-sdk/tree/main/accelbyte_py_sdk/api"
click node_validation "https://github.com/accelbyte/accelbyte-python-sdk/blob/main/accelbyte_py_sdk/token_validation/_validation.py"
click node_validation_cache "https://github.com/accelbyte/accelbyte-python-sdk/blob/main/accelbyte_py_sdk/token_validation/caching.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_initialize,node_sdk,node_config toneBlue
class node_login,node_client_login,node_refresh,node_token_store toneAmber
class node_http,node_http_utils,node_websocket toneMint
class node_iam_api,node_achievement,node_ams,node_basic,node_session,node_commerce,node_other_apis toneRose
class node_validation,node_validation_cache,node_developer toneIndigo
```

## Components

### SDK Setup

- [Initialize SDK](https://github.com/accelbyte/accelbyte-python-sdk/blob/main/accelbyte_py_sdk/__init__.py): `accelbyte_py_sdk/__init__.py`
- [SDK Configuration](https://github.com/accelbyte/accelbyte-python-sdk/blob/main/accelbyte_py_sdk/core/_sdk.py): `accelbyte_py_sdk/core/_sdk.py`
- [Config Repositories](https://github.com/accelbyte/accelbyte-python-sdk/blob/main/accelbyte_py_sdk/core/_config_repository.py): `accelbyte_py_sdk/core/_config_repository.py`

### Authentication

- [Login Flows](https://github.com/accelbyte/accelbyte-python-sdk/blob/main/accelbyte_py_sdk/services/auth/_login.py): `accelbyte_py_sdk/services/auth/_login.py`
- [Client Credentials](https://github.com/accelbyte/accelbyte-python-sdk/blob/main/accelbyte_py_sdk/services/auth/_login_client.py): `accelbyte_py_sdk/services/auth/_login_client.py`
- [Token Refresh](https://github.com/accelbyte/accelbyte-python-sdk/blob/main/accelbyte_py_sdk/services/auth/_login_refresh.py): `accelbyte_py_sdk/services/auth/_login_refresh.py`
- [Token Repository](https://github.com/accelbyte/accelbyte-python-sdk/blob/main/accelbyte_py_sdk/core/_token_repository.py): `accelbyte_py_sdk/core/_token_repository.py`

### Request Runtime

- [HTTP Transport](https://github.com/accelbyte/accelbyte-python-sdk/blob/main/accelbyte_py_sdk/core/_http_client.py): `accelbyte_py_sdk/core/_http_client.py`
- [HTTP Utilities](https://github.com/accelbyte/accelbyte-python-sdk/blob/main/accelbyte_py_sdk/core/_http_utils.py): `accelbyte_py_sdk/core/_http_utils.py`
- [WebSocket Client](https://github.com/accelbyte/accelbyte-python-sdk/blob/main/accelbyte_py_sdk/core/_websocket_client.py): `accelbyte_py_sdk/core/_websocket_client.py`

### Service APIs

- [IAM Operations](https://github.com/accelbyte/accelbyte-python-sdk/tree/main/accelbyte_py_sdk/api/iam/operations): `accelbyte_py_sdk/api/iam/operations`
- [Achievements](https://github.com/accelbyte/accelbyte-python-sdk/tree/main/accelbyte_py_sdk/api/achievement/operations): `accelbyte_py_sdk/api/achievement/operations`
- [Server Management](https://github.com/accelbyte/accelbyte-python-sdk/tree/main/accelbyte_py_sdk/api/ams/operations): `accelbyte_py_sdk/api/ams/operations`
- [Namespace & Profiles](https://github.com/accelbyte/accelbyte-python-sdk/tree/main/accelbyte_py_sdk/api/basic/operations): `accelbyte_py_sdk/api/basic/operations`
- [Sessions & Parties](https://github.com/accelbyte/accelbyte-python-sdk/tree/main/accelbyte_py_sdk/api/session/operations): `accelbyte_py_sdk/api/session/operations`
- [Commerce APIs](https://github.com/accelbyte/accelbyte-python-sdk/tree/main/accelbyte_py_sdk/api/platform/operations): `accelbyte_py_sdk/api/platform/operations`
- [Other Service APIs](https://github.com/accelbyte/accelbyte-python-sdk/tree/main/accelbyte_py_sdk/api): `accelbyte_py_sdk/api`

### Token Validation

- [Token Validation](https://github.com/accelbyte/accelbyte-python-sdk/blob/main/accelbyte_py_sdk/token_validation/_validation.py): `accelbyte_py_sdk/token_validation/_validation.py`
- [Validation Cache](https://github.com/accelbyte/accelbyte-python-sdk/blob/main/accelbyte_py_sdk/token_validation/caching.py): `accelbyte_py_sdk/token_validation/caching.py`

### Other components

- **SDK Consumer**

## Connections

- SDK Consumer → Initialize SDK: initializes
- Initialize SDK → SDK Configuration: configures (evidence: `accelbyte_py_sdk/__init__.py`)
- SDK Consumer → Login Flows: logs in
- Login Flows → Client Credentials: dispatches (evidence: `accelbyte_py_sdk/services/auth/_login.py`)
- Client Credentials → IAM Operations: requests token (evidence: `accelbyte_py_sdk/services/auth/_login_client.py`)
- Login Flows → Token Repository: stores token
- SDK Consumer → Token Refresh: refreshes token
- SDK Configuration → Config Repositories: uses configuration (evidence: `accelbyte_py_sdk/core/__init__.py`)
- HTTP Transport → HTTP Utilities: uses utilities (evidence: `accelbyte_py_sdk/core/_http_client.py`)
- SDK Consumer → Achievements: uses API
- SDK Consumer → Server Management: uses API
- SDK Consumer → Namespace & Profiles: uses API
- SDK Consumer → Sessions & Parties: uses API
- SDK Consumer → Commerce APIs: uses API
- SDK Consumer → Other Service APIs: uses API
- SDK Consumer → WebSocket Client: uses WebSockets
- SDK Consumer → Token Validation: validates tokens
- Token Validation → Validation Cache: uses cache (evidence: `accelbyte_py_sdk/token_validation/caching.py`)
- SDK Consumer → Token Repository: reads refresh token
