Questions tagged [starlette]

Questions about Starlette (a lightweight python ASGI framework/toolkit).

Starlette is a lightweight ASGI framework/toolkit, which is ideal for building high performance asyncio services.

https://www.starlette.io

259 questions
0
votes
1 answer

Send data via websocket from synchronous iterator in Starlette

I have a synchronous iterator, that comes from third party package. The iterator queries external service and yields some data. If there is no data, the iterator waits for it. I subclassed the WebSocketEndpoint from Starlette to send the new data…
Djent
  • 2,877
  • 10
  • 41
  • 66
0
votes
2 answers

FastAPI websocket can not connect

I am trying to let my Vue.js app communicate with my FastAPI(based on starlette) local server using websockets. I tried using the exact same code as in their example: https://fastapi.tiangolo.com/tutorial/websockets/. However something weird…
Simon
  • 2,328
  • 6
  • 26
  • 30
-3
votes
1 answer

Custom exceptions in python starlette

I am trying to raise the custom exception using the starlette framework in python. I have the API call which checks some condtions depends on the result, it should raise exception. I have two files app.py and error.py #app.py from…
lokesh
  • 27
  • 2
-5
votes
3 answers

How to get defined route paths in FastAPI?

I have my FastAPI app define in server.py app = FastAPI( debug=True, title="Microservice for APIs", description="REST APIs", version="0.0.1", openapi_url="/v3/api-docs", middleware=[ Middleware(AuthorizationMiddleware, authorizor=Auth()) ]) In…
Darshan
  • 352
  • 8
  • 24
1 2 3
17
18