How opensanctions/yente works
Yente is an asynchronous HTTP API for searching, retrieving, and matching FollowTheMoney entities from configured datasets. A request reaches a dedicated search, match, or reconciliation router; matching builds candidate queries, searches the index, then scores results. Separately, catalog and entity-data loading feed index maintenance, which writes searchable indices through the configured Elasticsearch or OpenSearch provider. The README also documents on-premises use and custom watchlists. Some subsystem paths and links are included from the source index or README because their implementations were not excerpted.
Main entry points: indexer.py Index maintenance · app.py FastAPI application · search.py Search execution · match.py Match endpoint
Components 24
HTTP API
- FastAPI application
yente/app.py - Search endpoint
yente/routers/search.py - Match endpoint
yente/routers/match.py - Reconcile endpoint
yente/routers/reconcile.py - Admin endpoints
yente/routers/admin.py
Search and Matching
- Query construction
yente/search/queries.py - Search execution
yente/search/search.py - Match scoring
yente/scoring.py - Response models
yente/data/common.py
Data and Catalog
- Entity model
yente/data/entity.py - Dataset model
yente/data/dataset.py - Dataset catalog
yente/data/__init__.py - Manifest handling
yente/data/manifest.py - Entity data loading
yente/data/loader.py - Dataset updates
yente/data/updater.py
Index and Providers
- Index maintenance
yente/search/indexer.py - Index mapping
yente/search/mapping.py - Provider selection
yente/provider/__init__.py - Search provider interface
yente/provider/base.py - Elasticsearch provider
yente/provider/elastic.py - OpenSearch provider
yente/provider/opensearch.py
Other components
- API client
- Search index
- Configured data sources
Connections 38
- API client → FastAPI application: sends requests
yente/app.py - FastAPI application → Search endpoint: registers route
yente/app.py - FastAPI application → Match endpoint: registers route
yente/app.py - FastAPI application → Reconcile endpoint: registers route
yente/app.py - FastAPI application → Admin endpoints: registers route
yente/app.py - Search endpoint → Query construction: builds query
yente/routers/search.py - Search endpoint → Search execution: executes search
yente/routers/search.py - Search endpoint → Response models: returns results
yente/routers/search.py - Match endpoint → Query construction: builds candidates
yente/routers/match.py - Match endpoint → Search execution: retrieves candidates
yente/routers/match.py - Match endpoint → Match scoring: scores candidates
yente/routers/match.py - Match endpoint → Response models: formats matches
yente/routers/match.py - Reconcile endpoint → Query construction: builds query
yente/routers/reconcile.py - Reconcile endpoint → Search execution: retrieves entities
yente/routers/reconcile.py - Reconcile endpoint → Match scoring: scores candidates
yente/routers/reconcile.py - Query construction → Index mapping: uses index fields
yente/search/queries.py - Search execution → Provider selection: queries provider
yente/search/search.py - Search execution → Entity model: constructs entities
yente/search/search.py - Match scoring → Entity model: scores entity data
yente/scoring.py - FastAPI application → Index maintenance: starts reindexing
yente/app.py - Admin endpoints → Index maintenance: requests indexing
yente/routers/admin.py - Admin endpoints → Dataset catalog: reads catalog
yente/routers/admin.py - Dataset catalog → Manifest handling: loads manifest
yente/data/__init__.py - Dataset model → Configured data sources: resolves entity data
yente/data/dataset.py - Entity data loading → Dataset model: loads dataset entities
yente/data/loader.py - Index maintenance → Dataset catalog: reads datasets
yente/search/indexer.py - Index maintenance → Entity data loading: loads entity data
yente/search/indexer.py - Index maintenance → Dataset updates: checks updates
yente/search/indexer.py - Index maintenance → Entity model: indexes entities
yente/search/indexer.py - Index maintenance → Index mapping: creates mappings
yente/search/indexer.py - Index maintenance → Provider selection: writes through
yente/search/indexer.py - Provider selection → Elasticsearch provider: selects provider
yente/provider/__init__.py - Provider selection → OpenSearch provider: selects provider
yente/provider/__init__.py - Elasticsearch provider → Search provider interface: implements interface
yente/provider/elastic.py - OpenSearch provider → Search provider interface: implements interface
yente/provider/opensearch.py - Elasticsearch provider → Search index: reads and writes
- OpenSearch provider → Search index: reads and writes
- Search execution → Search index: searches index