tenable_io package

Submodules

tenable_io.client module

class tenable_io.client.TenableIOClient(access_key=None, secret_key=None, endpoint='https://cloud.tenable.com/', impersonate=None)

Bases: object

delete(*args, **kwargs)
get(*args, **kwargs)
static impersonate(username)
post(*args, **kwargs)
put(*args, **kwargs)

tenable_io.config module

class tenable_io.config.TenableIOConfig

Bases: object

static get(key)

tenable_io.exceptions module

class tenable_io.exceptions.ErrorCode(description, http_code=None)

Bases: object

static from_http_code(code)
exception tenable_io.exceptions.TenableIOApiException(response)

Bases: tenable_io.exceptions.TenableIOException

class tenable_io.exceptions.TenableIOErrorCode(description, http_code=None)

Bases: tenable_io.exceptions.ErrorCode

ACCEPTED = <tenable_io.exceptions.ErrorCode object>
ALREADY_REPORTED = <tenable_io.exceptions.ErrorCode object>
BAD_GATEWAY = <tenable_io.exceptions.ErrorCode object>
BAD_REQUEST = <tenable_io.exceptions.ErrorCode object>
CLIENT_CLOSED_REQUEST = <tenable_io.exceptions.ErrorCode object>
CONFLICT = <tenable_io.exceptions.ErrorCode object>
CONNECTION_CLOSED_WITHOUT_RESPONSE = <tenable_io.exceptions.ErrorCode object>
CONTINUE = <tenable_io.exceptions.ErrorCode object>
CREATED = <tenable_io.exceptions.ErrorCode object>
EXPECTATION_FAILED = <tenable_io.exceptions.ErrorCode object>
FAILED_DEPENDENCY = <tenable_io.exceptions.ErrorCode object>
FORBIDDEN = <tenable_io.exceptions.ErrorCode object>
FOUND = <tenable_io.exceptions.ErrorCode object>
GATEWAY_TIMEOUT = <tenable_io.exceptions.ErrorCode object>
GENERIC = <tenable_io.exceptions.ErrorCode object>
GONE = <tenable_io.exceptions.ErrorCode object>
HTTP_VERSION_NOT_SUPPORTED = <tenable_io.exceptions.ErrorCode object>
IM_A_TEAPOT = <tenable_io.exceptions.ErrorCode object>
IM_USED = <tenable_io.exceptions.ErrorCode object>
INSUFFICIENT_STORAGE = <tenable_io.exceptions.ErrorCode object>
INTERNAL_SERVER_ERROR = <tenable_io.exceptions.ErrorCode object>
LENGTH_REQUIRED = <tenable_io.exceptions.ErrorCode object>
LOCKED = <tenable_io.exceptions.ErrorCode object>
LOOP_DETECTED = <tenable_io.exceptions.ErrorCode object>
METHOD_NOT_ALLOWED = <tenable_io.exceptions.ErrorCode object>
MISDIRECTED_REQUEST = <tenable_io.exceptions.ErrorCode object>
MOVED_PERMANENTLY = <tenable_io.exceptions.ErrorCode object>
MULTIPLE_CHOICES = <tenable_io.exceptions.ErrorCode object>
MULTI_STATUS = <tenable_io.exceptions.ErrorCode object>
NETWORK_AUTHENTICATION_REQUIRED = <tenable_io.exceptions.ErrorCode object>
NETWORK_CONNECT_TIMEOUT_ERROR = <tenable_io.exceptions.ErrorCode object>
NON_AUTHORITATIVE_INFORMATION = <tenable_io.exceptions.ErrorCode object>
NOT_ACCEPTABLE = <tenable_io.exceptions.ErrorCode object>
NOT_EXTENDED = <tenable_io.exceptions.ErrorCode object>
NOT_FOUND = <tenable_io.exceptions.ErrorCode object>
NOT_IMPLEMENTED = <tenable_io.exceptions.ErrorCode object>
NOT_MODIFIED = <tenable_io.exceptions.ErrorCode object>
NO_CONTENT = <tenable_io.exceptions.ErrorCode object>
OK = <tenable_io.exceptions.ErrorCode object>
PARTIAL_CONTENT = <tenable_io.exceptions.ErrorCode object>
PAYLOAD_TOO_LARGE = <tenable_io.exceptions.ErrorCode object>
PAYMENT_REQUIRED = <tenable_io.exceptions.ErrorCode object>
PERMANENT_REDIRECT = <tenable_io.exceptions.ErrorCode object>
PRECONDITION_FAILED = <tenable_io.exceptions.ErrorCode object>
PRECONDITION_REQUIRED = <tenable_io.exceptions.ErrorCode object>
PROCESSING = <tenable_io.exceptions.ErrorCode object>
PROXY_AUTHENTICATION_REQUIRED = <tenable_io.exceptions.ErrorCode object>
REQUESTED_RANGE_NOT_SATISFIABLE = <tenable_io.exceptions.ErrorCode object>
REQUEST_HEADER_FIELDS_TOO_LARGE = <tenable_io.exceptions.ErrorCode object>
REQUEST_TIMEOUT = <tenable_io.exceptions.ErrorCode object>
REQUEST_URI_TOO_LONG = <tenable_io.exceptions.ErrorCode object>
RESET_CONTENT = <tenable_io.exceptions.ErrorCode object>
SEE_OTHER = <tenable_io.exceptions.ErrorCode object>
SERVICE_UNAVAILABLE = <tenable_io.exceptions.ErrorCode object>
SWITCHING_PROTOCOLS = <tenable_io.exceptions.ErrorCode object>
TEMPORARY_REDIRECT = <tenable_io.exceptions.ErrorCode object>
TOO_MANY_REQUESTS = <tenable_io.exceptions.ErrorCode object>
UNAUTHORIZED = <tenable_io.exceptions.ErrorCode object>
UNPROCESSABLE_ENTITY = <tenable_io.exceptions.ErrorCode object>
UNSUPPORTED_MEDIA_TYPE = <tenable_io.exceptions.ErrorCode object>
UPGRADE_REQUIRED = <tenable_io.exceptions.ErrorCode object>
USE_PROXY = <tenable_io.exceptions.ErrorCode object>
VARIANT_ALSO_NEGOTIATES = <tenable_io.exceptions.ErrorCode object>
exception tenable_io.exceptions.TenableIOException(message=None, code=None)

Bases: exceptions.Exception

tenable_io.log module

class tenable_io.log.LevelFilter(levels)

Bases: logging.Filter

LevelFilter instances are used to filter messages by log level(s).

filter(record)

Log if returns non-zero, don’t if returns zero.

tenable_io.log.configure_logging()
tenable_io.log.format_request(response)

tenable_io.util module

tenable_io.util.is_ipv4(value)

Utility function to detect if a value is a valid IPv4

Parameters:value – The value to match against.
Returns:True if the value is a valid IPv4.
tenable_io.util.is_mac(value)

Utility function to detect if a value is a valid MAC address.

Parameters:value – The value to match against.
Returns:True if the value is a valid MAC address.
tenable_io.util.payload_filter(payload, filter_)
tenable_io.util.wait_until(condition, context=None)

Utility function to wait for a condition to become True.

Parameters:
  • condition – The condition function that should evaluate to True if and only if the condition is met.
  • context – If it is not None, it is passed to every call to the condition function.
Returns:

True when the condition function evaluates to True.

Module contents