Python Library for Facebook ThreatExchange
Project description
python-threatexchange
A Python Library for downloading and using datasets stored in ThreatExchange.
Overview
Fetching data from ThreatExchange "correcty" is sadly not as straightforward as it should be.
Additionally, once you have the data, the application of that data might not always be straightforward.
This library provides a reference implementation for fetching datasets, applying many common formats, and uploading your own data to the dataset.
These reference implementations are not meant to be the best, most efficient, or production ready versions, but to instead be simple enough that they could be easily pasted to other languages.
The bundled cli tool of the same name is meant to demonstrate the library, as well as potentially provide a first draft implementation for prototype or evaluation.
Installation
$ python3 -m pip install threatexchange [--upgrade]
Usage
This package can be used as a library, but the fastest way to use it is from the CLI
$ threatexchange match text "bball now?"
Looks like you haven't set up a collaboration config, so using the sample one against public data
Looks like you are running this for the first time. Fetching some sample data.
video_md5: 2
raw_text: 3
url: 1
video_tmk_pdqf: 1
photo_md5: 1
pdq: 138
trend_query: 1
3425830734108278 raw_text media_priority_samples
3261912580534814 trend_query media_priority_samples
$ threatexchange label descriptor 3425830734108278 false_positive
Documentation
The best documentation is in the --help of the tool, as well as the docstrings in libraries. Open issues if something is lacking.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file threatexchange-0.0.10.tar.gz
.
File metadata
- Download URL: threatexchange-0.0.10.tar.gz
- Upload date:
- Size: 27.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.25.0 setuptools/50.3.2 requests-toolbelt/0.9.1 tqdm/4.54.0 CPython/3.8.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | f606527b2d0e6a759ee6c07af22eec1ef4e94f6bddea2edd068d61091ff55002 |
|
MD5 | 6883e8652f4ee8a326c2f76beab6fd20 |
|
BLAKE2b-256 | 07fd4177ba0ba747825cce72d8e771a6c5bad282bb2fa48378e9ff209073bfe4 |
File details
Details for the file threatexchange-0.0.10-py3-none-any.whl
.
File metadata
- Download URL: threatexchange-0.0.10-py3-none-any.whl
- Upload date:
- Size: 41.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.25.0 setuptools/50.3.2 requests-toolbelt/0.9.1 tqdm/4.54.0 CPython/3.8.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 100c9ee040cb5e3129072e1cb5b4d8cb972f05fd778427a1c327d40348cb22bd |
|
MD5 | b243409b04c2260221b69a4c92e1f29d |
|
BLAKE2b-256 | 2fe591a07d78db61c2c82c4f1ff7fe30fbbc9ac59025c720178741bf1a8633f4 |