You can now write in Python for FastAPI, Flask, Django, and other Python frameworks. It runs before requests reach your app, and can rewrite, redirect, or answer them.routing middleware
To set it up, point the entrypoint in at your proxy:proxyvercel.toml
Your middleware is an ASGI or WSGI app that runs separately from your main app, with only the packages in the dependency group of your . Add the packages your middleware imports to that group:vercel.proxypyproject.toml
The package provides utilities for writing routing middleware on Vercel, including a app that routes requests by path:vercel-proxyProxy
Requests that match no route continue to your app unchanged.
For more information, see the . Routing Middleware Python reference