Spaces:
No application file
No application file
File size: 464 Bytes
b043e7b | 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 | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
from api import api
from config import Config
from console import console
from webui import webui
def run():
"""Run the program."""
cfg = Config()
mode = cfg.mode
if mode == 'console':
console(cfg)
elif mode == 'api':
api(cfg)
elif mode == 'webui':
webui(cfg)
else:
raise ValueError('mode must be console or api')
if __name__ == '__main__':
run()
|