Skip to content

Commit cb79329

Browse files
committed
doc: how to easily migrate from Flask-RESPlus
Adding documentation on how to migrate from Flask-RESTPlus to Flask-RESTX. I also added a note about the fork.
1 parent b47600e commit cb79329

File tree

2 files changed

+41
-2
lines changed

2 files changed

+41
-2
lines changed

doc/index.rst

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,19 +4,36 @@
44
contain the root `toctree` directive.
55
66
Welcome to Flask-RESTX's documentation!
7-
==========================================
7+
=======================================
88

99
Flask-RESTX is an extension for Flask that adds support for quickly building REST APIs.
1010
Flask-RESTX encourages best practices with minimal setup.
1111
If you are familiar with Flask, Flask-RESTX should be easy to pick up.
1212
It provides a coherent collection of decorators and tools to describe your API
1313
and expose its documentation properly (using Swagger).
1414

15+
Flask-RESTX is a community driven fork of `Flask-RESTPlus
16+
<https://github.com/noirbizarre/flask-restplus>`_
17+
18+
19+
Why did we fork?
20+
================
21+
22+
The community has decided to fork the project due to lack of response from the
23+
original author @noirbizarre. We have been discussing this eventuality for
24+
almost `a long time <https://github.com/noirbizarre/flask-restplus/issues/593>`_.
25+
26+
Things evolved a bit since that discussion and a few of us have been granted
27+
maintainers access to the github project, but only the original author has
28+
access rights on the PyPi project. As such, we been unable to make any actual
29+
releases. To prevent this project from dying out, we have forked it to continue
30+
development and to support our users.
31+
1532

1633
Compatibility
1734
=============
1835

19-
flask-restx requires Python 2.7+.
36+
flask-restx requires Python 2.7+ or 3.4+.
2037

2138

2239
Installation

doc/quickstart.rst

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,28 @@ and that you have already installed both Flask and Flask-RESTX.
1010
If not, then follow the steps in the :ref:`installation` section.
1111

1212

13+
Migrate from Flask-RESTPlus
14+
---------------------------
15+
16+
.. warning:: The *migration* commands provided bellow are here for the illustration.
17+
You may need to adapt them to properly fit your needs.
18+
We also recommend you make a backup of your project prior running them.
19+
20+
At this point, Flask-RESTX remains 100% compatible with Flask-RESTPlus' API.
21+
All you need to do is update your requirements to use Flask-RESTX instead of
22+
Flask-RESTPlus. Then you need to update all your imports.
23+
This can be done using something like:
24+
25+
::
26+
find . -type f -name "*.py" | xargs sed -i "s/flask_restplus/flask_restx/g"
27+
28+
Finally, you will need to update your configuration options (described `here
29+
<quickstart.html#configuration>`_). Example:
30+
31+
::
32+
find . -type f -name "*.py" | xargs sed -i "s/RESTPLUS_/RESTX_/g"
33+
34+
1335
Initialization
1436
--------------
1537

0 commit comments

Comments
 (0)