generated from dopt-python/py311
31 lines
837 B
Python
31 lines
837 B
Python
from pathlib import Path
|
|
from typing import Final
|
|
|
|
from dopt_basics import configs
|
|
from dopt_basics import io as io_
|
|
|
|
LIB_PATH: Final[Path] = Path(__file__).parent
|
|
|
|
# // database connections
|
|
p_cfg = io_.search_file_iterative(
|
|
starting_path=LIB_PATH,
|
|
glob_pattern="CRED*.toml",
|
|
stop_folder_name="umbreit-py",
|
|
)
|
|
if p_cfg is None:
|
|
raise FileNotFoundError("Config was not found")
|
|
|
|
CFG = configs.load_toml(p_cfg)
|
|
HOST = CFG["server"]["host"]
|
|
PORT = CFG["server"]["port"]
|
|
SERVICE = CFG["server"]["service"]
|
|
USER_NAME = CFG["user"]["name"]
|
|
USER_PASS = CFG["user"]["pass"]
|
|
|
|
# TODO remove or change
|
|
# ** Oracle client libs
|
|
USE_THICK_MODE: Final[bool] = False
|
|
P_ORACLE_CLIENT_LIBS = Path(r"C:\Databases\Oracle\instantclient_19_29")
|
|
assert P_ORACLE_CLIENT_LIBS.exists(), "Client libs not found"
|
|
assert P_ORACLE_CLIENT_LIBS.is_dir()
|