当前仓库属于暂停状态,部分功能使用受限,详情请查阅 仓库状态说明
7 Star 9 Fork 1

pippo / netadmin-driver
暂停

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
main.py 899 Bytes
一键复制 编辑 原始数据 按行查看 历史
pippo 提交于 2017-12-12 11:30 . update config
from tornado.ioloop import IOLoop
from tornado.web import Application
from tornado.httpserver import HTTPServer
from tornado.options import define, options
from routers import router
# config
define("conf", help="Config File", type=str)
define("port", help='Ansible Web Port', type=int)
define("date_fmt", help='data time', type=str)
define("ssh_key_file", help='data time', type=str)
define("debug", help='debug on', type=bool)
class App(Application):
def __init__(self, debug=False):
settings = {
'debug': debug,
}
handles = router.init()
super(App, self).__init__(handles, **settings)
if __name__ == "__main__":
options.parse_command_line()
options.parse_config_file('conf/%s.conf' % options.conf)
app = App(debug=options.debug)
http_server = HTTPServer(app)
http_server.listen(options.port)
IOLoop.instance().start()
Python
1
https://gitee.com/pippozq/netadmin-driver.git
git@gitee.com:pippozq/netadmin-driver.git
pippozq
netadmin-driver
netadmin-driver
master

搜索帮助