Skip to content

Commit

Permalink
[py-tx] restored comment
Browse files Browse the repository at this point in the history
  • Loading branch information
Mackay-Fisher committed Dec 18, 2024
1 parent f668729 commit 991e870
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions python-threatexchange/threatexchange/cli/storage/interfaces.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,28 @@
# Copyright (c) Meta Platforms, Inc. and affiliates.

"""
Common interface for persisting pytx configuration and concepts.
Most of the individual components of pytx are find to use piecemeal, and
the full interface covers the most complex and complete useage. A usecase
with one collection of hashes using one algorithm might be better off
hardcoding those things rather than fully implementing the interface.
# Migration Notes
There's an earlier attempt at these interfaces used for CLI at
<@Mackay-Fisher add the right pointer to the CLI storage>.
During the development of Hasher-Matcher-Actioner 2.0
(github.com/facebook/ThreatExchange/tree/main/hasher-matcher-actioner/)
we realized that the original attempt at this wouldn't meet the needs
of that code and wrote a new interface.
As of 12/2024, we are now migrating that interface from HMA into pytx
proper as part of a migration to dbm
(github.com/facebook/ThreatExchange/issues/1687). The general approach is:
1. Copy the interface unchanged from HMA to pytx
2. Release a new version of pytx
3. Delete the copy in HMA and update all references to the pytx version
In parallel, we intend to slowly migrate the CLI storage components to
follow the same interface.
"""

import abc
from dataclasses import dataclass
import typing as t
Expand Down

0 comments on commit 991e870

Please sign in to comment.