Python client SDK for the Dub API (link management, analytics, etc.), generated by Speakeasy. Current version 0.35.7, requires Python >=3.10. Released frequently.
pip install dubNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Initialize with an API token and create a short link.
Use the top-level import: from dub import Dub
Replace 'workspace_id' with 'project_slug' in SDK initialization.
Wrap synchronous calls in asyncio.run(): asyncio.run(client.links.create(...))
Upgrade to the latest version: pip install --upgrade dub
Set DUB_API_KEY with a valid API token from the Dub dashboard.