Python SDK for Vercel
Project description
Vercel Python SDK
Python SDK for Vercel APIs and Vercel Functions.
For product-level behavior, limits, and platform setup, use the official Vercel docs.
Getting Started
Install the package:
pip install vercel
Or with uv:
uv add vercel
Configure the credentials via environment variables based on your app's needs:
BLOB_READ_WRITE_TOKENfor Vercel BlobVERCEL_TOKEN,VERCEL_PROJECT_ID, andVERCEL_TEAM_IDfor Vercel API clientsVERCEL_OIDC_TOKENfor local OIDC testing. On Vercel, OIDC helpers can read the request token after you register request headers withvercel.headers.set_headers().
For local OIDC development, you can load a short-lived token dynamically with the Vercel CLI:
VERCEL_OIDC_TOKEN=$(vc project token some-project) some-command
Usage
import asyncio
from vercel.client import AsyncVercel
from vercel.oidc.credentials import get_credentials
async def main() -> None:
credentials = get_credentials()
vercel = AsyncVercel(access_token=credentials.token)
deployment = await vercel.deployments.create_deployment(
body={
"name": "hello-python",
"project": "hello-python",
"target": "preview",
"files": [
{
"file": "index.html",
"data": "<h1>Hello from Python</h1>",
}
],
}
)
print(f"Deployment created: https://{deployment['url']}")
asyncio.run(main())
Public API Vs Internals
Import from public modules under vercel.*, such as vercel.blob,
vercel.cache, vercel.headers, vercel.oidc, vercel.projects, and
vercel.sandbox. Modules under vercel._internal.* are implementation details
and may change without public API guarantees.
Sync counterparts are available for the main client classes and module-level helpers when you are not running an async application.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file vercel-0.5.9.tar.gz.
File metadata
- Download URL: vercel-0.5.9.tar.gz
- Upload date:
- Size: 119.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
88d2c27ecf7e02de67b711d4dd9df84e70c6ae1823c09f1fd67146e3d54be462
|
|
| MD5 |
dca7b1365dc826f43e5f01d239771eb4
|
|
| BLAKE2b-256 |
53e986d6780301e36ecfe45ec401212593f24c555b284b5b080ac9a6253803ec
|
Provenance
The following attestation bundles were made for vercel-0.5.9.tar.gz:
Publisher:
publish.yml on vercel/vercel-py
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
vercel-0.5.9.tar.gz -
Subject digest:
88d2c27ecf7e02de67b711d4dd9df84e70c6ae1823c09f1fd67146e3d54be462 - Sigstore transparency entry: 1574696240
- Sigstore integration time:
-
Permalink:
vercel/vercel-py@136288e4691209a19f8068459658488afae52b5b -
Branch / Tag:
refs/heads/main - Owner: https://github.com/vercel
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@136288e4691209a19f8068459658488afae52b5b -
Trigger Event:
push
-
Statement type:
File details
Details for the file vercel-0.5.9-py3-none-any.whl.
File metadata
- Download URL: vercel-0.5.9-py3-none-any.whl
- Upload date:
- Size: 140.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f87a354fc110f04f3d6a2270c800cd8d42a763ea116b2625fc049d54a856a31b
|
|
| MD5 |
15fbb2ef101dc4ce2caa3df0e3bc952b
|
|
| BLAKE2b-256 |
c20edc0cb599036ff3055428459a427ed895e1a4cd3db387655672c5d2dba04b
|
Provenance
The following attestation bundles were made for vercel-0.5.9-py3-none-any.whl:
Publisher:
publish.yml on vercel/vercel-py
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
vercel-0.5.9-py3-none-any.whl -
Subject digest:
f87a354fc110f04f3d6a2270c800cd8d42a763ea116b2625fc049d54a856a31b - Sigstore transparency entry: 1574696262
- Sigstore integration time:
-
Permalink:
vercel/vercel-py@136288e4691209a19f8068459658488afae52b5b -
Branch / Tag:
refs/heads/main - Owner: https://github.com/vercel
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@136288e4691209a19f8068459658488afae52b5b -
Trigger Event:
push
-
Statement type: