flask-restx

How to pass a parameter from client side to server in python

How to pass a parameter from client side to server in python Question: I am using flask and flask-restx try to create a protocol to get a specific string from another service. I am wonder if there is a way I can pass the parameter from another function to server side. For example, here’s my …

Total answers: 2

Python, Mqtt : can publish but can't receive message on docker

Python, Mqtt : can publish but can't receive message on docker Question: I’m running two dockers : one for the mqtt server using mosquitto the other using flask_mqtt the flask container is receiving the CONNACK and is sending the subscribe to the broker but never get any SUBACK however it manages to publish hello word …

Total answers: 1

ImportError: cannot import name 'parse_rule' from 'werkzeug.routing'

ImportError: cannot import name 'parse_rule' from 'werkzeug.routing' Question: I got the following message after running my Flask project on another system. The application ran all the time without problems: Error: While importing ‘app’, an ImportError was raised: Traceback (most recent call last): File "c:usersUserappdatalocalprogramspythonpython39libsite-packagesflaskcli.py", line 214, in locate_app __import__(module_name) File "C:UsersUserDesktopProjektapp__init__.py", line 3, in <module> …

Total answers: 4

Flask-Restx not converting enum field type to JSON

Flask-Restx not converting enum field type to JSON Question: I need help with Enum field type as it is not accepted by Swagger and I am getting error message **TypeError: Object or Type eGameLevel is not JSON serializable**. Below is the complete set of code for table. Complete set of code with DB table and …

Total answers: 3

How to return a nested json response in Flask-Restx

How to return a nested json response in Flask-Restx Question: I am trying to make an API with Flask-RestX that can show a response like this, { "id": 1, "msg": "How are things", "score": 345, "additional": { "goal": 56, "title": "ASking how" } } when data is like this (In my case, I do not …

Total answers: 2