Skip to main content
https://img.shields.io/endpoint.svg?url=https%3A%2F%2Factions-badge.atrox.dev%2Ftenable%2FpyTenable%2Fbadge&label=build https://img.shields.io/pypi/v/pytenable.svg https://img.shields.io/badge/python-3.7%203.8%203.9%203.10%203.11-blue https://img.shields.io/pypi/dm/pytenable https://img.shields.io/github/license/tenable/pyTenable.svg https://sonarcloud.io/api/project_badges/measure?project=tenable_pyTenable&metric=alert_status

pyTenable is intended to be a pythonic interface into the Tenable application APIs. Further by providing a common interface and a common structure between all of the various applications, we can ease the transition from the vastly different APIs between some of the products.

Installation

To install the most recent published version to pypi, its simply a matter of installing via pip:

pip install pytenable

If you’re looking for bleeding-edge, then feel free to install directly from the github repository like so:

pip install git+git://github.com/tenable/pytenable.git#egg=pytenable

Getting Started

Lets assume that we want to get the list of scans that have been run on our Tenable.io application. Performing this action is as simple as the following:

from tenable.io import TenableIO
tio = TenableIO('TIO_ACCESS_KEY', 'TIO_SECRET_KEY')
for scan in tio.scans.list():
   print('{status}: {id}/{uuid} - {name}'.format(**scan))

Getting started with Tenable.sc is equally as easy:

from tenable.sc import TenableSC
sc = TenableSC('SECURITYCENTER_NETWORK_ADDRESS')
sc.login('SC_USERNAME', 'SC_PASSWORD')
for vuln in sc.analysis.vulns():
   print('{ip}:{pluginID}:{pluginName}'.format(**vuln))

For more detailed information on whats available, please refer to the pyTenable Documentation

Logging

Enabling logging for pyTenable is a simple matter of enabling debug logs through the python logging package. An easy example is detailed here:

import logging
logging.basicConfig(level=logging.DEBUG)

License

The project is licensed under the MIT license.

Metadata

Release files for pyTenable 1.7.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pyTenable 1.7.3
File Size Uploaded Provenance Actions
pytenable-1.7.3.tar.gz 260.8 kB Without provenance Details for pytenable-1.7.3.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for pyTenable 1.7.3
File Interpreter ABI Platform Actions
pyTenable-1.7.3-py3-none-any.whl Python 3 none any Details for pyTenable-1.7.3-py3-none-any.whl

Total release size: 633.5 kB

Release files / pytenable-1.7.3.tar.gz

Download URL pytenable-1.7.3.tar.gz
Size 260.8 kB
Tags Source
SHA-256 checksum
How to use checksums
5eece5f44ec04a6f177e307b5a4eaf1e1fe4107c43d36794027a9b1a5e4d440e
BLAKE2b-256 checksum
How to use checksums
7835566a88de11ecf6b7f6b35436e931dbf7a85263b5845c82818e24d611a29b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.8.20

Release files / pyTenable-1.7.3-py3-none-any.whl

Download URL pyTenable-1.7.3-py3-none-any.whl
Size 372.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
5c593ab75fba217d18e4d7b380a1dd1c6bd4c937d8cba8a80ef26f3b88f5f20a
BLAKE2b-256 checksum
How to use checksums
628d3f6aa3b6c935cb3a60c555dbcad0083756bb3528e83e904378a2e59ee0c6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.8.20

Security for pyTenable 1.7.3

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

1.7.3 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page