dub
Python Client SDK Generated by Speakeasy
Decision gist · record as of 2026-08-14
Yes, if you use Dub.co for link management or affiliate tracking and need programmatic access from Python. The package is actively maintained, has low install friction, and supports current Python versions. However, verify the license terms before use in commercial or compliance-sensitive projects, since the license status is currently unclear in the metadata.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Requires Python 3.10 or later and a valid Dub API token.
- Low install friction with a pure-Python wheel distribution.
- The package is actively maintained with a recent release (40 days old) and supports current Python versions (3.10–3.14).
License · maintenance · safety
(unclear) — License status is unclear—no SPDX identifier or raw license text is declared in the package metadata. Before adopting in a commercial or compliance-sensitive context, verify the actual license terms directly from the repository.
last release 2026-07-05 (40 days) · last repo commit 2026-08-14 · 8 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 249,563 downloads/mo, #8,649 on PyPI
Alternatives
Verify before relying
pip install dub
from dub import Dub
with Dub(token="DUB_API_KEY") as client:
res = client.links.create(request={
"url": "https://google.com",
"external_id": "123456"
})
print(res)- Whether the package is generated by Speakeasy tooling and how that affects maintenance or API stability guarantees.
- Actual license terms, given the unclear license_treatment in metadata.
What it is and what it does
Dub is an official Python client for the Dub.co API, a link attribution and conversion tracking platform. It wraps Dub's REST API to let you create short links, manage tags and domains, retrieve analytics, handle affiliate commissions, and run A/B tests on link variants—all from Python code. The SDK supports both synchronous and asynchronous workflows via context managers, and uses pydantic for request/response validation and httpx for HTTP transport.
The package targets Python 3.10 and later. It depends on httpcore, httpx, jsonpath-python, and pydantic. Installation is straightforward via pip, uv, or poetry, and the SDK is designed to work with Dub API authentication tokens. It includes built-in support for retries, pagination, custom HTTP clients, and error handling.
Use it for
- Create and manage short links programmatically for marketing campaigns or affiliate tracking.
- Retrieve click and conversion analytics for links to measure campaign performance.
- Manage affiliate commissions and bounty submissions within your application.
- Run A/B tests by creating link variants with specified traffic percentages.
- Integrate Dub link tracking into a backend service or automation workflow.
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes, if you use Dub.co for link management or affiliate tracking and need programmatic access from Python.
The package is actively maintained, has low install friction, and supports current Python versions. However, verify the license terms before use in commercial or compliance-sensitive projects, since the license status is currently unclear in the metadata.
Install
dub on PyPI
Before you install
Low install friction with a pure-Python wheel distribution. The package is actively maintained with a recent release (40 days old) and supports current Python versions (3.10–3.14). Four runtime dependencies (httpcore, httpx, jsonpath-python, pydantic) are all stable, widely-used libraries.
Requires Python 3.10 or later and a valid Dub API token.
License in practice
License status is unclear—no SPDX identifier or raw license text is declared in the package metadata. Before adopting in a commercial or compliance-sensitive context, verify the actual license terms directly from the repository.
Quickstart
pip install dub
from dub import Dub
with Dub(token="DUB_API_KEY") as client:
res = client.links.create(request={
"url": "https://google.com",
"external_id": "123456"
})
print(res)
Verify before relying
- Whether the package is generated by Speakeasy tooling and how that affects maintenance or API stability guarantees.
- Actual license terms, given the unclear license_treatment in metadata.
Package facts
| License | Not declared unclear |
| Python support | Supports the current Python release >=3.10 |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | 4 packageshttpcorehttpxjsonpath-pythonpydantic |
| Maintenance | Actively maintained 40 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 249,563 / month, #8,649 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | Programming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14 |
Evidence: dub-0.37.1-py3-none-any.whl
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “link shortening sdk”
- dubDub is a Python SDK for the Dub.co link attribution platform,…
- sqidsSqids encodes numbers into short, unique, URL-safe IDs and decodes…
- descopeDescope SDK provides Python backend access to Descope's user…
Give your agent the search over MCP, or paste the wish link into any chat.
More WWW/HTTP packages
urllib3 is an HTTP client library that provides thread-safe connection pooling, SSL/TLS verification, multipart file uploads, request retries, compression support, and proxy handling for Python applications.
Requests is a Python HTTP library that simplifies sending HTTP/1.1 requests with automatic handling of headers, authentication, cookies, and response parsing.
h11 is a pure-Python HTTP/1.1 protocol implementation that handles parsing and serializing HTTP messages without any built-in I/O, letting you integrate it with any network layer you choose.
HTTPX is a fully featured HTTP client library for Python that provides both sync and async APIs, with support for HTTP/1.1 and HTTP/2, plus an integrated command-line client.
Install it if you are building new projects or modernizing existing ones that rely on HTTP.
A minimal low-level HTTP client library that sends HTTP requests with thread-safe and task-safe connection pooling, supporting HTTP/1.1, HTTP/2, proxies, and both sync and async interfaces.
aiohttp is an async HTTP client and server framework built on asyncio, supporting both WebSockets and middleware-based routing for building concurrent web applications.
Install it if you need async HTTP client or server capabilities in asyncio-based applications.
See also airbyte-api · polar-sdk · Pinterest-Generated-Client · novu-py · cybrid-api-id-python · sumologic-sdk · Unified-python-sdk · cybrid-api-organization-python · cybrid-api-bank-python · stripe