ApexReaderConfig

Documentation for eth_defi.apex.config.ApexReaderConfig Python class.

class ApexReaderConfig

Bases: object

Validated standalone ApeX reader configuration.

Attributes summary

log_level

Console log level.

db_path

DuckDB database path.

vault_ids

Optional targeted vault IDs.

max_workers

History HTTP worker count.

requests_per_second

Process-wide public API request rate.

connect_timeout

TCP connection timeout in seconds.

read_timeout

Socket inactivity timeout in seconds.

request_deadline

Per-request monotonic operation budget in seconds.

ranking_deadline

Whole-ranking monotonic operation budget in seconds.

history_deadline

Per-vault history monotonic operation budget in seconds.

max_retry_delay

Maximum retry sleep in seconds.

max_response_bytes

Maximum JSON response size.

history_mode

History scan mode.

history_refresh_interval

History maintenance cadence.

loop

Whether the standalone command repeats.

scan_interval

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.

vault_ids: Optional[tuple[str, ...]]

Optional targeted vault IDs.

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

eth_defi.apex.config.ApexReaderConfig

__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
Return type

None