Registry / http-networking / passivetotal

passivetotal

JSON →
library2.5.9pypypiunverified

Python client library for the RiskIQ PassiveTotal and Illuminate API (version 2.5.9). Provides access to passive DNS, WHOIS, SSL certificates, trackers, articles, malware, attack surface intelligence, vulnerability intelligence, and more. Release cadence is irregular with minor bugfix and feature releases.

pip install passivetotal
INSTALL
IMPORT
SIG · PASSIVETOTAL
P
passivetotal
http-networkingpythonv2.5.9
Install
2.8s avg
Import
Disk
26MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v2.5.9 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.103.95 runs
installs and imports cleanly · install 0.0s · import 0.000s · 27.8MB
glibc
py 3.103.95 runs
installs and imports cleanly · install 2.8s · import 0.000s · 28MB
26MB installed
● package 26MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

Client
from passivetotal import Client
from passivetotal import Client
AccountClient
from passivetotal import AccountClient
api
from passivetotal import api

Initialize client with credentials, then query a hostname for passive DNS resolutions.

from passivetotal import Client from passivetotal.analyzer import Hostname # Credentials: use environment variables or config file client = Client(username=os.environ.get('PT_USERNAME', ''), api_key=os.environ.get('PT_API_KEY', '')) # Resolve a hostname query hostname = Hostname('passivetotal.org', client=client) print(hostname.resolutions)
Debug
Known issues
deprecatedThe `analyzer` module is experimental and may change in future releases. Avoid relying on internal details.
fix
Use the lower-level `Client` methods (e.g., `client.get_enrichment(...)`) for stable access.
affects: >=2.0.0
gotchaClient credentials are read from `~/.passivetotal/config` by default if not provided. If the file is present but malformed, import may fail silently.
fix
Always pass username and api_key explicitly, or set PT_USERNAME and PT_API_KEY environment variables.
affects: >=2.0.0
gotchaHostname resolution may throw `AnalyzerError` if the hostname cannot be resolved to an IP. This error is not documented in all versions.
fix
Catch `passivetotal.exception.AnalyzerError` when accessing analyzer objects.
affects: >=2.4.2
gotchaThe `certificates` property on `Hostname` uses a substring search across both subjectAlternativeNames and subjectCommonName. Results may include certificates not exactly matching the hostname.
fix
Filter results further or use the `certificates_search` method with more specific parameters.
affects: >=2.5.8
Upgrade
Version history
2.5.9latest on PyPI · released Mar 11, 2022
Audit
Dependencies
requestsrequiredHTTP library used for API calls
ipwhoisoptionalUsed for WHOIS lookups in certain modules
Agent activity
22 hits · last 30 days
node
20
Amazon
1
OpenAI (training)
1
Resources
passivetotal — pip install passivetotal · libregistry