一,启动shell
$ source venv/bin/activate
((venv) ) [lhdop@blog enterprise_library_api]$ flask shell
二,执行函数
>>> from app.jobs.util import import_china_city
>>> import_china_city()
三,退出shell
>>> exit()
((venv) ) [lhdop@blog enterprise_library_api]$
$ source venv/bin/activate
((venv) ) [lhdop@blog enterprise_library_api]$ flask shell
>>> from app.jobs.util import import_china_city
>>> import_china_city()
>>> exit()
((venv) ) [lhdop@blog enterprise_library_api]$