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
muslpy 3.10–3.95 runs
installs and imports cleanly · install 0.0s · import 0.666s · 24.7MB
glibcpy 3.10–3.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))
Errors
Common errors & fixes
ModuleNotFoundError: No module named 'otxv2'
Attempted import using all-lowercase module name.
fixUse `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.
fixEnsure 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.
fixUpgrade 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