📜  如何卸载 python-dotenv - Python 代码示例

📅  最后修改于: 2022-03-11 14:46:40.604000             🧑  作者: Mango

代码示例1
import os
from pathlib import Path
from dotenv import load_dotenv

# Get the base directory
basepath = Path()
basedir = str(basepath.cwd())
# Load the environment variables
envars = basepath.cwd() / '.env'
load_dotenv(envars)
# Read an environment variable.
SECRET_KEY = os.getenv('SECRET_KEY')