Skip to content
New Project

Django REST Framework + Vercel

A minimal Django REST Framework API running on Vercel Serverless Functions.

DeployView Demo

Django REST Framework + Vercel

A minimal Django REST Framework API running on Vercel with Serverless Functions using the Python Runtime.

Demo

https://django-rest-framework-example.vercel.app/api/time/

Setting the Secret Key

Django requires a secret key for cryptographic signing to be set in the DJANGO_SECRET_KEY environment variable. This can be set in the web interface, or by running:

uv run python -c 'from django.core.management.utils import get_random_secret_key; print(get_random_secret_key())' | vercel env add -y DJANGO_SECRET_KEY prod

How it Works

A single DRF view in api/views.py returns the current UTC time as JSON:

@api_view(["GET"])
def current_time(request):
return Response({"time": datetime.now(timezone.utc).isoformat()})

This view is exposed at /api/time/ and the app is served via WSGI in config/wsgi.py:

application = get_wsgi_application()

Running Locally

uv sync
uv run python manage.py runserver

Your API is now available at http://localhost:8000/api/time/.

One-Click Deploy

Deploy the example using Vercel:

GitHub
Ownervercel
Repositoryexamples
LicenseView License
Use Cases
Starter
Stack
Python

Related Templates

eve Software Factory

Software factory built on eve: AI agents work each stage of the development loop, and people make the judgment calls.
eve Software Factory thumbnail

eve Sanity Copilot

Give your team a Sanity copilot in Slack. It runs GROQ, edits schemas, manages releases, and asks before it touches production.
eve Sanity Copilot thumbnail

eve Personal Agent

Fork your own personal agent. One identity across web, Slack, and iMessage, with memory you can import, edit, and approve.
eve Personal Agent thumbnail
DeployView Demo