Skip to main content

Python library to interface into Tenable's products and applications

Project description

https://img.shields.io/pypi/v/pytenable.svg https://img.shields.io/badge/python-3.10%2B-blue https://img.shields.io/readthedocs/pytenable 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(access_key='TIO_ACCESS_KEY', secret_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(url='https://SC_URL', access_key='AKEY', secret_key='SKEY')
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.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pytenable-26.6.1.tar.gz (309.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pytenable-26.6.1-py3-none-any.whl (423.9 kB view details)

Uploaded Python 3

File details

Details for the file pytenable-26.6.1.tar.gz.

File metadata

  • Download URL: pytenable-26.6.1.tar.gz
  • Upload date:
  • Size: 309.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.18 {"installer":{"name":"uv","version":"0.11.18","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for pytenable-26.6.1.tar.gz
Algorithm Hash digest
SHA256 807f5adc52406fd918d4c3a88f66b25400c30fa9a8a945395a05f497cf16df2a
MD5 89d033b948c5acae1c60d0d517832be9
BLAKE2b-256 9bb254b0fbcf7410ee28125cf0fa9f72834c0d16871a8b0928403868f7bc90fa

See more details on using hashes here.

File details

Details for the file pytenable-26.6.1-py3-none-any.whl.

File metadata

  • Download URL: pytenable-26.6.1-py3-none-any.whl
  • Upload date:
  • Size: 423.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.18 {"installer":{"name":"uv","version":"0.11.18","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for pytenable-26.6.1-py3-none-any.whl
Algorithm Hash digest
SHA256 ea2b234c8e7e344aec16708b415a562894c4195b689d2993727652117cabba58
MD5 faf22b52e28d18231e7b197bbad8ca95
BLAKE2b-256 d1e7567c29a9946e4ffe8c6a124c279ab5dd3e6feeb6637841b0d3ffa331f5ca

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page