Exemplo n.º 1
0
from flask import Flask, jsonify
from mongodb import connector as mongo_connector

app = Flask(__name__)
mongo_connector.connect()


@app.route('/health-check')
def health_check():
    return jsonify({"message": "I'm alive."})
Exemplo n.º 2
0
 def create(self, init_player):
     return connector.connect().PlayerIo.factory(init_player)
Exemplo n.º 3
0
 def read(self, filter=None):
     if not filter:
         return connector.connect().PlayerIo.find()
     this = filter.where()
     return connector.connect().PlayerIo.find(this)
Exemplo n.º 4
0
 def factory(init_player):
     p = connector.connect().PlayerIo()
     for key, value in init_player.iteritems():
         p[key] = value
     p.save()
     return p