#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ # @Version : Python 3.11.4 # @Software : Sublime Text 4 # @Author : StudentCWZ # @Email : StudentCWZ@outlook.com # @Date : 2023/11/21 10:51 # @File : init_dotenv.py # @Description : """ import os from dotenv import load_dotenv def init_dotenv() -> None: """ Initialize the dotenv extension :return: None """ root_path = os.path.abspath(os.path.dirname(__file__)).split('extensions')[0] flask_env_path = os.path.join(root_path, '.flaskenv') if os.path.exists(flask_env_path): load_dotenv(flask_env_path)