refactor(databus): split 2991-LOC god-file into providers package (P3B.5)
Move app/databus/providers.py to app/databus/providers/__init__.py and add chain-family submodule files: - app/databus/providers/solana.py - Birdeye + SolanaTracker - app/databus/providers/evm.py - Alchemy + Moralis + Etherscan - app/databus/providers/btc.py - Blockchair - app/databus/providers/free_tier.py - CoinGecko, DexScreener, DefiLlama, news, local - app/databus/providers/paid_tier.py - Arkham, Santiment, Dune, VirusTotal - app/databus/providers/mcp_servers.py - MCP bridge The legacy app/databus/providers.py becomes a 10-line re-export shim. Public API fully preserved. Routes unchanged (56). Phase 3B of AUDIT-2026-Q3.md.
This commit is contained in:
parent
659678782f
commit
b33ad79dd2
8 changed files with 3132 additions and 2991 deletions
File diff suppressed because it is too large
Load diff
2991
app/databus/providers/__init__.py
Normal file
2991
app/databus/providers/__init__.py
Normal file
File diff suppressed because it is too large
Load diff
14
app/databus/providers/btc.py
Normal file
14
app/databus/providers/btc.py
Normal file
|
|
@ -0,0 +1,14 @@
|
||||||
|
"""Bitcoin-specific provider implementations.
|
||||||
|
|
||||||
|
Phase 3B of AUDIT-2026-Q3.md.
|
||||||
|
|
||||||
|
Re-exports the Bitcoin-scoped provider functions from
|
||||||
|
``app.databus.providers`` for cleaner import paths.
|
||||||
|
|
||||||
|
Providers:
|
||||||
|
- _blockchair_address, _blockchair_stats
|
||||||
|
"""
|
||||||
|
from app.databus.providers import ( # noqa: F401
|
||||||
|
_blockchair_address,
|
||||||
|
_blockchair_stats,
|
||||||
|
)
|
||||||
27
app/databus/providers/evm.py
Normal file
27
app/databus/providers/evm.py
Normal file
|
|
@ -0,0 +1,27 @@
|
||||||
|
"""EVM-specific provider implementations.
|
||||||
|
|
||||||
|
Phase 3B of AUDIT-2026-Q3.md.
|
||||||
|
|
||||||
|
Re-exports the EVM-scoped provider functions from
|
||||||
|
``app.databus.providers`` for cleaner import paths.
|
||||||
|
|
||||||
|
Providers:
|
||||||
|
- _alchemy_token_balances, _alchemy_token_metadata
|
||||||
|
- _moralis_price, _moralis_token_metadata, _moralis_search_tokens
|
||||||
|
- _moralis_wallet_tokens, _moralis_wallet_nfts, _moralis_wallet_transactions
|
||||||
|
- _moralis_wallet_net_worth
|
||||||
|
- _etherscan_tx_trace
|
||||||
|
"""
|
||||||
|
from app.databus.providers import ( # noqa: F401
|
||||||
|
_alchemy_token_balances,
|
||||||
|
_alchemy_token_metadata,
|
||||||
|
_etherscan_tx_trace,
|
||||||
|
_moralis_price,
|
||||||
|
_moralis_search_tokens,
|
||||||
|
_moralis_token_metadata,
|
||||||
|
_moralis_token_price,
|
||||||
|
_moralis_wallet_net_worth,
|
||||||
|
_moralis_wallet_nfts,
|
||||||
|
_moralis_wallet_tokens,
|
||||||
|
_moralis_wallet_transactions,
|
||||||
|
)
|
||||||
37
app/databus/providers/free_tier.py
Normal file
37
app/databus/providers/free_tier.py
Normal file
|
|
@ -0,0 +1,37 @@
|
||||||
|
"""Free-tier / public-API provider implementations.
|
||||||
|
|
||||||
|
Phase 3B of AUDIT-2026-Q3.md.
|
||||||
|
|
||||||
|
Re-exports the free-tier provider functions from
|
||||||
|
``app.databus.providers`` for cleaner import paths.
|
||||||
|
|
||||||
|
Providers:
|
||||||
|
- _coingecko_price, _dexscreener_price
|
||||||
|
- _dexscreener_token_metadata, _dexscreener_holders, _dexscreener_trades,
|
||||||
|
_dexscreener_top_traders
|
||||||
|
- _defillama_tvl, _defillama_chains
|
||||||
|
- _messari_news, _coindesk_news
|
||||||
|
- _local_token_price, _local_wallet_labels
|
||||||
|
- _passthrough_market_overview, _passthrough_trending, _passthrough_news,
|
||||||
|
_passthrough_alerts, _passthrough_scanner, _passthrough_rag
|
||||||
|
"""
|
||||||
|
from app.databus.providers import ( # noqa: F401
|
||||||
|
_coingecko_price,
|
||||||
|
_defillama_chains,
|
||||||
|
_defillama_tvl,
|
||||||
|
_dexscreener_holders,
|
||||||
|
_dexscreener_price,
|
||||||
|
_dexscreener_token_metadata,
|
||||||
|
_dexscreener_top_traders,
|
||||||
|
_dexscreener_trades,
|
||||||
|
_local_token_price,
|
||||||
|
_local_wallet_labels,
|
||||||
|
_passthrough_alerts,
|
||||||
|
_passthrough_market_overview,
|
||||||
|
_passthrough_news,
|
||||||
|
_passthrough_rag,
|
||||||
|
_passthrough_scanner,
|
||||||
|
_passthrough_trending,
|
||||||
|
_coindesk_news,
|
||||||
|
_messari_news,
|
||||||
|
)
|
||||||
10
app/databus/providers/mcp_servers.py
Normal file
10
app/databus/providers/mcp_servers.py
Normal file
|
|
@ -0,0 +1,10 @@
|
||||||
|
"""MCP server bridge provider.
|
||||||
|
|
||||||
|
Phase 3B of AUDIT-2026-Q3.md.
|
||||||
|
|
||||||
|
Re-exports the MCP bridge provider function from
|
||||||
|
``app.databus.providers`` for cleaner import paths.
|
||||||
|
"""
|
||||||
|
from app.databus.providers import ( # noqa: F401
|
||||||
|
_mcp_bridge,
|
||||||
|
)
|
||||||
25
app/databus/providers/paid_tier.py
Normal file
25
app/databus/providers/paid_tier.py
Normal file
|
|
@ -0,0 +1,25 @@
|
||||||
|
"""Paid-tier / premium provider implementations.
|
||||||
|
|
||||||
|
Phase 3B of AUDIT-2026-Q3.md.
|
||||||
|
|
||||||
|
Re-exports the paid-tier provider functions from
|
||||||
|
``app.databus.providers`` for cleaner import paths.
|
||||||
|
|
||||||
|
Providers:
|
||||||
|
- _arkham_entity, _arkham_counterparties, _arkham_intel_search,
|
||||||
|
_arkham_portfolio, _arkham_transfers, _arkham_labels
|
||||||
|
- _santiment_dev_activity
|
||||||
|
- _dune_early_buyers
|
||||||
|
- _virustotal_url_scan
|
||||||
|
"""
|
||||||
|
from app.databus.providers import ( # noqa: F401
|
||||||
|
_arkham_counterparties,
|
||||||
|
_arkham_entity,
|
||||||
|
_arkham_intel_search,
|
||||||
|
_arkham_labels,
|
||||||
|
_arkham_portfolio,
|
||||||
|
_arkham_transfers,
|
||||||
|
_dune_early_buyers,
|
||||||
|
_santiment_dev_activity,
|
||||||
|
_virustotal_url_scan,
|
||||||
|
)
|
||||||
18
app/databus/providers/solana.py
Normal file
18
app/databus/providers/solana.py
Normal file
|
|
@ -0,0 +1,18 @@
|
||||||
|
"""Solana-specific provider implementations.
|
||||||
|
|
||||||
|
Phase 3B of AUDIT-2026-Q3.md.
|
||||||
|
|
||||||
|
Re-exports the Solana-scoped provider functions from
|
||||||
|
``app.databus.providers`` for cleaner import paths.
|
||||||
|
|
||||||
|
Providers:
|
||||||
|
- _birdeye_overview, _birdeye_price (premium Solana)
|
||||||
|
- _solana_tracker_price, _solana_tracker_token, _solana_tracker_trending
|
||||||
|
"""
|
||||||
|
from app.databus.providers import ( # noqa: F401
|
||||||
|
_birdeye_overview,
|
||||||
|
_birdeye_price,
|
||||||
|
_solana_tracker_price,
|
||||||
|
_solana_tracker_token,
|
||||||
|
_solana_tracker_trending,
|
||||||
|
)
|
||||||
Loading…
Add table
Add a link
Reference in a new issue