ApexReaderConfig
Documentation for eth_defi.apex.config.ApexReaderConfig Python class.
- class ApexReaderConfig
Bases:
objectValidated standalone ApeX reader configuration.
Attributes summary
Console log level.
DuckDB database path.
Optional targeted vault IDs.
History HTTP worker count.
Process-wide public API request rate.
TCP connection timeout in seconds.
Socket inactivity timeout in seconds.
Per-request monotonic operation budget in seconds.
Whole-ranking monotonic operation budget in seconds.
Per-vault history monotonic operation budget in seconds.
Maximum retry sleep in seconds.
Maximum JSON response size.
History scan mode.
History maintenance cadence.
Whether the standalone command repeats.
Ranking scan cadence owned by the command.
Methods summary
__init__(log_level, db_path, vault_ids, ...)from_environment([environ])Build configuration from environment variables.
- log_level: str
Console log level.
- db_path: pathlib.Path
DuckDB database path.
- max_workers: int
History HTTP worker count.
- requests_per_second: float
Process-wide public API request rate.
- connect_timeout: float
TCP connection timeout in seconds.
- read_timeout: float
Socket inactivity timeout in seconds.
- request_deadline: float
Per-request monotonic operation budget in seconds.
- ranking_deadline: float
Whole-ranking monotonic operation budget in seconds.
- history_deadline: float
Per-vault history monotonic operation budget in seconds.
- max_retry_delay: float
Maximum retry sleep in seconds.
- max_response_bytes: int
Maximum JSON response size.
- history_mode: Literal['incremental', 'refresh', 'none']
History scan mode.
- history_refresh_interval: datetime.timedelta
History maintenance cadence.
- loop: bool
Whether the standalone command repeats.
- scan_interval: datetime.timedelta
Ranking scan cadence owned by the command.
- classmethod from_environment(environ=None)
Build configuration from environment variables.
- Parameters
environ (Optional[collections.abc.Mapping[str, str]]) – Environment mapping. Defaults to
os.environ.- Returns
Fully validated reader configuration.
- Return type
- __init__(log_level, db_path, vault_ids, max_workers, requests_per_second, connect_timeout, read_timeout, request_deadline, ranking_deadline, history_deadline, max_retry_delay, max_response_bytes, history_mode, history_refresh_interval, loop, scan_interval)
- Parameters
log_level (str) –
db_path (pathlib.Path) –
max_workers (int) –
requests_per_second (float) –
connect_timeout (float) –
read_timeout (float) –
request_deadline (float) –
ranking_deadline (float) –
history_deadline (float) –
max_retry_delay (float) –
max_response_bytes (int) –
history_mode (Literal['incremental', 'refresh', 'none']) –
history_refresh_interval (datetime.timedelta) –
loop (bool) –
scan_interval (datetime.timedelta) –
- Return type
None