Skip to main content

PyShortIO is a Pythonic client library for the Short.io URL shortening service that provides a clean, well-documented API with comprehensive error handling and pagination support.

Project description

Documentation Status https://codecov.io/gh/MacHu-GWU/pyshortio-project/branch/main/graph/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.

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}")

📖 Complete Documentation

Install

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

$ pip install pyshortio

To upgrade to latest version:

$ pip install --upgrade pyshortio

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pyshortio-0.1.1.tar.gz (20.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pyshortio-0.1.1-py3-none-any.whl (25.5 kB view details)

Uploaded Python 3

File details

Details for the file pyshortio-0.1.1.tar.gz.

File metadata

  • Download URL: pyshortio-0.1.1.tar.gz
  • Upload date:
  • Size: 20.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.8

File hashes

Hashes for pyshortio-0.1.1.tar.gz
Algorithm Hash digest
SHA256 899446d2c32f56da68e48db66142a87db04bfe3588b16facd1e499a930efc60f
MD5 2ed1376ed2301e7c5934dcb68b1b3fb6
BLAKE2b-256 58e84bfec1df6e6831d18fa0a4809e2bd04aed807fce33249b6ed376210956d2

See more details on using hashes here.

File details

Details for the file pyshortio-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: pyshortio-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 25.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.8

File hashes

Hashes for pyshortio-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 c86c24120928947dea75b2ad65665ab0cd6b2065beb72d4cdf58dfa4bc7e3398
MD5 b570bcedfb84cad9a4e5d1c53f4fb987
BLAKE2b-256 32f0d30bbe6c305df2b2f2548b4464fb2970a86aafdbe3a943a4245a7023709c

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page