Dalsi banky, prehled ve Swaggeru, /status a prazdne promenne
- zdroje rb, unicredit a air - nahore ve Swaggeru prehled nabizenych a nenabizenych bank s duvody - GET /status s prehledem vypadku stahovani u jednotlivych bank - prazdna promenna prostredi znamena vychozi hodnotu - popis stahovani v documentation/stahovani.md
This commit is contained in:
+7
-1
@@ -1,10 +1,12 @@
|
||||
"""Shared building blocks of the source parsers."""
|
||||
|
||||
from collections.abc import Callable
|
||||
from collections.abc import Awaitable, Callable
|
||||
from dataclasses import dataclass
|
||||
from typing import Any
|
||||
from zoneinfo import ZoneInfo
|
||||
|
||||
import httpx
|
||||
|
||||
from app.models import Origin, ParsedRates, Rate
|
||||
|
||||
# Dividing by the quoted amount (for example 100 JPY) must not lose precision
|
||||
@@ -23,6 +25,10 @@ class Source:
|
||||
parse: Callable[[str], ParsedRates]
|
||||
# When set, the source is requested with POST and this JSON body instead of GET.
|
||||
request_json: dict[str, Any] | None = None
|
||||
# When set, replaces the single request, for sources that need several of them.
|
||||
fetch: Callable[[httpx.AsyncClient], Awaitable[str]] | None = None
|
||||
# Shown in the API documentation when consumers should know something about the source.
|
||||
note: str | None = None
|
||||
|
||||
|
||||
def parse_comma_decimal(value: str) -> float:
|
||||
|
||||
Reference in New Issue
Block a user