main.py 文件源码

python
阅读 20 收藏 0 点赞 0 评论 0

项目:deploy 作者: datahq 项目源码 文件源码
def __init__(self, configfile='.env'):
        '''Initialize.

        @param: configfile a .env style config file. See README for more.
        '''
        if os.path.exists(configfile):
            # we set ourselves as load_dotenv has system env variables to take
            # precedence which in our experience is confusing as a user changes a
            # var and re-runs and nothing happens
            # dotenv.load_dotenv('.env')
            out = dotenv.main.dotenv_values(configfile)
            # we need stuff in the environment for docker
            os.environ.update(out)
        self.config = os.environ
        rds_uri = self.config.get('RDS_URI')
        if not rds_uri:
            print('Warning: RDS_URI is not set. please set, or run `python main.py rds`')
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号