Questions tagged [flask-restplus]

Flask-RESTPlus is an extension for Flask that adds support for quickly building REST APIs documented with Swagger

Flask-RestPlus provide syntaxic suger, helpers and automatically generated Swagger documentation on top of Flask-Restful. It provides a bunch of decorators and helpers to quickly build documented and maintainable APIs with Flask.

Website: https://flask-restplus.readthedocs.io/

330 questions
0
votes
1 answer

Authorize button missing in Google App Engine swagger.json

I have a flask restplus api with swagger documentation generated. When I run the application locally, I am able to see the Authorize button in the swagger UI Localhost has Authorize button But when I deploy the same application on Google App…
Varunkumar Manohar
  • 887
  • 3
  • 11
  • 29
0
votes
0 answers

How to setup nginx config for flask app when flask has api object initialised with prefix parameter

I have flask app running using blueprint and api object initialised with prefix of api api = Api(_bp, catch_all_404s=True, prefix="/api", version=0.1, title="Clinical record management REST HTTP API's Gateway", descrition="REST…
Ciasto piekarz
  • 7,853
  • 18
  • 101
  • 197
0
votes
1 answer

Flask-Restplus cannot find any route

I just started using this library so please correct me if I'm saying something wrong. From my understanding, blueprint is kind of container for namespaces. For example I want to specify a blueprint for working with global objects (like…
mimic
  • 4,897
  • 7
  • 54
  • 93
0
votes
1 answer

Swagger API documentation and flask-restplus: How to represent an object with a key in the body of a request

I have this example of the parameter needed in the body of a PUT request to my API: { "id": "string", "closed_date": "2018-11-20T18:42:58.946Z", "contact": "string", "description": "string", "status": "Open" } To have it represented in…
MasterOfTheHouse
  • 1,164
  • 1
  • 14
  • 34
0
votes
1 answer

marshmallow EmbeddedDocument doesn't work

I made a simple board api with flask-restplus and mongoengie. Also use marshmallow for serialize data. Below code is now I worked. [model] class Article(Document): no = SequenceField() subject = StringField(required=True) content =…
Hide
  • 3,199
  • 7
  • 41
  • 83
0
votes
1 answer

Grouping namespaces

I was wondering whether the namespaces themselves can be grouped? Our REST server project has a highly decentralized structure (along the lines of a Redux fractal pattern) and every feature has its own namespace. This predictably has led to many…
Ojingo
  • 202
  • 2
  • 9
0
votes
0 answers

flask restplus works in my local docker images but doesn't in azure

i did my flask application using flask restplus, i try it locally using runserver.py and i can see my swagger api, i put it on a docker container exposing port 80 and i run it with -p 4000:80 and also works fine, but when i send the image to…
pelos
  • 1,744
  • 4
  • 24
  • 34
0
votes
1 answer

Importing multiple custom tensor2tensor Problems in Flask

In a flask_restplus API, I'm trying to infer from two tensor2tensor models which are being served on one server. Both these models are custom, so I am supplying t2t_usr_dir to the serving functions of tensor2tensor, such that the custom Problem…
0
votes
0 answers

Flask restplus SQL query output formatting

Using sqlplus inside python to generate SQL output. Running this via flaskplus, the formatting is lost i.e. the characters like \n,\t are not getting rendered. Tried different ways to fix this but din't help. 'print' works but 'return' doesn't work…
0
votes
1 answer

Gunicorn and flask-restplus response caching

I have flask-restplus based APIs in production/test environment with Gunicorn. The problem is if sometime an error comes it is handled well by error handling logic but when it is resolved I have to restart the Gunicorn manually. If I don't restart…
0
votes
1 answer

how to create a host field in the swagger.json that is generated via flask restplus with blueprint

I created a flask app as below. In local, I can see the Swagger UI; however, when deployed to a server, the Swagger UI is not available (kept getting an error "SCRIPT5009: SCRIPT5009: 'SwaggerUIBundle' is not defined"). It seems like the swagger is…
ebaik
  • 59
  • 4
0
votes
1 answer

AttributeError: 'NoneType' object has no attribute 'filename'. Flask-Restplus doesn't seem to recognize uploaded file as Filestorage object

I am trying to upload 2 files(an audio and image file) along with some data. I am very new to using Flask, but after reviewing other people with Filestorage issues, I am not sure what I am doing wrong. class FiguresResource(Resource): parser =…
0
votes
2 answers

How to get resource path in flask-RESTPlus?

I am fairly new at working with flask and flask-RESTPlus. I have the following and it is not clear how can I determine which path was used in the get request? ns = api.namespace('sample', description='get stuff') @ns.route( …
Frank C.
  • 7,758
  • 4
  • 35
  • 45
0
votes
2 answers

Python Flask API : How to send back selective columns from the resultset of a sqlalchemy join

I'm trying to do a simple code snippet to print the result of a 3 tables join query. I'm using python/flask-restplus/sqlalchemy Here is my example: class Users(db.Model): id = db.Column(db.Integer, db.Sequence('users_id_seq'), primary_key=True) …
0
votes
1 answer

flask restplus marshall self reference

I have model Category, which can have parent Category(self reference), so I can make hierarchy of categories. from project import db class Category(db.Model): __tablename__ = "categories" id = db.Column(db.Integer, primary_key=True,…