# simulation of a robot

from flask import Flask, request, jsonify
import requests

url = 'http://localhost:50055/v1'

class RexRobot:
    def __init__(self, id):
        self.id = id

        requests.api.post(url + "/robots", json={'id': self.id})


RexRobot("1")

app = Flask(__name__)

@app.route('/api/hello', methods=['GET'])
def hello():
    print("Hallo, Welt!")
    return jsonify({'message': 'Hallo, Welt!'})

if __name__ == '__main__':
    app.run(debug=False)