Skip to content

Latest commit

 

History

34 Commits

Folders and files

Repository files navigation

otx-py

a lightweight, read-only Python wrapper for the OTX AlienVault API.

getting started

uv add git+https://github.com/ey3tech/otx-py

usage

from otx_py import OTXClient

client = OTXClient(api_key="your-api-key")

base url is https://otx.alienvault.com/api/v1 unless otherwise stated

pulses

# list pulses, https://otx.alienvault.com/otxapi/pulses
client.get_pulses(limit=25)

# get a pulse by id, /pulses/{pulse_id}
client.get_pulse_by_id("pulse-id")

# get indicators for a pulse, /pulses/{pulse_id}/indicators
client.get_pulse_indicators("pulse-id", limit=50)

search

# search users, /search/users
client.search_users("query", page=1, limit=20)

# search pulses, /search/pulses
client.search_pulses("query", page=1, limit=20)

other

# get indicator types, /pulses/indicators/types
client.get_indicator_types()

# get user details, /users/{username}
client.get_user("username", detail=True)

details

this wrapper only has two dependencies: httpx and msgspec. httpx is a modern http library, and msgspec provides high-speed json decoding and structs.

contributing

just clone the repository and run uv sync (or use another package manager)

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages