Skip to main content

Python wrapper for Tenable SecurityCenter API.

Project description

A powerful wrapper around the SecurityCenter API. Manages authentication, building requests, and interpreting responses. Supports the full, unpublished API, above the limited API officially documented. The “module::action” pattern of the API is represented as dotted access to attributes and methods on the client.

Install:

$ pip install SecurityCenter

Use:

>>> from securitycenter import Client
>>> client = Client('https://localhost:443', 'user', 'password', 'cert_file.crt')
>>> scan_results = client.scan_result.init()

Many actions return more than the specifically requested data. For example, scanResult::init returns information including users and scanners as well. Many methods are configured to extract the most common value (in the example, the scan results). If a method extracts a value by default, pass _key=None to return the full response instead.

>>> response = client.scan_result.init(_key=None)
>>> response.keys()  # all keys returned by method

Some actions return chunks of results. The library standardizes how paginated requests are made to always use page and page_size arguments, and the results become a special pagination object that can iterate over subsequent pages.

>>> p3 = client.scan_result.get_page(page=3, page_size=10)  # 3rd page, where each page has 10 items
>>> p3  # list of items on current page
>>> p4 = p1.next_page()  # make request for next page
>>> pages = list(p1.iter_pages())  # all pages
>>> items = list(p1.iter_items())  # all items

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

SecurityCenter-1.0.2.tar.gz (12.2 kB view details)

Uploaded Source

Built Distribution

SecurityCenter-1.0.2-py2.py3-none-any.whl (16.2 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file SecurityCenter-1.0.2.tar.gz.

File metadata

File hashes

Hashes for SecurityCenter-1.0.2.tar.gz
Algorithm Hash digest
SHA256 aa3b83fb1145cf7d9be9de1ef149c054b6c80e66b1b4c7240ec98ef02d4ab271
MD5 45378cc672577a3020639b4357df643b
BLAKE2b-256 a96489fd715c46bebcc12142d15e2479d6208f241095e7d3ecabc3b73a4985f6

See more details on using hashes here.

File details

Details for the file SecurityCenter-1.0.2-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for SecurityCenter-1.0.2-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 9821387a55490b0ac076ffd8b5e44ca5d7766ae2e868a8add9c1bbf1f3e3462b
MD5 3dd494df3ed44755d886a05b9717d7a8
BLAKE2b-256 dfcd5a3d905170324301fae47c9c892fce18c59c404e41e00c69c3f3d2d94109

See more details on using hashes here.

Supported by

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