Skip to main content

WebSocket support is now available for Python Functions

By Steven Van ·

FastAPI, Django, and Flask apps can now handle WebSockets on Vercel Functions, provided Fluid compute is enabled.

Vercel now supports WebSocket connections for Python Functions, alongside the Node.js frameworks already covered. Both ASGI and WSGI apps work without a Vercel-specific upgrade API, including FastAPI, Django (via Django Channels), and Flask (via Flask-Sock).

WebSocket connections are billed like other Function invocations, plus Fast Data Transfer and Fast Origin Transfer for data sent over the connection, and they require Fluid compute, which is on by default for projects created after 23 April 2025. Details and framework examples are in the WebSockets documentation.

Vercel
Vercel
The platform for frontend developers — deploy, preview, and scale web apps and AI agents with zero config.
View Vercel →

Read the original announcement →

Read WebSocket support is now available for Python Functions on Creators Toolbox