Skip to main content
Documentation Status https://github.com/MacHu-GWU/pyshortio-project/actions/workflows/main.yml/badge.svg https://img.shields.io/pypi/v/pyshortio.svg https://img.shields.io/pypi/l/pyshortio.svg https://img.shields.io/pypi/pyversions/pyshortio.svg https://img.shields.io/badge/✍️_Release_History!--None.svg?style=social&logo=github https://img.shields.io/badge/⭐_Star_me_on_GitHub!--None.svg?style=social&logo=github
https://img.shields.io/badge/Link-API-blue.svg https://img.shields.io/badge/Link-Install-blue.svg https://img.shields.io/badge/Link-GitHub-blue.svg https://img.shields.io/badge/Link-Submit_Issue-blue.svg https://img.shields.io/badge/Link-Request_Feature-blue.svg https://img.shields.io/badge/Link-Download-blue.svg

Welcome to pyshortio Documentation

https://pyshortio.readthedocs.io/en/latest/_static/pyshortio-logo.png

PyShortIO provides a clean, well-documented API client for the Short.io URL shortening service with comprehensive error handling and pagination support. It follows Pythonic design principles to make URL shortening operations intuitive and efficient.

📖 Complete Documentation

Quick Start

from pyshortio.api import Client

# Initialize client with your API token
client = Client(token="your_api_token")

# Get your domain
response, domain = client.get_domain_by_hostname("your-domain.short.gy")
domain_id = domain.id

# Create a shortened link
response, link = client.create_link(
    hostname="your-domain.short.gy",
    original_url="https://example.com/very-long-url-path",
    title="Example Link"
)
print(f"Shortened URL: {link.short_url}")

# List all your links
response, links = client.list_links(domain_id=domain_id)
for link in links:
    print(f"{link.title}: {link.short_url} -> {link.original_url}")

🚀 Bulk URL Management with Sync TSV

Managing multiple Short.io links doesn’t have to be tedious! PyShortIO includes a powerful Sync TSV feature that lets you create, update, and delete hundreds of shortened URLs in a single operation using spreadsheet files. Maintain your links in Google Sheets, export as TSV, and sync them to Short.io with just a few lines of code. Perfect for marketing campaigns, documentation management, or any scenario requiring bulk URL operations.

# Install with sync dependencies
# pip install pyshortio[sync]
with open("links.tsv", "r") as file:
    client.sync_tsv(hostname="yourdomain.short.gy", file=file)

Install

pyshortio is released on PyPI, so all you need is to:

$ pip install pyshortio

To upgrade to latest version:

$ pip install --upgrade pyshortio

Metadata

Release files for pyshortio 0.3.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 pyshortio 0.3.1
File Size Uploaded
pyshortio-0.3.1.tar.gz 32.7 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for pyshortio 0.3.1
File Interpreter ABI Platform
pyshortio-0.3.1-py3-none-any.whl Python 3 none any Details

Total release size: 71.9 kB

Release files / pyshortio-0.3.1.tar.gz

Download URL pyshortio-0.3.1.tar.gz
Size 32.7 kB
Tags Source
SHA-256 checksum
How to use checksums
e0208c6684a8c2213622093d278b2d7607d67181dc639e27cfea82223e324089
BLAKE2b-256 checksum
How to use checksums
b601b6b7814e019248eb4d391e39486656fc3b5110d8d94babbe0a5dd3185e87
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.11.8

Release files / pyshortio-0.3.1-py3-none-any.whl

Download URL pyshortio-0.3.1-py3-none-any.whl
Size 39.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
7db49d5174d81be58fc61c294d2608baa745feee64a7f731d56489ccd1409a3e
BLAKE2b-256 checksum
How to use checksums
00eadbcc4059c53b316834ccbad90c84a196fdf267bbb9170af5e5d3f4335502
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.11.8

Release history Release notifications | RSS feed

This release

0.3.1 This release

2 release files

0.2.1

2 release files

0.1.1

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