Skip to main content
Filter by
Sorted by
Tagged with
Best practices
0 votes
1 replies
14 views

I want to know the best practice for IP whitelist filtering in FastAPI. I'm used to writing Django APIs, but now I need to get the work done using FastAPI. Anyways, the ALLOWED_HOSTS feature in django ...
Geo's user avatar
  • 306
1 vote
0 answers
62 views

Let me start from middle. I have been play around for a long time with these three part: nginx which handles the path Fastapi server sqlAdmin The url https://example.com/gem/admin must be passed to ...
Ali Ebrahimi's user avatar
1 vote
0 answers
45 views

I want to delete a persistent chromadb collection after 12 hours, I am currently saving the time the collection was created in mongodb and then check it against current time, if it it is 12 hours old ...
Saad Kamboh's user avatar
0 votes
0 answers
109 views

My goal is to have a special route which receives name and payload for any other route and then (after doing some unpacking and decoding) call the target route which I prefer to go through HTTP ...
Ali Ebrahimi's user avatar
1 vote
1 answer
118 views

I create simple app using (python 3.11, uvicorn 0.38.0, fastapi 0.120.2): import os import time import asyncio import uvicorn from fastapi import FastAPI from fastapi import BackgroundTasks app = ...
Yura Pazyn's user avatar
1 vote
2 answers
95 views

I’m building a secure messaging app using FastAPI with JWT authentication and websockets. My issue is that after the client connects with a valid token, the websocket closes right away with code 1006. ...
Karima El Malti's user avatar
0 votes
0 answers
34 views

I’m hosting a FastAPI application on Azure App Service (Linux, Python 3.12). The deployment works, but the logs repeatedly show the following errors: chown: changing ownership of '/temp': Operation ...
Kaue Martins's user avatar
2 votes
1 answer
74 views

I’m running into strange behavior in FastAPI where my BackgroundTasks only execute when declared inside an async dependency. No exception is raised, the route returns normally, but the background job ...
user31749517's user avatar
0 votes
0 answers
42 views

I’m running a FastAPI service in Kubernetes that accepts multipart/form-data uploads and stores files in S3. The upload endpoint works fine when I call it directly inside the cluster using the service ...
swetha's user avatar
  • 3
0 votes
0 answers
31 views

I am developing a mobile application using React Native. In this phase I am trying to connect it to my APIs (made using FastAPI with Authlib) to perform authentication with Google. I do not know if I ...
AlberToma's user avatar
0 votes
1 answer
56 views

I have a FastAPI router that I am trying to run some unit tests on using pytest. 7 of the 8 tests pass, but 1 keeps returning a 404, and failing the assertion to check the status_code == 200 (it is ...
strin's user avatar
  • 1
1 vote
1 answer
267 views

I'm working on AWS EC2. I created a virtual environment and installed all the necessary dependencies. I connected to it via VSCode, and when I try to start the server using the airflow standalone ...
mbaysal's user avatar
  • 23
3 votes
3 answers
88 views

I'm building a FastAPI app (actually a small package) that defines a base model for a webhook endpoint. Other developers can inherit from this model and extend it for their own use cases. The webhook ...
zevi svei's user avatar
2 votes
1 answer
157 views

I am creating FastAPI and aiokafka endpoint. How to add aiokafka producer properly? from aiokafka import AIOKafkaProducer. The function is woking, but too long. Found out that the problem deals with `...
mascai's user avatar
  • 1,718
5 votes
0 answers
175 views

I’m building a FastAPI application in Python. When I navigate to the /openapi.json endpoint, FastAPI generates an OpenAPI 3.1 specification. However, Azure API Management (APIM) only supports OpenAPI ...
Unknown Øne's user avatar
0 votes
1 answer
78 views

I have a Python FastAPI service that primarily serves one main endpoint, along with an additional endpoint for health checks. The main endpoint processes documents ranging from small to very large and ...
Muthu Ramkumar's user avatar
0 votes
1 answer
278 views

I’m building a small project using FastAPI + PostgreSQL and I want to use async SQLAlchemy sessions for queries. I’ve seen examples with SessionLocal, but I’m confused about how to properly set up: ...
Praneetha Neelapareddigari's user avatar
2 votes
1 answer
61 views

I keep my SQL hooks in a separate module. I added a function, and for the life of me I cannot get it to be registered in the fastAPI. I can alter the main file of the fast API, but it just keeps ...
David Dawkins's user avatar
0 votes
0 answers
110 views

I'm developing a FastAPI application, a file manager system, and I'm using PostgreSQL as the database. To define database entity models in my code, I previously used SQLAlchemy, but now I switched to ...
stam's user avatar
  • 106
0 votes
0 answers
87 views

I have APISix routes for my fastapi backend. Service endpoints work well. But swagger docs are not rendered. While http://127.0.0.1:8000/docs render docs, but apisix route configured for /docs/* doesn'...
Mandroid's user avatar
  • 7,778
1 vote
0 answers
104 views

I'm buiding endpoints with FastAPI, PostgreSQL as database, and the driver is asyncpg associated with SQLAlchemy for asynchronous. As mentioned in the title, I'm having trouble with async_sessionmaker,...
cherriedy's user avatar
0 votes
0 answers
37 views

In the following code, I made an optimization: instead of reading the index.html file on every request, I stored the FileResponse in a global variable and return it in the endpoint function. The site ...
Abdullah Saquib's user avatar
1 vote
0 answers
208 views

Entities class ParentEntity(Base): __tablename__ = "parent_entity" id = Column(Integer, primary_key=True) status = Column(String) config_id = Column(Integer, ForeignKey(&...
Mayank's user avatar
  • 11
0 votes
1 answer
73 views

The code is used in many projects and works but in one service sometimes an error occurs: "InterfaceError: (sqlalchemy.dialects.postgresql.asyncpg.InterfaceError) <class 'asyncpg.exceptions....
Раенко Тимофей's user avatar
0 votes
1 answer
79 views

I am building a scanning service using FastAPI + Celery + PostgreSQL + SQLAlchemy + Nmap. I have a Celery task that performs WHOIS, DNS lookups, IP lookups, and then port scanning using python-nmap. ...
Muzamil's user avatar
  • 33

1
2 3 4 5
148