Skip to main content

tinyurl-sdk

A lightweight Python SDK for simplifying TinyURL link creation and management.

Installation

pip install tinyurl-sdk

Usage

from tinyurl_sdk.client import TinyURLClient

client = TinyURLClient(api_key="YOUR_API_KEY")
short_url = client.shorten(
    url="https://www.example.com/my-really-long-link-that-I-need-to-shorten/84378949",
    domain="tinyurl.com",
    alias="myexamplelink",
    tags="example,link",
    expires_at="2024-10-25 10:11:12",
    description="string",
)
print(short_url)

Parameters

Constructor:

Name Required Type Notes
api_key Yes str TinyURL API key.
timeout No float Request timeout in seconds. Default: 10.0.
api_base_url No str Base API URL. Default: https://api.tinyurl.com.
user_agent No str User agent header. Default: tinyurl-sdk/0.0.0.

shorten:

Name Required Type Notes
url Yes str Long URL to shorten.
domain No str TinyURL domain.
alias No str Must be at least 5 characters if provided.
tags No str Comma-separated tags.
expires_at No str Expiration timestamp (API format).
description No str Link description.

Development

pip install -e .

License

MIT

Metadata

Release files for tinyurl-sdk 0.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for tinyurl-sdk 0.1.1
File Size Uploaded
tinyurl_sdk-0.1.1.tar.gz 3.7 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for tinyurl-sdk 0.1.1
File Interpreter ABI Platform
tinyurl_sdk-0.1.1-py3-none-any.whl Python 3 none any Details

Total release size: 7.7 kB

Release files / tinyurl_sdk-0.1.1.tar.gz

Download URL tinyurl_sdk-0.1.1.tar.gz
Size 3.7 kB
Tags Source
SHA-256 checksum
How to use checksums
e7687dc99a9ce69b9d98000a646fd53f3b4122784e7939cadd4ff15a7f3db186
BLAKE2b-256 checksum
How to use checksums
f6658fdcd79cf4fc15615bcc78f63e3b6b1a81d1ea1f621c4c75e6eea246a421
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Feb 3, 2026.

Transparency log

Release files / tinyurl_sdk-0.1.1-py3-none-any.whl

Download URL tinyurl_sdk-0.1.1-py3-none-any.whl
Size 4.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
8865fff94e9bbfc264144532038bbea1dabca48232271204e10aa707fa294b78
BLAKE2b-256 checksum
How to use checksums
0f69146afe2a76da7d48ab806165e85e0859826274b575111f8b5eece48d0ef9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Feb 3, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.1.1 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page