Last active
April 7, 2025 08:56
-
-
Save MirasSafadi/b710726df564c064d533a2f9ca886b4a to your computer and use it in GitHub Desktop.
Using secrets in a Python app
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os | |
from dotenv import load_dotenv | |
import constants | |
load_dotenv() | |
DB_USERNAME = os.getenv(constants.DB_USERNAME) | |
DB_PASSWORD = os.getenv(constants.DB_PASSWORD) | |
IS_DEBUG = os.getenv(constants.IS_DEBUG, constants.FALSE).lower() == constants.TRUE.lower() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment