Metadata-Version: 2.4
Name: pyTenable
Version: 1.8.3
Summary: Python library to interface into Tenable's products and applications
Author: Tenable, Inc.
Author-email: Steve McGrath <smcgrath@tenable.com>
License: MIT License
Project-URL: Homepage, https://pytenable.readthedocs.io
Project-URL: Repository, https://github.com/tenable/pytenable
Project-URL: Issues, https://github.com/tenable/pytenable/issues
Project-URL: Changelog, https://github.com/tenable/pytenable/blob/master/CHANGELOG.md
Keywords: tenable,tenable vulnerability management,tenable security center,tenable securitycenter,tenable.io,tenable.sc,tenable.cs,tenable cloud security,tenable container security,tenable.ot,tenable ot security
Classifier: Development Status :: 5 - Production/Stable
Classifier: Intended Audience :: Developers
Classifier: Topic :: Software Development
Classifier: Topic :: Software Development :: Libraries
Classifier: Topic :: Software Development :: Libraries :: Application Frameworks
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Requires-Python: >=3.10
Description-Content-Type: text/x-rst
License-File: LICENSE
Requires-Dist: requests>=2.26
Requires-Dist: python-dateutil>=2.6
Requires-Dist: semver>=2.10.0
Requires-Dist: restfly>=1.5.1
Requires-Dist: marshmallow<4,>=3.8
Requires-Dist: python-box>=4.0
Requires-Dist: defusedxml>=0.5.0
Requires-Dist: urllib3>=1.26.18
Requires-Dist: typing-extensions>=4.0.1
Requires-Dist: dataclasses>=0.8; python_version == "3.6"
Requires-Dist: requests-toolbelt>=1.0.0
Requires-Dist: gql>=3.5.0
Requires-Dist: graphql-core>=3.2.3
Requires-Dist: pydantic>=2.5.3
Requires-Dist: pydantic-extra-types>=2.3.0
Provides-Extra: pkcs12
Requires-Dist: cryptography>=43.0.1; extra == "pkcs12"
Provides-Extra: all
Requires-Dist: pytenable[pkcs12]; extra == "all"
Dynamic: license-file

Welcome to pyTenable's documentation!
=====================================

.. image:: https://img.shields.io/pypi/v/pytenable.svg
.. image:: https://img.shields.io/badge/python-3.10%2B-blue
.. image:: https://img.shields.io/readthedocs/pytenable
.. image:: https://img.shields.io/pypi/dm/pytenable
.. image:: https://img.shields.io/github/license/tenable/pyTenable.svg
.. image:: 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.

- Issue Tracker: https://github.com/tenable/pyTenable/issues
- Github Repository: https://github.com/tenable/pyTenable
- Docs: https://pytenable.readthedocs.io

Installation
------------

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

.. code-block:: bash

   pip install pytenable

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

.. code-block:: bash

   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:

.. code-block:: python

   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:

.. code-block:: python

   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 <https://pytenable.readthedocs.io/>`_

Logging
-------

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

.. code-block:: python

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

License
-------

The project is licensed under the MIT license.
