Build radar
Sources 33Updates always the freshest
0 Newsletter
Animated illustration for: A Python gatekeeper in front of your app, with no changes to its code
AI News · Oct 22, 2026 · 2 min

A Python gatekeeper in front of your app, with no changes to its code

Got a Python app on Vercel? You can now redirect or adjust traffic before it reaches the app. I show how to set it up and what the announcement leaves out.

In short
  • Vercel Routing Middleware can now be written in Python, for example for FastAPI, Flask or Django.
  • It runs before your app and can rewrite, redirect or respond directly.

The short version: Vercel announced that Routing Middleware, a layer that runs in front of your app, now supports Python. You can write it for FastAPI, Flask, Django and other frameworks.

What changed

  • In vercel.toml you add a [proxy] table with entrypoint set to proxy:proxy, meaning a proxy object in proxy.py.
  • The middleware is an ASGI or WSGI app that runs separately from your main app.
  • It can only use packages from the vercel.proxy dependency group in pyproject.toml; you install the helpers with uv add --group vercel.proxy vercel-proxy.
  • The announcement’s example: /old-blog/{slug} returns a 308 redirect to /blog/{slug}, and /api/{path:path} passes traffic on and adds the header x-api-version: 2. Unmatched requests continue to the app unchanged.

What is missing

The announcement does not give availability by plan, pricing, time limits or supported Python versions, and it does not say whether this is a beta. The configuration snippet is labelled JSON but written in TOML, so follow the documentation.

How to read this

This is the vendor describing its own feature. Since it runs as a separate app with its own dependency group, remember to add every imported package to vercel.proxy. More on working with Python in AI is in the Python and SDKs hub.

Sources

Python & SDKs

Related