Skip to main content

Python Library for Facebook ThreatExchange

Project description

pytx (pie-tex) is a Python Library for interfacing with Facebook’s ThreatExchange.

Build Status


Use pip to install or upgrade pytx:

$ pip install pytx [--upgrade]

Quick Example

from pytx.access_token import access_token
from pytx import ThreatDescriptor
from pytx.vocabulary import ThreatDescriptor as td

access_token('<app-id>', '<app-secret>')
results = ThreatDescriptor.objects(text='')
for result in results:
    print result.get(td.CONFIDENCE)

# type is type_ because type is a reserved word.
results = ThreatDescriptor.objects(type_='IP_ADDRESS',
for result in results:
    print result.get(td.INDICATOR)


For more information you can find documentation in the ‘docs’ directory, check the Github wiki, or readthedocs.

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for pytx, version 0.5.10
Filename, size File type Python version Upload date Hashes
Filename, size pytx-0.5.10.tar.gz (36.6 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring DigiCert DigiCert EV certificate Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page