Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • 07:29
    awemulya commented #213
  • 07:00

    github-actions[bot] on master

    📝 Update release notes (compare)

  • 05:36
    github-actions[bot] commented #2443
  • 05:34
    codecov[bot] commented #2443
  • 05:34
    codecov[bot] commented #2443
  • 05:32
    codecov[bot] commented #2443
  • 05:32
    codecov[bot] commented #2443
  • 05:32
    waynerv synchronize #2443
  • 01:51
    PriyatamNayak commented #1718
  • 01:39
    Mickls edited #2456
  • 01:37
    Mickls opened #2456
  • 01:37
    Mickls labeled #2456
  • 01:06
    dstlny commented #2448
  • 00:51
    dstlny commented #2448
  • 00:51
    dstlny commented #2448
  • 00:28
    Bill-Lathrop commented #2448
  • 00:26
    Bill-Lathrop commented #2448
  • Dec 01 23:44
    github-actions[bot] commented #2431
  • Dec 01 23:43
    tricosmo commented #2431
  • Dec 01 23:43
    codecov[bot] commented #2431
Ak4zh
@Ak4zh
Can anyone help me deploy https://github.com/long2ice/fastapi-admin frontend and backend on a single heroku app.
Valon Januzaj
@vjanz
@ruselljane please format your snipet..
Ak4zh
@Ak4zh

Can anyone help me deploy https://github.com/long2ice/fastapi-admin frontend and backend on a single heroku app.
Yarn build is creating the files inside /dist but my fastapi is trying to access "GET /js/app.2e733260.js HTTP/1.1" 404 and getting 404

I did app.mount("/dist", StaticFiles(directory="dist"))

David Baldo
@baldodavi_gitlab
Hi all, using openapi_url and proxy my fastapi docker container behind a nginx server my apis are correctly available and openapi.json is also available at https://address/subaddress/api/v1/openapi.json. https://address/subaddress/docs give me following error:
Fetch error NetworkError when attempting to fetch resource. /api/v1/openapi.json
What's wrong ?
David Baldo
@baldodavi_gitlab

Hi all, using openapi_url and proxy my fastapi docker container behind a nginx server my apis are correctly available and openapi.json is also available at https://address/subaddress/api/v1/openapi.json. https://address/subaddress/docs give me following error:
Fetch error NetworkError when attempting to fetch resource. /api/v1/openapi.json
What's wrong ?

Solved using openapi_prefix="/subaddress", docs is available.
Perhaps I've another issue: when trying to use autheticate to access to protected routes in /docs page i've the following error: auth errorTypeError: NetworkError when attempting to fetch resource.
Any advice? Thanks in advance!

Steven Garcia
@sjosegarcia
I was wondering if anyone solved how to convert sqlalchemy records into pydantic models.
ruselljane
@ruselljane
thank you @eseglem , did conda install uvicorn.
Darren Eberly
@Cleptomania
Does anyone know if there is a way to exclude a router from docs?
Pedro
@phaltoe85_twitter

Hi guys, beginner here, I am wondering if anyone can help me with this:

def get_address_from_latitude_and_longitude(latlng: Tuple[float, float]):

I am getting this:
AssertionError: Path params must be of one of the supported types

