from api import server import random import time from multiprocessing import Process import requests import urllib from lib.MongoDB import MongoDB import base64 import numpy as np import subprocess logger = get_log() config = get_config() ResourceDB = MongoDB() ResourceDB.init("mongodb://*****:*****@121.40.82.87:15001", "resource", "display") def get_personal_info(name): return name @server.route('/personal/info/<name>', methods=['GET']) def PersonalInfo(name): if request.method == 'GET': status = 1 try: info = { 'ip': request.remote_addr, 'url': request.url, 'interface': "PersonalInfo"
import time from multiprocessing import Process import requests import urllib from lib.MongoDB import MongoDB import base64 import numpy as np import subprocess logger = get_log() config = get_config() mongodb = MongoDB() mongo_uri = "mongodb://{}:{}@{}:{}/resource".format( config['mongodb']['username'], config['mongodb']['password'], config['mongodb']['host'], config['mongodb']['port']) mongodb.init(mongo_uri, "resource", "display") def get_personal_course_info(name): return name @server.route('/course/query/<name>', methods=['GET']) def CourseQuery(name): if request.method == 'GET': status = 1 try: info = { 'ip': request.remote_addr, 'url': request.url, 'interface': "PersonalInfo"
from api import server import random import time from multiprocessing import Process import requests import urllib from lib.MongoDB import MongoDB import base64 import numpy as np import subprocess logger = get_log() config = get_config() mongodb = MongoDB() mongodb.init("resource", "display") def get_personal_course_info(name): return name @server.route('/course/query/<name>', methods=['GET']) def CourseQuery(name): if request.method == 'GET': status = 1 try: info = { 'ip': request.remote_addr, 'url': request.url, 'interface': "PersonalInfo"