Skip to main content
0 votes
0 answers
9 views

How to use sqlalchemy limit with join

Fastapi app. I have models class State(str, enum.Enum): WATCHING = "WATCHING" WATCHED = "WATCHED" DROPPED = "DROPPED" class Anime(Base): __tablename__ = &...
0 votes
0 answers
9 views

Struggling to Serve Multiple Requests with LLama3.1 8B Instruct 4bit—Any Tips?

I’m running LLama3.1 8B Instruct 4bit using the Huggingface pipeline, and I’ve set up an API using FastAPI, which is served with Uvicorn. However, I’m facing an issue—my API can’t handle more than one ...
XGB's user avatar
  • 111
0 votes
0 answers
13 views

CORS Issue in Nginx with FastAPI: Works with `*` but Fails with Specific Domains

I'm facing a CORS issue while configuring my FastAPI application behind an Nginx reverse proxy. The setup works fine when I set Access-Control-Allow-Origin to *. However, when I replace * with ...
Diyar's user avatar
  • 1
-3 votes
0 answers
30 views

Can not set httponly cookie using FastAPI [closed]

When user Log In I am creating Login using pyjwt and setting Httponly cookie but not able to set the cookie because of CROS. When user Log In I am creating Login using pyjwt and setting httponly ...
Kishan Babariya's user avatar
0 votes
1 answer
34 views

FastAPI - At POST endpoint, how to use `Depends` AFTER using Pydantic model to validate json in request body

Motivation Use Pydantic to conveniently validate the json data in the request body, and then pass the validated Model instance object to the context class to construct the context of this request. The ...
Isuxiz Slidder's user avatar
0 votes
1 answer
22 views

What's the point of using Dependency Injection in FastAPI when you can just use default parameters?

I don't understand the point of Dependency Injection when using FastAPI, like take a look at this code utils/getInfo.py def getInfo(): from app import UserModel from app import PostModel ...
cooldude's user avatar
0 votes
0 answers
10 views

Website telling net::ERR_CONNECTION_REFUSED Flask API [closed]

I'm running a FastAPI app with waitress as the server in production. Everything works fine locally, but when I try to access it through my domain, I run into these issues: #Python---Code @app.post(&...
SMB Tech's user avatar
0 votes
0 answers
21 views

No module named 'fastapi_utils'

I am trying to run FastApi app from this repo: https://github.com/wpcodevo/fastapi_sqlalchemy My actions: python3.11 -m ven venv # was trying 3.8 and 3.11 source venv/bin/activate pip install ...
mascai's user avatar
  • 1,845
0 votes
1 answer
21 views

SQLModel with FastAPI: Editable computed field

I have the following SQLModel in my FastAPI app: class MyModel(SQLModel): a: str I want to add another field b that will have a default value based on a value provided in model creation. This b ...
yael's user avatar
  • 1
0 votes
0 answers
22 views

Rasperry Pi 5 GPIO pins unusable after server restart (rpi-lgpio package)

I am using the rpi-lgpio package. I am using a FastAPI server through a virtual environment (.venv) on a Raspberry Pi 5 to turn on and turn off an LED via HTTP requests on from a flutter front-end. ...
Sakhile Mamba's user avatar
0 votes
2 answers
48 views

FastAPI app works locally, but /blogs endpoint causes redirect loop on AWS Lambda deployment

I’ve developed a FastAPI app and deployed it on AWS Lambda as a .zip archive. Locally, when I run: uvicorn src.main:app --reload I can access the /blogs endpoint (http://127.0.0.1:8000/blogs) and it ...
tail's user avatar
  • 395
1 vote
0 answers
14 views

chatbot server with llamaindex and FastAPI

I am trying to make a chatbot server (RAG system) with llamaindex and FastApi. from dotenv import load_dotenv import os from llama_index.core import VectorStoreIndex, StorageContext, ...
Roche David's user avatar
1 vote
1 answer
77 views

How to initialize db connection in FastAPI with lifespan events?

I would like to initialize a DB connection for my FastAPI application and tried to follow the tutorial for Lifespan Events. I set up a lifecycle function and plugged it into my app and within the ...
guerda's user avatar
  • 23.9k
0 votes
0 answers
20 views

Websockets Unexpectedly disconnecting after message broadcast - FastAPI

Im working with Wbsockets and FastAPI to make a simple chatbot powered with AI. For each conversation there are two possible modes copilot (the user message will be answered by a person using the UI) ...
Forshank's user avatar
  • 1,109
0 votes
0 answers
24 views

how to download a file with a dynamic name using ReactJS and FastAPI?

I have created a chatbot that has a backend created with FastAPI and the following function: @router.get("/download/") async def download_file(filename: str, collection_name: str) -> ...
Kelo's user avatar
  • 93

15 30 50 per page
1
2 3 4 5
482