Carlo Mazzaferro
@carlomazzaferro
Hi all, QQ: the /openapi.json endpoint does not contain the example section https://swagger.io/docs/specification/adding-examples/ in the ['endpoint_name']['schema']['requestBody'], however my FastAPI endpoint clearly has a generated one in the Swagger. How can I get it? Need to programmatically fetch it
@phaltoe85_twitter Tuples are not supported by the OpenAPI spec: tiangolo/fastapi#466 , ran into this recently as well :)
Pedro
@phaltoe85_twitter
thanks @carlomazzaferro!
Carlo Mazzaferro
@carlomazzaferro
@Cleptomania not sure if it fits your needs but https://fastapi.tiangolo.com/advanced/path-operation-advanced-configuration/#exclude-from-openapi you can exclude a certain path
Just to note, my models are dynamically generated so I can't manually set the schema_extra in my pydantic models
sreemol-s
@sreemol-s
hi
Valon Januzaj
@vjanz
Guys, how do you ignore alembic directory from mypy?
Andreas Franzén
@triptec
@vjanz ```
[mypy-app.tests.*]
ignore_errors = True
but change the .tests. to .alembic. perhaps
Valon Januzaj
@vjanz
So the tests in this case refers to the directory right
Andreas Franzén
@triptec
yeah
Valon Januzaj
@vjanz
Yes let me try, thank you!
Andreas Franzén
@triptec
actually app.tests represent dirs
so I have app/tests
Valon Januzaj
@vjanz
In my case mypy-src.alembic
Thank you man :)
Andreas Franzén
@triptec
np
Jan Kesten
@janobug_gitlab
Hi there - maybe a noob question: is it normal that an uvicorn started fastapi does only use a singe cpu core?
Timothée Mazzucotelli
@pawamoy
Hi there - weird question on my end... can I run fastapi synchronously? I need to deploy a web service that will handle only one request at a time (to prevent data corruption on disk). I could use another api framework but it would be so much simpler with fastapi/pydantic. Maybe I can just run it through a wsgi server like gunicorn, with a single process?
Nicolas Gilles
@ngilles
@pawamoy that will not solve your problem, if you want to make sure only one request is running at a time, use a lock
Jan Kesten
@janobug_gitlab
I tried different combinations, but what ever I do - one cpu core is 100% busy and the other one just idle. Is that by design?
I saw that I could start uvicorn with --workers - but as I need some huge in memory data structure, this leads to high memory pressure which I would like to avoid.
flapili
@flapili
The ram is cheap in 2020, if you are in a working context explain to your boss the time to learn and use https://docs.python.org/fr/3.8/library/mmap.html is not worse at all
Jan Kesten
@janobug_gitlab
I know mmap - which is what came to my mind already (as old c hacker). But I was wondering if it is 'right' that only one core is used. As for the ram, this is a private project - but data volume is quite huge anyway. I tried some in memory data grid - but it blows up the needed memory too much. Right now it's a numpy array.
Daniel Lassahn
@meteoDaniel
Dear all, I am having a problem with nested asynchronous functions. I receive the well known Message: RuntimeError: This event loop is already running. By adding nest_asyncio.apply() my test's are running but on production the api runs with uvicorn and it does not work anymore. This is because nest_asyncio does not support uvloop. I hope anyone knows the right work around.
Daniel Lassahn
@meteoDaniel

Dear all, I am having a problem with nested asynchronous functions. I receive the well known Message: RuntimeError: This event loop is already running. By adding nest_asyncio.apply() my test's are running but on production the api runs with uvicorn and it does not work anymore. This is because nest_asyncio does not support uvloop. I hope anyone knows the right work around.

I solved this issue by using hypercorn!

Noah
@LoopsGod
hi
I am using SqlAlchemy with db: Session dependency injected
But i keep hitting pool limits
It appears as though it's recreating / adding a new pool on every request
I see this: DEBUG:sqlalchemy.pool.impl.QueuePool:Created new connection <pymysql.connections.Connection object at 0x11e067b50>
on every request
And my application gets stuck upon too many connections
Takashi Futada
@Tafutada_twitter
@janobug_gitlab my understanding is like Node.js, people choose Fast API over Flask or Django, if the app are not CPU bound, just delegating requests to back end services, i.e. I/O bound. Instead if it's CPU bound like training ML models with TensorFlow or something, Fast API async does not make scense.
fastapi-bridge
@fastapi-bridge
[telegram] <THORTHEKINGOFTHUNDER1> https://t.me/joinchat/AAAAAFXzjjgEQ78RfDLOZg
Ryan
@RyanDurk
Not mentioned in the docs: do Query variables have to be a type str? int isn't working. The docs do have an example of float though.
techxonia
@techxonia
delete_objects.png
Follow same things. But get error "An error occurred (NotImplemented) when calling the DeleteObjects operation: Unknown"
What might be the problem? Can anyone tell me the issue that i have?
Jesus Copado Espejo
@jesusce94
Has anyone ever worked with FastAPI using SSE? I'm trying to create a notification system using Server-sent events, although I am not sure how could I implement this
Louis Cha
@LouisJHC
Hi guys! Im trying to migrate AWS lambda and backend APIs to FastAPI + Mangum (Mangum works as an adapter for ASGI applications like the ones you can create with fastAPI so that they can send and receive information from API Gateway to Lambda and vice versa.)