Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
..
Failed to load latest commit information.
docs
pytx
scripts
tests
.gitignore
AUTHORS
CONTRIBUTING.md
DESCRIPTION.rst
LICENSE
MANIFEST.in
Makefile
README.rst
requirements-dev.txt
requirements.txt
setup.py
tox.ini

README.rst

pytx

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

Build Status

https://readthedocs.org/projects/pytx/badge/?version=latest

Installation

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='www.facebook.com')
for result in results:
    print result.get(td.CONFIDENCE)

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

Documentation

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