hydromodpy.core.io.http_client#
Unified HTTP client for HydroModPy data sources.
Single entry point used by every remote data provider (Hub’Eau, BRGM, IGN, Meteo-France / GeoSAS). Features:
persistent
requests.Sessionexponential backoff with jitter
honors
Retry-Afterheader (seconds or HTTP-date)configurable default timeout
simple per-host token bucket to cap concurrent requests
stream()yields chunks while computing a SHA-256 digestget_json()optionally validates the payload against a Pydantic modelpre/post request hooks for instrumentation
The client raises hydromodpy.core.exceptions.NetworkError when the
server returns a non-recoverable status after all retry attempts, and
hydromodpy.core.exceptions.DataSourceError for payload validation
failures.
Functions
|
Module-level singleton used by data providers that do not own a client. |
Classes
|
Unified HTTP client with backoff + streaming SHA-256. |
|
Result of |