Registry / web-framework / flask-restplus

flask-restplus

JSON →
library0.13.0pypypiunverified

Flask-RESTPlus is a Flask extension for building REST APIs with automatic Swagger documentation. Version 0.13.0 is the final release; the project is effectively in maintenance mode and superseded by Flask-RESTx. It offers request parsing, serialization, and Swagger UI generation.

pip install flask-restplus==0.13.0
INSTALL
IMPORT
SIG · FLASK-RESTPLUS
F
flask-restplus
web-frameworkpythonv0.13.0
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

Api
from flask_restplus import Api
from flask_restplus import Api

Basic setup with Flask-RESTPlus exposing a simple GET endpoint.

from flask import Flask from flask_restplus import Api, Resource app = Flask(__name__) api = Api(app) @api.route('/hello') class HelloWorld(Resource): def get(self): return {'hello': 'world'} if __name__ == '__main__': app.run(debug=True)
Debug
Known issues
breakingFlask-RESTPlus is no longer maintained. The successor is Flask-RESTx, which has breaking API changes (e.g., different decorators for Swagger).
fix
Migrate to flask-restx: replace imports from flask_restplus to flask_restx.
affects: >=0.13.0
deprecatedThe @api.param decorator is deprecated in later versions; use @api.expect with a parser.
fix
Define a RequestParser and use @api.expect(parser).
affects: <=0.13.0
gotchaAutomatic Swagger documentation relies on decorator order. Applying @api.response before @api.route can break docs.
fix
Always place @api.response after @api.route and the Resource class definition.
affects: all
Upgrade
Version history
0.13.0latest on PyPI · released Aug 12, 2019
Audit
Dependencies

No dependency data recorded yet.

Agent activity
17 hits · last 30 days
node
16
Resources
flask-restplus — pip install flask-restplus · libregistry