.ini file load environment variable

后端 未结 2 1771
长情又很酷
长情又很酷 2021-02-12 09:46

I am using Alembic for migrations implementation in a Flask project. There is a alembic.ini file where the database configs must be specified:

2条回答
  •  孤城傲影
    2021-02-12 10:28

    I've solved the problem by setting sqlalchemy.url in env.py as @dirn suggested.

    config.set_main_option('sqlalchemy.url', ) did the trick, where can be loaded from environment or config file.

提交回复
热议问题