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-1.9.1.tar.gz (282.1 kB view details)

Uploaded Source

Built Distribution

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

pytenable-1.9.1-py3-none-any.whl (404.1 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: pytenable-1.9.1.tar.gz
  • Upload date:
  • Size: 282.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for pytenable-1.9.1.tar.gz
Algorithm Hash digest
SHA256 564b3128ec8dc62b5c3c86ee414aac136b6052449222dbba50185dfe8d1fd004
MD5 cda52fb7f2c36641a63443eb97a926ac
BLAKE2b-256 c02a4fff3015b7e7ea45de10a74539ad084e38fb0177169c7d9375cf5cfcc5c4

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pytenable-1.9.1-py3-none-any.whl
  • Upload date:
  • Size: 404.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for pytenable-1.9.1-py3-none-any.whl
Algorithm Hash digest
SHA256 fe6312c20a17822a10cf4a76c6e1ee2fd841d1cc9fca04af92b4e5462b2ab2c7
MD5 6a39d475ceee6f0fdc9fb7180eb88593
BLAKE2b-256 db05a837982090ae76b097464a08c328b3cd8bc5ff03448482f0df0cb514cd08

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