Skip to main content

speedyshortpy

speedyshortpy is a small Python client for the SpeedyShort URL shortener.

It provides a thin wrapper around the HTTP API so you can create short links from Python code with a single call.

Installation

Once published on PyPI:

pip install speedyshortpy

For local development, you can install it from the cloned repository:

pip install -e .

Usage

By default the client targets a local SpeedyShort instance on http://localhost:8080:

from speedyshortpy import SpeedyShortClient

client = SpeedyShortClient()  # base_url="http://localhost:8080"

result = client.shorten("https://www.example.com")
print(result.code)
print(result.short_url)
print(result.target_url)

You can also point it to a remote instance, for example the public demo:

client = SpeedyShortClient(base_url="https://syrt.cc")

Resolving a short code

You usually do not need a client for redirects, but if you want to inspect the redirect response:

resp = client.resolve("a7X9pQ", follow_redirects=False)
print(resp.status_code)          # 301 if active, 451 if blocked
print(resp.headers.get("Location"))

A blocked link returns HTTP 451 instead of a redirect.

You can report a short link for abuse. The url parameter accepts a short code, a full short URL, or a full external URL — the server resolves the domain automatically.

# Using just the short code
client.report("a7X9pQ", reason="This link points to a phishing page")

# Using the full short URL
client.report("https://syrt.cc/a7X9pQ", reason="This link points to a phishing page")

# Using a full external URL
client.report("https://malicious.com/page", reason="Malware distribution site")

The reason must be between 10 and 100 characters. A ValueError is raised client-side if the constraint is not met. The report is queued for manual review and does not immediately block the link.

Rate limit: 3 reports per IP per day.

License

This client library is released under the same license as the main project: Prosperity Public License 3.0.0.

Commercial use requires a commercial license from the copyright holder.

Metadata

Release files for speedyshortpy 0.2.0

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

Source distribution (sdist)

Source distribution for speedyshortpy 0.2.0
File Size Uploaded Provenance Actions
speedyshortpy-0.2.0.tar.gz 4.1 kB Without provenance Details for speedyshortpy-0.2.0.tar.gz

Built distribution (wheel)

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

Total release size: 8.7 kB

Release files / speedyshortpy-0.2.0.tar.gz

Download URL speedyshortpy-0.2.0.tar.gz
Size 4.1 kB
Tags Source
SHA-256 checksum
How to use checksums
453ee2d55c8aad08c271b9e96177be57ad25482566874ea8a38c255cad69fef6
BLAKE2b-256 checksum
How to use checksums
2166f83723ac322980436aa2562f40daf13894b9cce86814b054810e3c615b2d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.2

Release files / speedyshortpy-0.2.0-py3-none-any.whl

Download URL speedyshortpy-0.2.0-py3-none-any.whl
Size 4.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
fd696a72b6f42bd65d9d01c77e9e3674373fac67b7c53f223394a0a2b32db7c1
BLAKE2b-256 checksum
How to use checksums
246dabdcdd453bbdda8e9d202bf4fad7541b1f255fad9a4f602ac0019fae928b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.2

Security for speedyshortpy 0.2.0

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.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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