flask_injector
flask_injector copied to clipboard
Adds Injector support to Flask.
The `request` scope name directly clashes with the global `request` variable in Flask. Even when using the `injector`-style approach and injecting `flask.Request` into your handlers/services, the developer might still want...
# How to reproduce: `test_app.py`: ```python import connexion from connexion.resolver import RestyResolver from flask_injector import FlaskInjector app = connexion.App(__name__) app.add_api( { 'swagger': '2.0', 'info': { 'version': '1.0.0', 'title': 'Test Service',...
When using flask's own MethodView with flask injector, the app fails with the error: ``` Traceback (most recent call last): File "/Users/jacksontoomey1/.virtualenvs/rooster-d4LzYqiE/lib/python3.7/site-packages/flask_injector.py", line 101, in wrap_class_based_view class_kwargs = fun_closure['class_kwargs'] KeyError:...
Thanks for this project. I'm evaluating this as a way of managing dependencies in this large flask application I'm refactoring. How would one manage cleanup of threadlocals, when you have...