python (65.1k questions)
javascript (44.2k questions)
reactjs (22.7k questions)
java (20.8k questions)
c# (17.4k questions)
html (16.3k questions)
r (13.7k questions)
android (12.9k questions)
How to update response schema in swagger for all endpoints after modifying response at middleware level in a FastAPI Application?
So, I have created a Custom Middleware for my big FastAPI Application, which alters responses from all of my endpoints this way:
Response model is different for all APIs. However, my MDW adds meta dat...
raghavsikaria
Votes: 0
Answers: 1
How to modify the content-length post modification of response in a middleware in FastAPI?
Example Code:
# Here is a minimal reproducible example
import json
from starlette.datastructures import MutableHeaders
from starlette.types import ASGIApp, Receive, Scope, Send, Message
import dateti...
raghavsikaria
Votes: 0
Answers: 1
understanding Starlette authentication
I'm trying to build a login page for a web application.
As documented here: https://www.starlette.io/authentication/ I have the following:
class BasicAuthBackend(AuthenticationBackend):
async def ...
Yonatan
Votes: 0
Answers: 0
Sending Notifications to certain clients using Server Sent Events in FastApi?
I have been working with server sent events to send out certain type of notifications to only certain clients. I am using the module called sse-starlette to try and achieve this.
I am fairly new to Fa...
otaku_weeb
Votes: 0
Answers: 1