I’ve been loving Python on Vercel, even though it could still use a lot of improvement. One of these improvements is support for the package manager UV. As a workaround, I currently also generate requirements.txt so it still works on Vercel, but I would love good UV support on the Vercel.
2 Likes
Great feedback! Thanks @th1m0
2 Likes
vercel.json
{
"functions": {
"api/**/*.py": {
"memory": 3009,
"maxDuration": 300
}
},
"buildCommand": "python3 -m pip install uv && python3 -m uv pip install . --target /build",
"outputDirectory": "public",
"rewrites": [
{
"source": "/(.*)",
"destination": "/api/main"
}
]
}
This is the way I use UV on Vercel currently, it works for me but it’s not elegant, I expect Vercel to natively support it.
3 Likes
Thanks for sharing this! Also passed onto the team.
This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.