Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
Akanksha Jain
@ankajain
Any suggestion or anything which I can check. I tried all the available options posted on google. But nothing is working
No error message nothing in the logs .
[2020-10-28 10:29:58 +0000] [1] [INFO] Starting gunicorn 20.0.4
[2020-10-28 10:29:58 +0000] [1] [INFO] Listening at: http://0.0.0.0:5001 (1)
[2020-10-28 10:29:58 +0000] [1] [INFO] Using worker: sync
[2020-10-28 10:29:58 +0000] [7] [INFO] Booting worker with pid: 7
[2020-10-28 10:42:04 +0000] [1] [CRITICAL] WORKER TIMEOUT (pid:7)
[2020-10-28 10:42:04 +0000] [8] [INFO] Booting worker with pid: 8
DockerFile config

FROM python:3.8-slim-buster

EXPOSE 5001

ENV PYTHONDONTWRITEBYTECODE=1
ENV PYTHONUNBUFFERED=1

ADD requirements.txt .
RUN python -m pip install -r requirements.txt

WORKDIR /app
ADD . /app

RUN useradd appuser && chown -R appuser /app
USER appuser

CMD ["gunicorn", "--bind", "0.0.0.0:5001", "app:app"]

Akanksha Jain
@ankajain
requirement file only having this
flask==1.1.2
gunicorn==20.0.4
flask-restplus==0.13.0
Any help please.
Ugur B.
@ayakzob
hi,
when do we need to register/create a model through a Namespace and not through an API? I only use models with the marshal_with decorator and it takes the instance as the argument. Are we require to register the model first to be able to use it in the decorator?
Henshal B
@henshalb
is there any option to add tags for flask-restplus, swagger docs?
realburi
@realburi
Hi guys
is there an opposite function of flask_resplus.abort
tankeryang
@tankeryang
@henshalb use Namespace
Narate Pokasub
@narate.pokasub_gitlab
I try to use flask_limit with flask_resplus. So anyone can suggest the example or document that support namespace
Balaji
@bala4604
I tried to implement my flask-restplus program but i couldn't even access restplus import and throwing the following error
Traceback (most recent call last):
File "D:\crudapi\app.py", line 2, in <module>
from flask_restplus import Api
File "D:\crudapi\venv\lib\site-packages\flask_restplus__init.py", line 4, in <module>
from . import fields, reqparse, apidoc, inputs, cors
File "D:\crudapi\venv\lib\site-packages\flask_restplus\fields.py", line 17, in <module>
from werkzeug import cached_property
ImportError: cannot import name 'cached_property' from 'werkzeug' (D:\crudapi\venv\lib\site-packages\werkzeug\
init__.py)
pip freeze
aniso8601==9.0.1
attrs==21.2.0
click==8.0.1
colorama==0.4.4
Flask==2.0.1
flask-restplus==0.13.0
itsdangerous==2.0.1
Jinja2==3.0.1
jsonschema==3.2.0
MarkupSafe==2.0.1
pyrsistent==0.17.3
pytz==2021.1
six==1.16.0
Werkzeug==2.0.1
Anyone help me to solve the issue
Anik Chowdhury
@nikitow1
Screenshot 2021-06-02 at 10.53.32 AM.png
I am newbie in flask and flask rest api. Can anyone suggest how to implement this dropdown like this in swagger?
Henshal B
@henshalb:matrix.org
[m]
@bala4604: you've to activate the virtual environment first
Or downgrade Werkzeug
Or switch to flask restx
MiguelMachadoCodeone
@MiguelMachadoCodeone
Hello, is possible to configure fields with required tag to not accept empty values?
fields.String(required=True)
Giacomo Gritzan
@ggritzan_gitlab
Hello everyone, I am trying to export the swagger.json file for my flask-restplus api to generate a corresponding api-client via swagger-codegen. In the documentation there is a command how to export the schema of the api but not where to place this export. Can anyone tell me the best place to place the export?
Drei Quevada
@dreiq-codev
Hello everyone. This might be trivial to some but has anyone implemented a stable implementation to filter model fields that we only want to use, let's say from a page? For example, I have a flask model (SQLAlchemy) of Person with fields: name, age, birthdate, group . I would like to send a request that has a params data for the fields that I only want to get from a Person model (e.g. name and group). It's easy to implement for unnested fields but for example, I further want to specify the fields that I want for the group field (e.g. I only want the group ID). I'm not asking for a code, rather a stable structure/architecture on how to implement this. Thank you for the help!