Skip to content

Commit

Permalink
load .env
Browse files Browse the repository at this point in the history
  • Loading branch information
cmyui committed Nov 5, 2023
1 parent 5822e72 commit c99b1ee
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
1 change: 1 addition & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ protobuf==4.21.1
PyMySQL==1.0.2
pyparsing==3.0.9
pyrsistent==0.19.2
python-dotenv==1.0.0
six==1.16.0
tenacity==8.1.0
tomli==2.0.1
Expand Down
5 changes: 5 additions & 0 deletions settings.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,13 @@
import os

from dotenv import load_dotenv

load_dotenv()

DB_NAME = os.environ["DB_NAME"]
DB_HOST = os.environ["DB_HOST"]
DB_PORT = int(os.environ["DB_PORT"])
DB_PASS = os.environ["DB_PASS"]
DB_USER = os.environ["DB_USER"]

DISCORD_AC_WEBHOOK = os.environ["DISCORD_AC_WEBHOOK"]

0 comments on commit c99b1ee

Please sign in to comment.