Questions tagged [fastapi]
FastAPI is a modern, fast (high-performance), web framework for building APIs with Python 3.6+ based on standard Python type hints.
fastapi
7,105
questions
0
votes
1
answer
14
views
FastAPI add Tags to APIRouter
How do you look at such a solution?:
user_router = APIRouter(
prefix="/user", tags=["users"]
)
user_router.tags_metadata = [
{
"name": "users",
...
0
votes
0
answers
33
views
Unable to upload images to S3 using boto3
I am using fastapi to upload images to my s3 bucket. first i tried presigned url method to upload images from postman and it is working fine. But when i try to directly upload image(size ~7kb) from ...
0
votes
1
answer
32
views
How do I write a test with the FastAPI framework which uses a fake implementation of some object which itself must exist for the lifespan of the app?
I am trying to write some FastAPI tests.
To be more specific, I am trying to write tests which tests the FastAPI endpoints which I have defined. (In the FastAPI docs endpoints are refered to as "...
0
votes
0
answers
37
views
Sporadic failures in FastAPI SQLAlchemy deployment due to database connection errors
Our FastAPI deployment uses SQLAlchemy to connect to our database and fetch/filter metadata, but it is proving very flakey. Load balancing tests using Locust show a very odd behavior where initial ...
0
votes
1
answer
32
views
is it possible for one put endpoint to have a param that have more than 1 type on fastapi, pydantic
so first of full, the goal of this question is to gain more knowledge about if it possible, and what is the pest practice.
there are 3 types of users
7, 6 are normal users
5,4 are publishers
3,2 are ...
0
votes
0
answers
18
views
AWS lambda: Unable to determine service/operation name to be authorized
I am trying to deploy my lambda based on fastAPI and Mangum and invoke it from API Gateway. If I test it from AWS console from API Gateway, it works and I get reply as it is expected. Then it seems ...
-5
votes
1
answer
81
views
FastAPI 'State' object has no attribute 'implementation'
I'm getting error 'State' object has no attribute 'implementation' with FastAPI test code.
Here is all the relevant code. You can copy and paste each of these file contents to run a MWE.
# tests/...
0
votes
0
answers
17
views
The docs generated by fastapi are missing the correct interface
I built an application with Fastapi+MongoDB, the following code about it, when I tested it, I found that Fastapi's docs don't parse the send-code and verify-code interfaces, I searched for a lot of ...
-2
votes
0
answers
63
views
Is FastAPI thread safe in the context of synchronous path definitions? [duplicate]
Linked Question:
The linked question does not answer this question, and is not related to this question in any way
What is the linked question about?
The linked question is about sharing data ...
0
votes
0
answers
57
views
How to ignore a certain argument in a field while serializing in pydantic?
What I am trying to achieve?
I want to filter books based on some criteria. Since the filtering logic is roughly equal to "compare value with column_in_db", I decided to create different ...
-2
votes
0
answers
34
views
How to mount aiohttp route to fastapi?
I want to deploy ComfyUI on a service platform implemented with fastapi and expose ComfyUI's front-end routes to the service platform. However, since ComfyUI is implemented with aiohttp, I want to ...
-3
votes
0
answers
37
views
Protect python FastAPI with Azure AD hosted in Azure Web APP [closed]
i want to protect my python api hosted in Azure web App using Azure AD and i have app registration detail available can anyone tell the code to verify the incoming token bearer from frontend angular ...
0
votes
0
answers
25
views
How to use FastAPI lifetime? [duplicate]
Here's a bullet point list to explain my situation:
I am working with FastAPI
I have written a FastAPI webserver code which has a number of defined get/post endpoints
The logic for what this ...
0
votes
1
answer
35
views
Query a SQLModel class with abstract definition
In this project, we have restricted imports between packages as follows:
We have a shared package.
We have a backend package.
Imports from the backend package to the shared package are not allowed, ...
-2
votes
0
answers
41
views
FastAPI application emitting exception on CTRL+C signal
Here is the output produced by a FastAPI application. The exception is emitted after pressing CTRL+C.
It seems that first an exception of type CancelledError is raised, and then when this is being ...