import json
from redisclient import redis_client
from flask import jsonify
from flask_classful import FlaskView
class IPEndpoint(FlaskView):
def post(self):
consumer = json.loads(redis_client.get('currentConsumer'))
consumer['Host'] = request.json['ip']
strconsumer = json.dumps(consumer)
redis_client.set('currentConsumer', strconsumer)