umstrukturierung
This commit is contained in:
parent
25e406ed8c
commit
98451284d7
14 changed files with 138 additions and 139 deletions
0
API/__init__.py
Normal file
0
API/__init__.py
Normal file
|
|
@ -5,7 +5,7 @@ Created on 29.01.2014
|
|||
'''
|
||||
from sys import stderr
|
||||
from socket import gethostname
|
||||
from config import Config
|
||||
from Config.config import Config
|
||||
from datetime import datetime
|
||||
from flask import abort
|
||||
|
||||
|
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 1.1 KiB |
|
|
@ -8,7 +8,7 @@ Created on 24.10.2013
|
|||
from datetime import datetime
|
||||
from flask import Flask, jsonify, make_response, request
|
||||
from socket import gethostname
|
||||
from config import Config
|
||||
from Config.config import Config
|
||||
from ems import ems
|
||||
from buffer import Buffer
|
||||
|
||||
|
|
@ -29,14 +29,14 @@ class Request(object):
|
|||
self.id = req_id
|
||||
|
||||
|
||||
def API_start():
|
||||
api = API()
|
||||
print 'API-Thread:\t%s\n' % api
|
||||
def REST_start():
|
||||
api = REST()
|
||||
print 'REST-Thread:\t%s\n' % api
|
||||
api.app.run(host = conf['flask_server'],
|
||||
port = int(conf['flask_port']))
|
||||
#debug = conf['flask_debug']
|
||||
|
||||
class API(object):
|
||||
class REST(object):
|
||||
|
||||
def __init__(self):
|
||||
self.app = Flask(__name__)
|
||||
0
Config/__init__.py
Normal file
0
Config/__init__.py
Normal file
0
Swich/__init__.py
Normal file
0
Swich/__init__.py
Normal file
|
|
@ -7,7 +7,7 @@ Created on 15.11.2013
|
|||
from threading import Thread
|
||||
from Queue import Queue
|
||||
from time import sleep
|
||||
from config import Config
|
||||
from Config.config import Config
|
||||
|
||||
#import Module
|
||||
import database
|
||||
|
|
@ -5,10 +5,9 @@ Created on 15.11.2013
|
|||
@version: 0.02
|
||||
'''
|
||||
from threading import Thread
|
||||
from switch import Switch, MYSQL
|
||||
from config import Config
|
||||
from time import sleep
|
||||
#from API import Request
|
||||
from Swich.switch import Switch, MYSQL
|
||||
from Config.config import Config
|
||||
#from API.service import Request
|
||||
|
||||
### LOAD CONFIG ###
|
||||
c = Config()
|
||||
|
|
|
|||
|
|
@ -3,13 +3,13 @@ Created on 29.01.2014
|
|||
|
||||
@author: Philipp Rauch
|
||||
'''
|
||||
from config import Config
|
||||
from API import API_start
|
||||
from CANFilter import CAN_start
|
||||
from Config.config import Config
|
||||
from API.service import REST_start
|
||||
from CAN.Filter import CAN_start
|
||||
|
||||
### LOAD CONFIG ###
|
||||
c = Config()
|
||||
conf = c.readConf()
|
||||
|
||||
CAN_start(conf)
|
||||
API_start()
|
||||
REST_start()
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ Created on 21.11.2013
|
|||
'''
|
||||
# import CANFilter
|
||||
# import Sym2Lib
|
||||
from config import Config
|
||||
from Config.config import Config
|
||||
|
||||
### LOAD CONFIG ###
|
||||
c = Config()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue