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

https://travis-ci.org/facebook/ThreatExchange.svg https://img.shields.io/pypi/dm/pytx.svg https://img.shields.io/pypi/v/pytx.svg https://img.shields.io/badge/python-2.7-blue.svg https://img.shields.io/pypi/l/pytx.svg 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.

Project details


Download files

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

Source Distribution

pytx-0.5.10.tar.gz (36.6 kB view details)

Uploaded Source

File details

Details for the file pytx-0.5.10.tar.gz.

File metadata

  • Download URL: pytx-0.5.10.tar.gz
  • Upload date:
  • Size: 36.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for pytx-0.5.10.tar.gz
Algorithm Hash digest
SHA256 bfbb2fd951cdb8f40b6a4a979bf79efc612e65a93955196b269dc7abb5286e73
MD5 671a68f2927b4e40c2b85504e351a800
BLAKE2b-256 cfbb70ef27807fe18859cbeb697130ca08c4cd155610ca4f3b7aea17f3a13c85

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page