data-xexe/xexe/constants.py

22 lines
641 B
Python
Raw Normal View History

2024-06-03 18:37:17 +02:00
import pathlib
from dataclasses import dataclass
from money.currency import Currency
2024-06-12 17:36:33 +02:00
from xexe.rate_fetching import MockRateFetcher, XERateFetcher
DEFAULT_CURRENCIES = {Currency("EUR"), Currency("GBP"), Currency("USD")}
2024-06-12 17:36:33 +02:00
RATES_SOURCES = {"mock": MockRateFetcher, "xe": XERateFetcher}
2024-06-12 18:20:55 +02:00
DWH_SCHEMA = "sync_xedotcom_currency_rates"
DWH_TABLE = "exchange_rates"
2024-06-03 18:37:17 +02:00
@dataclass
class PATHS:
logging_file: pathlib.Path = pathlib.Path("xexe.log")
2024-06-06 17:12:31 +02:00
# Expand user is important. It will replace the user and give you the full
# path. Stuff breaks without it.
dot_env_file_path: pathlib.Path = pathlib.Path("~/.xexe/.env").expanduser()