Questions tagged [flask-injector]

5 questions
2
votes
2 answers

FlaskInjector : Working outside of request context

I am building a flask webapp that communicates with another application through http requests. So I am trying to using dependency injection for the httpClient object. Here is the code class HttpClient(object): def __init__(self, host): …
2
votes
0 answers

FlaskInjector - RuntimeError: Working outside of request context with Flask==2.0.0 and Werkzeug==2.0.1

I met a problem with my Flask app because of module FlaskInjector (Flask-Injector==0.12.3) after upgrading Flask to 2.0.0 and Werkzeug to 2.0.1. But when downgrade Flask to 1.1.2 and Werkzeug to 1.0.1 my app can start. I do not understand clearly…
1
vote
1 answer

Deployed flask_injector dependent project to Lambda doesn't work

I'm trying to deploy a python project uses flask_restplus and flask_injector packages to AWS Lambda using Zappa project, but it doesn't work, it throws an error when I try to call the API gateway that Zappa automatically created for the project: …
Dabbas
  • 3,112
  • 7
  • 42
  • 75
1
vote
1 answer

Using Flask-Injector with Flask-restplus causes an error when calling the api resource

I'm trying to build an api using Flask-restplus and Flask-Flask-Injector. I searched and couldn't find an example on these two together. All examples are on Flask, not the restplus one. I tried to build using the following: `` from flask import…
Dabbas
  • 3,112
  • 7
  • 42
  • 75
0
votes
1 answer

FlaskInjector can´t handle class based view (MethodView)

I use FlaskInjector (0.14.0) and Flask==2.3.2 And when I do this setup in my app.py: app = create_app() FlaskInjector(app=app, modules=[configure]) app.run(port=8000, debug=app.config["DEVELOPMENT"]) I will get this error: Traceback (most recent…
Saurus
  • 13
  • 1
  • 3