Rewrite client for ThreatExchange API from scratch#1927
Open
jiefugong wants to merge 1 commit intofacebook:mainfrom
Open
Rewrite client for ThreatExchange API from scratch#1927jiefugong wants to merge 1 commit intofacebook:mainfrom
jiefugong wants to merge 1 commit intofacebook:mainfrom
Conversation
Dcallies
requested changes
Feb 5, 2026
Contributor
Dcallies
left a comment
There was a problem hiding this comment.
This library is written as though it is going to be a standalone package. Currently the threatexchange client is distributed as part of threatexchange.
Can you talk through why you think distributing it is a standalone package is preferred?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This work is being done during the Initiate Hackathon - a lot of changes are still needed!
Rewrites the client for ThreatExchange's public API from scratch. In this PR, we have the following:
core.pyfile which contains the implementation for the clientmodels.pyfile which contains some definitions of objects that one can interact with in the APIThe models.py file is NOT fully vetted for correctness. As each API implementation is filled out, we will modify / create and verify the models that are associated with that API endpoint. In this PR, we implement a basic endpoint for demonstration (get_members())
Test Plan
Follow the README.md - set up a virtual environment and download required packages. Set up local access token for RF Test application. Afterwards, you can run the following: