# tenable/pytenable architecture

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

- Interactive diagram: https://gitdiagram.com/tenable/pytenable
- Repository: https://github.com/tenable/pytenable

## Overview

pyTenable is a Python SDK over Tenable’s cloud and on-premise security products. The principal workflow is: an engineer creates a product client, selects a domain API, invokes a resource operation, and receives parsed API data or submits a synchronization job. Product clients expose distinct asset, vulnerability, event, scan, identity, and export stages. Sampled code confirms shared HTTP/GraphQL transport, endpoint delegation, OT queries, and sync retries; several product branches are retained from the tree and README without asserting unsampled internal calls.

Main entry points: [`tenable/base/_restfly_v1.py`](https://github.com/tenable/pytenable/blob/main/tenable/base/_restfly_v1.py) (HTTP GraphQL Transport), [`tenable/ot/session.py`](https://github.com/tenable/pytenable/blob/main/tenable/ot/session.py) (Tenable OT Client), [`tenable/base/platform.py`](https://github.com/tenable/pytenable/blob/main/tenable/base/platform.py) (API Platform), [`tenable/base/endpoint.py`](https://github.com/tenable/pytenable/blob/main/tenable/base/endpoint.py) (Endpoint Abstraction)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_shared["Shared Runtime"]
  node_platform["API Platform<br/>[platform.py]"]
  node_transport["HTTP GraphQL Transport<br/>[_restfly_v1.py]"]
  node_endpoint["Endpoint Abstraction<br/>[endpoint.py]"]
end

subgraph group_clients["Product Clients"]
  node_tio["Tenable IO Client<br/>[__init__.py]"]
  node_tsc["Tenable SC Client<br/>[__init__.py]"]
  node_tot["Tenable OT Client<br/>[session.py]"]
  node_tcs["Cloud Security Client<br/>[session.py]"]
  node_tasm["ASM Client<br/>[session.py]"]
  node_tie["Identity Exposure Client<br/>[session.py]"]
end

subgraph group_domains["Domain APIs"]
  node_io_scans["Cloud Scans<br/>[scans.py]"]
  node_sc_analysis["SC Analysis<br/>[analysis.py]"]
  node_ot_assets["OT Assets<br/>[assets.py]"]
  node_ot_events["OT Events<br/>[events.py]"]
  node_ot_plugins["OT Plugins<br/>[plugins.py]"]
  node_ot_exports["OT Exports<br/>[api.py]"]
  node_cs_assets["Cloud Assets<br/>[assets.py]"]
  node_cs_vulns["Cloud Vulnerabilities<br/>[vulns.py]"]
  node_asm_inventory["ASM Inventory<br/>[inventory.py]"]
  node_ie_exposure["Identity Exposure APIs<br/>[session.py]"]
end

subgraph group_sync["Synchronization"]
  node_sync_api["Sync Jobs API<br/>[api.py]"]
  node_sync_manager["Sync Job Manager<br/>[job_manager.py]"]
end

node_engineer(("Engineer"))
node_cloud_service["Tenable Cloud Service"]
node_sc_service["Tenable SC Service"]
node_ot_service["Tenable OT Service"]
node_identity_service["Identity Service"]

node_engineer -->|"creates"| node_tio
node_engineer -->|"creates"| node_tsc
node_engineer -->|"creates"| node_tot
node_engineer -->|"creates"| node_tcs
node_engineer -->|"creates"| node_tasm
node_engineer -->|"creates"| node_tie
node_tio -->|"exposes"| node_io_scans
node_tsc -->|"exposes"| node_sc_analysis
node_tot -->|"exposes"| node_ot_assets
node_tot -->|"exposes"| node_ot_events
node_tot -->|"exposes"| node_ot_plugins
node_tot -->|"exposes"| node_ot_exports
node_tcs -->|"exposes"| node_cs_assets
node_tcs -->|"exposes"| node_cs_vulns
node_tasm -->|"exposes"| node_asm_inventory
node_tie -->|"exposes"| node_ie_exposure
node_tio -->|"exposes"| node_sync_api
node_sync_manager -->|"uploads chunks"| node_sync_api
node_sync_manager -->|"submits jobs"| node_sync_api
node_io_scans -->|"uses"| node_endpoint
node_sc_analysis -->|"uses"| node_endpoint
node_ot_assets -->|"queries"| node_transport
node_ot_events -->|"queries"| node_transport
node_ot_plugins -->|"queries"| node_transport
node_ot_exports -->|"requests"| node_transport
node_cs_assets -->|"queries"| node_transport
node_cs_vulns -->|"queries"| node_transport
node_asm_inventory -->|"uses"| node_endpoint
node_ie_exposure -->|"uses"| node_endpoint
node_endpoint -->|"sends requests"| node_transport
node_transport -->|"calls"| node_cloud_service
node_transport -->|"calls"| node_sc_service
node_transport -->|"calls"| node_ot_service
node_transport -->|"calls"| node_identity_service
node_platform -->|"configures"| node_transport
node_tio -->|"inherits"| node_platform
node_tsc -->|"inherits"| node_platform
node_tot -->|"inherits"| node_platform
node_tasm -->|"inherits"| node_platform
node_tie -->|"inherits"| node_platform

click node_platform "https://github.com/tenable/pytenable/blob/main/tenable/base/platform.py"
click node_transport "https://github.com/tenable/pytenable/blob/main/tenable/base/_restfly_v1.py"
click node_endpoint "https://github.com/tenable/pytenable/blob/main/tenable/base/endpoint.py"
click node_tio "https://github.com/tenable/pytenable/blob/main/tenable/io/__init__.py"
click node_tsc "https://github.com/tenable/pytenable/blob/main/tenable/sc/__init__.py"
click node_tot "https://github.com/tenable/pytenable/blob/main/tenable/ot/session.py"
click node_tcs "https://github.com/tenable/pytenable/blob/main/tenable/cloudsecurity/session.py"
click node_tasm "https://github.com/tenable/pytenable/blob/main/tenable/asm/session.py"
click node_tie "https://github.com/tenable/pytenable/blob/main/tenable/ie/session.py"
click node_io_scans "https://github.com/tenable/pytenable/blob/main/tenable/io/scans.py"
click node_sc_analysis "https://github.com/tenable/pytenable/blob/main/tenable/sc/analysis.py"
click node_ot_assets "https://github.com/tenable/pytenable/blob/main/tenable/ot/assets.py"
click node_ot_events "https://github.com/tenable/pytenable/blob/main/tenable/ot/events.py"
click node_ot_plugins "https://github.com/tenable/pytenable/blob/main/tenable/ot/plugins.py"
click node_ot_exports "https://github.com/tenable/pytenable/blob/main/tenable/ot/exports/api.py"
click node_cs_assets "https://github.com/tenable/pytenable/blob/main/tenable/cloudsecurity/assets.py"
click node_cs_vulns "https://github.com/tenable/pytenable/blob/main/tenable/cloudsecurity/vulns.py"
click node_asm_inventory "https://github.com/tenable/pytenable/blob/main/tenable/asm/inventory.py"
click node_ie_exposure "https://github.com/tenable/pytenable/blob/main/tenable/ie/session.py"
click node_sync_api "https://github.com/tenable/pytenable/blob/main/tenable/io/sync/api.py"
click node_sync_manager "https://github.com/tenable/pytenable/blob/main/tenable/io/sync/job_manager.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_platform,node_transport,node_endpoint toneBlue
class node_tio,node_tsc,node_tot,node_tcs,node_tasm,node_tie toneAmber
class node_io_scans,node_sc_analysis,node_ot_assets,node_ot_events,node_ot_plugins,node_ot_exports,node_cs_assets,node_cs_vulns,node_asm_inventory,node_ie_exposure toneMint
class node_sync_api,node_sync_manager toneRose
class node_engineer,node_cloud_service,node_sc_service,node_ot_service,node_identity_service toneIndigo
```

## Components

### Shared Runtime

- [API Platform](https://github.com/tenable/pytenable/blob/main/tenable/base/platform.py): `tenable/base/platform.py`
- [HTTP GraphQL Transport](https://github.com/tenable/pytenable/blob/main/tenable/base/_restfly_v1.py): `tenable/base/_restfly_v1.py`
- [Endpoint Abstraction](https://github.com/tenable/pytenable/blob/main/tenable/base/endpoint.py): `tenable/base/endpoint.py`

### Product Clients

- [Tenable IO Client](https://github.com/tenable/pytenable/blob/main/tenable/io/__init__.py): `tenable/io/__init__.py`
- [Tenable SC Client](https://github.com/tenable/pytenable/blob/main/tenable/sc/__init__.py): `tenable/sc/__init__.py`
- [Tenable OT Client](https://github.com/tenable/pytenable/blob/main/tenable/ot/session.py): `tenable/ot/session.py`
- [Cloud Security Client](https://github.com/tenable/pytenable/blob/main/tenable/cloudsecurity/session.py): `tenable/cloudsecurity/session.py`
- [ASM Client](https://github.com/tenable/pytenable/blob/main/tenable/asm/session.py): `tenable/asm/session.py`
- [Identity Exposure Client](https://github.com/tenable/pytenable/blob/main/tenable/ie/session.py): `tenable/ie/session.py`

### Domain APIs

- [Cloud Scans](https://github.com/tenable/pytenable/blob/main/tenable/io/scans.py): `tenable/io/scans.py`
- [SC Analysis](https://github.com/tenable/pytenable/blob/main/tenable/sc/analysis.py): `tenable/sc/analysis.py`
- [OT Assets](https://github.com/tenable/pytenable/blob/main/tenable/ot/assets.py): `tenable/ot/assets.py`
- [OT Events](https://github.com/tenable/pytenable/blob/main/tenable/ot/events.py): `tenable/ot/events.py`
- [OT Plugins](https://github.com/tenable/pytenable/blob/main/tenable/ot/plugins.py): `tenable/ot/plugins.py`
- [OT Exports](https://github.com/tenable/pytenable/blob/main/tenable/ot/exports/api.py): `tenable/ot/exports/api.py`
- [Cloud Assets](https://github.com/tenable/pytenable/blob/main/tenable/cloudsecurity/assets.py): `tenable/cloudsecurity/assets.py`
- [Cloud Vulnerabilities](https://github.com/tenable/pytenable/blob/main/tenable/cloudsecurity/vulns.py): `tenable/cloudsecurity/vulns.py`
- [ASM Inventory](https://github.com/tenable/pytenable/blob/main/tenable/asm/inventory.py): `tenable/asm/inventory.py`
- [Identity Exposure APIs](https://github.com/tenable/pytenable/blob/main/tenable/ie/session.py): `tenable/ie/session.py`

### Synchronization

- [Sync Jobs API](https://github.com/tenable/pytenable/blob/main/tenable/io/sync/api.py): `tenable/io/sync/api.py`
- [Sync Job Manager](https://github.com/tenable/pytenable/blob/main/tenable/io/sync/job_manager.py): `tenable/io/sync/job_manager.py`

### Other components

- **Engineer**
- **Tenable Cloud Service**
- **Tenable SC Service**
- **Tenable OT Service**
- **Identity Service**

## Connections

- Engineer → Tenable IO Client: creates
- Engineer → Tenable SC Client: creates
- Engineer → Tenable OT Client: creates
- Engineer → Cloud Security Client: creates
- Engineer → ASM Client: creates
- Engineer → Identity Exposure Client: creates
- Tenable IO Client → Cloud Scans: exposes
- Tenable SC Client → SC Analysis: exposes
- Tenable OT Client → OT Assets: exposes
- Tenable OT Client → OT Events: exposes
- Tenable OT Client → OT Plugins: exposes
- Tenable OT Client → OT Exports: exposes
- Cloud Security Client → Cloud Assets: exposes
- Cloud Security Client → Cloud Vulnerabilities: exposes
- ASM Client → ASM Inventory: exposes
- Identity Exposure Client → Identity Exposure APIs: exposes
- Tenable IO Client → Sync Jobs API: exposes
- Sync Job Manager → Sync Jobs API: uploads chunks
- Sync Job Manager → Sync Jobs API: submits jobs
- Cloud Scans → Endpoint Abstraction: uses
- SC Analysis → Endpoint Abstraction: uses
- OT Assets → HTTP GraphQL Transport: queries
- OT Events → HTTP GraphQL Transport: queries
- OT Plugins → HTTP GraphQL Transport: queries
- OT Exports → HTTP GraphQL Transport: requests
- Cloud Assets → HTTP GraphQL Transport: queries
- Cloud Vulnerabilities → HTTP GraphQL Transport: queries
- ASM Inventory → Endpoint Abstraction: uses
- Identity Exposure APIs → Endpoint Abstraction: uses
- Endpoint Abstraction → HTTP GraphQL Transport: sends requests
- HTTP GraphQL Transport → Tenable Cloud Service: calls
- HTTP GraphQL Transport → Tenable SC Service: calls
- HTTP GraphQL Transport → Tenable OT Service: calls
- HTTP GraphQL Transport → Identity Service: calls
- API Platform → HTTP GraphQL Transport: configures
- Tenable IO Client → API Platform: inherits
- Tenable SC Client → API Platform: inherits
- Tenable OT Client → API Platform: inherits
- ASM Client → API Platform: inherits
- Identity Exposure Client → API Platform: inherits
