merge: chore/cleanup-remove-bloat-and-secrets into main
This commit is contained in:
commit
bde2f3a97d
1173 changed files with 437609 additions and 0 deletions
16
app/domain/labels/sources/__init__.py
Normal file
16
app/domain/labels/sources/__init__.py
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
"""Source adapters for the federated label API.
|
||||
|
||||
Each adapter implements `query(address, chain) -> list[Label]`.
|
||||
|
||||
To add a new source:
|
||||
1. Create a new module in this package (e.g., `my_source.py`)
|
||||
2. Implement `async def query_my_source(address: str, chain: str) -> list[Label]`
|
||||
3. Register it in LabelSource enum (models.py)
|
||||
4. Wire it in federated.py:_query_source dispatcher
|
||||
|
||||
All adapters follow these conventions:
|
||||
- Return [] on no match (not None)
|
||||
- Raise exceptions on infrastructure errors (handled by caller)
|
||||
- All addresses are normalized to lowercase before query
|
||||
- Each label has source=LabelSource.MY_SOURCE
|
||||
"""
|
||||
Loading…
Add table
Add a link
Reference in a new issue