tcex.tcex_session module

ThreatConnect Requests Session

class tcex.tcex_session.TcExSession(tcex)[source]

Bases: requests.sessions.Session

ThreatConnect REST API Requests Session

_hmac_auth()[source]

Add ThreatConnect HMAC Auth to Session.

_token_auth()[source]

Add ThreatConnect Token Auth to Session.

request(method, url, **kwargs)[source]

Override request method disabling verify on token renewal if disabled on session.

retry(retries=3, backoff_factor=0.3, status_forcelist=(500, 502, 504))[source]

Add retry to Requests Session

https://urllib3.readthedocs.io/en/latest/reference/urllib3.util.html#urllib3.util.retry.Retry