From 41f0b572750aaf9e91df8c503b50b0e25b5efbec Mon Sep 17 00:00:00 2001 From: Alexander Hosking Date: Mon, 9 Jan 2023 00:40:23 -0500 Subject: [PATCH] Try again with dotenv --- gmail/email_count.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/gmail/email_count.py b/gmail/email_count.py index d41773c..ed0b89e 100644 --- a/gmail/email_count.py +++ b/gmail/email_count.py @@ -8,15 +8,18 @@ from dotenv import load_dotenv, dotenv_values load_dotenv() dotenv_file = os.path.realpath(os.path.dirname(__file__)) + "/.env" -print(dotenv_file) config = dotenv_values(dotenv_file) EMAIL_ACCOUNTS = json.loads(os.environ.get("MAIL_ACCOUNTS")) EMAIL_PASSWORDS = json.loads(os.environ.get("MAIL_PASSWORDS")) + +# print() +# print(config['DB_URL']) +# print() # using zip() # to convert lists to dictionary accounts = dict(zip(EMAIL_ACCOUNTS, EMAIL_PASSWORDS)) -print(accounts) +# print(accounts) # Influx DB client = influxdb_client.InfluxDBClient(