---
title: "Python on Vercel"
description: "Keep your Python stack and ship it with your frontend. Build a FastAPI + Next.js furniture app deployed as one Vercel project."
canonical_url: "https://vercel.com/academy/python-on-vercel"
md_url: "https://vercel.com/academy/python-on-vercel.md"
docset_id: "vercel-academy"
doc_version: "1.0"
last_updated: "2026-10-17T13:05:02.931Z"
content_type: "course"
lessons: 6
estimated_time: 
lesson_urls:
  - "https://vercel.com/academy/python-on-vercel/install-vercel-cli.md"
  - "https://vercel.com/academy/python-on-vercel/explore-fastapi-starter.md"
  - "https://vercel.com/academy/python-on-vercel/explore-nextjs-starter.md"
  - "https://vercel.com/academy/python-on-vercel/run-with-vercel-dev.md"
  - "https://vercel.com/academy/python-on-vercel/wire-nextjs-to-fastapi.md"
  - "https://vercel.com/academy/python-on-vercel/deploy-to-prod.md"
---

<agent-instructions>
Vercel Academy — structured learning, not reference docs.
Lessons are sequenced.
Adapt commands to the human's actual environment (OS, package manager, shell, editor) — detect from project context or ask, don't assume.
The lesson shows one path; if the human's project diverges, adapt concepts to their setup.
Preserve the learning goal over literal steps.
Quizzes are pedagogical — engage, don't spoil.
Quiz answers are included for your reference.
</agent-instructions>

# Python on Vercel

Deploy your Next.js frontend and Python API together as one Vercel project.

We'll work on Hazel Home, a furniture storefront that still uses mock inventory even though its FastAPI backend is ready. We'll connect the two locally, with Next.js at `/` and FastAPI under `/api`, then deploy the finished app under one domain.

Course repo: [vercel/academy-python-course](https://github.com/vercel/academy-python-course)

## What You'll Build

A furniture inventory app with a FastAPI endpoint at `/api/items` and a Next.js frontend that displays the inventory. We'll configure them as [Vercel Services](https://vercel.com/docs/services) in one Vercel project. Each application has its own root directory, and a service binding lets Next.js call FastAPI.

## Prerequisites

- [uv](https://docs.astral.sh/uv/getting-started/installation/) for Python and dependency management; we use it to set up Python 3.12 in Lesson 1.2 ([supported versions](https://vercel.com/docs/functions/runtimes/python/python-version))
- Familiarity with FastAPI (you've written routes and run a dev server)
- Basic Node.js and npm knowledge (enough to run a Next.js app)
- A Vercel account ([Hobby](https://vercel.com/docs/plans/hobby) supports a personal learning project; its fair-use policy excludes commercial use)

## Optional Companion Skill

The companion Academy skill can help you debug `vercel dev` and check service routing to `backend/main.py`. It also helps you connect `frontend/app/page.tsx` through `BACKEND_URL` and verify your deployment.

Install it once:

```bash
npx skills add vercel-labs/academy-skills --skill=python-on-vercel -y
```

Then invoke it in chat with prompts like:

- "Use the `python-on-vercel` skill and check why `/api/items` returns 404."
- "Use the `python-on-vercel` skill and review my `starter/frontend/app/page.tsx` wiring."
- "Use the `python-on-vercel` skill and walk me through deploy verification."

## What's Covered

**Section 1: Setup.** Install the Vercel CLI, then run each side of the starter project locally.

**Section 2: Connect the Apps.** Configure Services, run both applications with `vercel dev -L`, and replace the frontend's mock inventory with data fetched through a service binding.

**Section 3: Deploy to Vercel.** Deploy the project and verify the frontend and API in production.


---

[Full course index](/academy/llms.txt) · [Sitemap](/academy/sitemap.md)
