Monkey patches to keep flask-restx working with latest flask and werkzeug.
Project description
Restx-Monkey
Monkey patches for unmaintained flask-restx python package to keep your installation of flask-restx compatible with the latest flask and werkzeug.
Installation
To install restx_monkey, use pip:
pip install -U restx-monkey
Usage
Before importing flask-restx
apply all patches in your main module:
# app main file
import restx_monkey as monkey
monkey.patch_restx()
# after patch import other modules
import flask_restx
# your other code
or select which patches you do not want to apply
# app main file
import restx_monkey as monkey
monkey.patch_restx(fix_restx_api=False)
# after patch import other modules
import flask_restx
# your other code
What is patched?
Here is list of patches applied to flask-restx package by this monkey:
- replace_parse_rule - injects
parse_rule
method into werkzeug becauseflask-restx
is using this internal method - fix_restx_api - fix deprecated
flask-restx.api.Api
init ofdoc
endpoints after blueprint is bound - fix_restx_parser - replace failing
flask_restx.reqparse.Argument
class with child whom can correctly handlejson
location of argument inflask.Request
even in HTTPGET
callback - update_swagger_ui - replace failing
flask_restx.static
directory with the latest swagger UI
Goal of project
Keep flask-restx compatible with the latest flask and werkzeug as long as it is reasonable simple to monkey patch it.
What this project is not
This project does not solve incompatibilities of other python packages using flask-restx.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for restx_monkey-0.3.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | fd9d4eb5f90980b96c3bf55536eca4dc00bc905a906c12a8d7c3cbbfa397299f |
|
MD5 | 98fa01807523d1acadeb0e084bd53271 |
|
BLAKE2b-256 | 71c8b23cab870fc1c566ad479c28e471bacaf4add0c505673c017fb206b711c7 |