Registry / http-networking / otxv2
library1.5.12pypypi✓ verified 83d ago

Official Python SDK for AlienVault OTX (Open Threat Exchange) API. Current version 1.5.12, maintained by AT&T Cybersecurity. Provides access to pulses, indicators, and threat intelligence feeds. Release cadence is irregular with periodic bugfixes and feature additions.

pip install otxv2
INSTALL
IMPORT
SIG · OTXV2
O
otxv2
http-networkingpythonv1.5.12
Install
2.6s avg
Import
630ms
Disk
23MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v1.5.12 · 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.666s · 24.7MB
glibc
py 3.103.95 runs
installs and imports cleanly · install 2.6s · import 0.594s · 25MB
23MB installed
● package 23MB
Code
Verified usage

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

OTXv2
from OTXv2 import OTXv2
from otxv2 import OTXv2
Module name is case-sensitive: OTXv2, not otxv2.
IndicatorTypes
from OTXv2 import IndicatorTypes

Initialize with API key, fetch user pulses, and search for pulses by keyword.

from OTXv2 import OTXv2 from OTXv2 import IndicatorTypes otx = OTXv2('YOUR_API_KEY') # Get pulses by user pulses = otx.getall(limit=10) for pulse in pulses: print(pulse['name']) # Search for indicators results = otx.search_pulses('malware') print(len(results))
Debug
Known issues
gotchaThe module name is case-sensitive: `from OTXv2 import OTXv2`, not `otxv2`. Many users incorrectly import using lowercase and get ImportError.
fix
Use correct case: `from OTXv2 import OTXv2`.
affects: all
breakingIn version 1.5.11, default page limit sizes were changed, which may cause scripts expecting a different default limit to receive fewer or more results.
fix
Explicitly pass `limit` parameter to `getall()` or `search_pulses()` to control page size.
affects: >=1.5.11
deprecatedThe `get_pulse_indicators` method's `include_inactive` parameter was added in 1.5.6. Older versions do not have it, and omitting it only returns active indicators.
fix
Upgrade to >=1.5.6 to use `include_inactive=True`.
affects: <1.5.6
Errors
Common errors & fixes
ModuleNotFoundError: No module named 'otxv2'
Attempted import using all-lowercase module name.
fix
Use `from OTXv2 import OTXv2` (note capital O, T, X, v, 2).
OTXv2.exceptions.BadRequest: 400 Client Error: Bad Request
Invalid or missing API key when making requests.
fix
Ensure you provide a valid API key to the OTXv2 constructor. Obtain from https://otx.alienvault.com.
AttributeError: 'OTXv2' object has no attribute 'search_pulses'
Method `search_pulses` was added in version 1.5.8. Using an older version.
fix
Upgrade to version 1.5.8 or later: `pip install --upgrade otxv2`.
Upgrade
Version history
1.5.12latest on PyPI · released Apr 2, 2021
Audit
Dependencies
requestsrequiredHTTP client for API calls
python-dateutilrequiredDate parsing for pulse timestamps
Agent activity
2 hits · last 30 days
node
2
Resources
otxv2 — pip install otxv2 · libregistry