-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmanage.py
More file actions
27 lines (19 loc) · 697 Bytes
/
manage.py
File metadata and controls
27 lines (19 loc) · 697 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
import os
import sys
import logging
from flask.cli import FlaskGroup
import btcopilot
# flask still reads the deprecated FLASK_ENV and loads that config file.
# So just override it from our FLASK_CONFIG
if os.getenv("FLASK_CONFIG"):
os.environ["FLASK_ENV"] = os.getenv("FLASK_CONFIG")
app = btcopilot.create_app()
if __name__ == "__main__":
logging.getLogger().setLevel(logging.INFO)
logging.getLogger().addHandler(logging.StreamHandler(stream=sys.stdout))
logging.getLogger().info(
f"Usage: python manage.py --app btcopilot utils create-professional-annual-license"
)
# cli = FlaskGroup(create_app=btcopilot.create_app)
cli = FlaskGroup(app)
cli()