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.5.1.tar.gz (303.4 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.5.1-py3-none-any.whl (423.3 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: pytenable-26.5.1.tar.gz
  • Upload date:
  • Size: 303.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.7 {"installer":{"name":"uv","version":"0.11.7","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.5.1.tar.gz
Algorithm Hash digest
SHA256 ee616c4008d13c5f8bc7ad3bac4b9dfe54965735a35606750524f576d80fb294
MD5 59e9db82886ce0dd71e153edc4aa9180
BLAKE2b-256 4f23a08abc946c5ab3f2e2527f769c41c058d631f3904cd7ac36a786c9754f40

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pytenable-26.5.1-py3-none-any.whl
  • Upload date:
  • Size: 423.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.7 {"installer":{"name":"uv","version":"0.11.7","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.5.1-py3-none-any.whl
Algorithm Hash digest
SHA256 33332f970743d07177014f5b0bfc021f5945b081da29f1611833043d8ee4561b
MD5 e9612b7a5136a48565bd000b232b0849
BLAKE2b-256 0f769fc8bdf3ef64ec8f6399cb6491e730f38f8f009375999025641d194c133a

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