Newsletter
Join the Community
Subscribe to our newsletter for the latest news and updates
A minimal Django REST Framework API running on Vercel Serverless Functions.
Django REST Framework + Vercel is a minimal starter boilerplate from Vercel that deploys a Django REST Framework API as a Vercel Serverless Function using the Python Runtime.
This template is a minimal Django REST Framework API that runs on Vercel Serverless Functions using the Python Runtime. It is part of Vercel's official examples repository. The template exposes a single read-only endpoint at /api/time/ that returns the current UTC time as JSON. It takes a GET request and returns a JSON response with an ISO 8601 timestamp.
uv sync then uv run python manage.py runserver to test at localhost:8000.The template includes a single Django REST Framework view decorated with api_view(['GET']). That view returns a DRF Response containing the current UTC time. The Django application is exposed through WSGI, and Vercel maps the /api/time/ route to the serverless function. You must set DJANGO_SECRET_KEY as an environment variable before the app can run.
The template itself is free and open source. Deploying to Vercel requires a Vercel account; Vercel offers a free tier for hobby projects, though this page does not list specific pricing.
It uses Django, Django REST Framework, and the Python runtime on Vercel. Package management is done with uv, as shown by the uv sync command in the README.
Run the given command with uv to generate a random key, then pipe it into vercel env add -y DJANGO_SECRET_KEY prod to store it for production. You can also set it through the Vercel dashboard.
No database is included or configured. The demo only returns the current time from the server, and the README does not mention any database setup.
It is a minimal starter, so you would need to add your own models, authentication, and any other production concerns. The included view is a single GET endpoint with no database.
