Added loading api params from dotenv file

This commit is contained in:
counterweight 2023-08-02 19:42:43 +02:00
parent fc7e6665a0
commit 819707af10
Signed by: counterweight
GPG key ID: 883EDBAA726BD96C
4 changed files with 32 additions and 2 deletions

View file

@ -1,4 +1,15 @@
from pathlib import Path
from dotenv import dotenv_values
from woocommerce import API
API_CONFIG = dotenv_values(
dotenv_path=Path.home() / Path(".camisatoshi-wordpress-reports/.env")
)
def check_health(url: str):
print(
f"Ehem... Yeah... so... I've definitely checked {url}... I just don't remember clearly if it was alive or what..."
)
)
print(Path("~/.camisatoshi-wordpress-reports/.env"))
print(f"By the way, I found this: {API_CONFIG}")