Release v0.3.1 (What’s new?).

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

Table of Content

About the Author

(\ (\
( -.-)o
o_(")(")

Sanhe Hu is a seasoned software engineer with a deep passion for Python development since 2010. As an author and maintainer of 150+ open-source Python projects, with over 15 million monthly downloads, I bring a wealth of experience to the table. As a Senior Solution Architect and Subject Matter Expert in AI, Data, Amazon Web Services, Cloud Engineering, DevOps, I thrive on helping clients with platform design, enterprise architecture, and strategic roadmaps.

Talk is cheap, show me the code:

API Document