Back

Running uvicorn app in python function

  • 0
  • Functions
OP
28 Mar, 2025, 08:11

Hi guys, i developed an uvicorn app with an 'app' object in my main file but no matter which entrypoint I choose in the function settings it doesnt start the server.

I'm wondering if uvicorn for functions is evren supported? or do i need to rewrite all my uvicorn endpoints to accept through the 'context' param passed to all appwrite functions.

here is a snippet from the uvicorn app file: app = FastAPI()

Allow frontend (Vercel-hosted React) to access backend.

app.add_middleware( CORSMiddleware, allow_origins=[""], # Adjust this in production. allow_credentials=True, allow_methods=[""], allow_headers=["*"], )

TL;DR
Developers having issues starting uvicorn app in a Python function. They are seeking clarification on uvicorn support for functions and considering rewriting endpoints to accept via the 'context' parameter. The app code includes a FastAPI object with certain settings. Solution: One possible issue could be the chosen entrypoint in the function settings. Double-check this configuration.
Reply

Reply to this thread by joining our Discord

Reply on Discord

Need support?

Join our Discord

Get community support by joining our Discord server.

Join Discord

Get premium support

Join Appwrite Pro and get email support from our team.

Learn more