Skip to content

Instantly share code, notes, and snippets.

View SteveMcGrath's full-sized avatar

Steven McGrath SteveMcGrath

View GitHub Profile
@SteveMcGrath
SteveMcGrath / example_python_tio_session.py
Created November 2, 2018 14:37
Example connecting to Tenable.io w/o pyTenable or the Python SDK
import requests
from requests.packages.urllib3.util.retry import Retry
# Sets the retry adaptor with the ability to properly backoff if we get 429s
retries = Retry(
total=3,
status_forcelist={429, 501, 502, 503, 504},
backoff_factor=1,
respect_retry_after_header=True
)