Skip to main content

Python SDK for Vercel Workers

Project description

vercel-workers

Python SDK for Vercel Queues and Vercel Worker Services.

It includes:

  • send() and @subscribe primitives for publishing and consuming queue messages
  • adapters for Celery, Dramatiq, and Django tasks

Install

pip install vercel-workers

Optional adapter extras:

pip install "vercel-workers[celery]"
pip install "vercel-workers[dramatiq]"
pip install "vercel-workers[django]"

Worker Service deployment shape

vercel.json

{
  "projectSettings": { "framework": "services" },
  "experimentalServices": {
    "web": {
      "framework": "fastapi",
      "entrypoint": "main.py",
      "routePrefix": "/"
    },
    "worker": {
      "type": "worker",
      "entrypoint": "worker.py",
      "topic": "default",
      "consumer": "default"
    }
  }
}

For worker services, worker.py should expose worker definitions (for example a @subscribe function, Celery app, or Dramatiq broker) and import task modules so handlers are registered.

Examples

  • examples/basic: FastAPI producer + @subscribe worker service
  • examples/celery: Celery + worker service
  • examples/dramatiq: Dramatiq adapter + worker service
  • examples/django: Django tasks backend + queue callback route at /api/queue/callback

When running outside Vercel, set VERCEL_QUEUE_TOKEN (and optionally VERCEL_QUEUE_BASE_URL).

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

vercel_workers-0.0.22.tar.gz (62.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

vercel_workers-0.0.22-py3-none-any.whl (61.2 kB view details)

Uploaded Python 3

File details

Details for the file vercel_workers-0.0.22.tar.gz.

File metadata

  • Download URL: vercel_workers-0.0.22.tar.gz
  • Upload date:
  • Size: 62.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.10.11 {"installer":{"name":"uv","version":"0.10.11","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for vercel_workers-0.0.22.tar.gz
Algorithm Hash digest
SHA256 e189fb0e3c4cabf89e4d38f21c8f13b9dfcd4b1deedd5dc8b43aadbdf145e3a4
MD5 b744798c0c0f4b088e745f1178782236
BLAKE2b-256 0cfb994dee0f9d2d22dce84c861b62e388b93f19a88b9d5a0bcb2fe6acfe5f29

See more details on using hashes here.

File details

Details for the file vercel_workers-0.0.22-py3-none-any.whl.

File metadata

  • Download URL: vercel_workers-0.0.22-py3-none-any.whl
  • Upload date:
  • Size: 61.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.10.11 {"installer":{"name":"uv","version":"0.10.11","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for vercel_workers-0.0.22-py3-none-any.whl
Algorithm Hash digest
SHA256 83cf099a3a3dceb1cd47f8575446fb75a1e7ccbfe1304dbbbc1de3287bd640d6
MD5 da5e25986d5aba7df7584dc47c2b15de
BLAKE2b-256 c28cfb781b58edcb6ced4a6f15392315f88d7021cc2c242638e77f98ee300638

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page