Simplifying TinyURL link creation and management with a lightweight Python SDK.
Project description
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
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 tinyurl_sdk-0.1.1.tar.gz.
File metadata
- Download URL: tinyurl_sdk-0.1.1.tar.gz
- Upload date:
- Size: 3.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e7687dc99a9ce69b9d98000a646fd53f3b4122784e7939cadd4ff15a7f3db186
|
|
| MD5 |
aecadf68c2db16169df54df47b4364dc
|
|
| BLAKE2b-256 |
f6658fdcd79cf4fc15615bcc78f63e3b6b1a81d1ea1f621c4c75e6eea246a421
|
Provenance
The following attestation bundles were made for tinyurl_sdk-0.1.1.tar.gz:
Publisher:
publish.yml on bilalbaraz/tinyurl-sdk
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
tinyurl_sdk-0.1.1.tar.gz -
Subject digest:
e7687dc99a9ce69b9d98000a646fd53f3b4122784e7939cadd4ff15a7f3db186 - Sigstore transparency entry: 908235473
- Sigstore integration time:
-
Permalink:
bilalbaraz/tinyurl-sdk@ac55bccfc54f6faa67a902cc04b9c33fc30b91cc -
Branch / Tag:
refs/tags/v0.1.1 - Owner: https://github.com/bilalbaraz
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@ac55bccfc54f6faa67a902cc04b9c33fc30b91cc -
Trigger Event:
push
-
Statement type:
File details
Details for the file tinyurl_sdk-0.1.1-py3-none-any.whl.
File metadata
- Download URL: tinyurl_sdk-0.1.1-py3-none-any.whl
- Upload date:
- Size: 4.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8865fff94e9bbfc264144532038bbea1dabca48232271204e10aa707fa294b78
|
|
| MD5 |
73b66d675b7f3889ceecc84d0db944ec
|
|
| BLAKE2b-256 |
0f69146afe2a76da7d48ab806165e85e0859826274b575111f8b5eece48d0ef9
|
Provenance
The following attestation bundles were made for tinyurl_sdk-0.1.1-py3-none-any.whl:
Publisher:
publish.yml on bilalbaraz/tinyurl-sdk
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
tinyurl_sdk-0.1.1-py3-none-any.whl -
Subject digest:
8865fff94e9bbfc264144532038bbea1dabca48232271204e10aa707fa294b78 - Sigstore transparency entry: 908235480
- Sigstore integration time:
-
Permalink:
bilalbaraz/tinyurl-sdk@ac55bccfc54f6faa67a902cc04b9c33fc30b91cc -
Branch / Tag:
refs/tags/v0.1.1 - Owner: https://github.com/bilalbaraz
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@ac55bccfc54f6faa67a902cc04b9c33fc30b91cc -
Trigger Event:
push
-
Statement type: