Skip to main content

advurl_shortner - Advanced URL Shortener for Python

Software License

Easy-to-use, powerful python library to help you to shorten urls with advanced options. Supports multiple domains, URL TTL, split tests, visit statistics etc. An extended native Python wrapper for AdvUrlShortner API with minimal requirements. Supports all methods and types of responses.

Features

  • Easy to use
  • Multiple domains
  • URL TTL (Time-To-Live) in seconds. Auto expiry URL after some time.
  • Redirect to second URL after primary URL expires (TTL)
  • Randomized and weighted randomnized redirect to different URLs (split tests etc.)
  • Password-protected statistics of visits to a shortened URL
  • Password protected shortened URL parameters (TTL, second URL, etc.)

Installation

In order install this package, simply run:

pip install advurl_shortner

Usage

To use shorten_url, you first need to import the package:

import advurl_shortner

Shorten URL:

advurl_shortner.short("https://google.com/")
# Returns the shortened URLs in JSON
# Example: {"urls": ["https://liii.pw/N", "https://illi.ink/N", "https://illi.cfd/N"]}

advurl_shortner.short("https://google.com/", description="Google search engine", password="1234x")
# Returns shortened URLs, sets a password to access visiting statistics and shortened URL parameters.

advurl_shortner.short("https://google.com/", ttl=86400)
# Returns the shortened URLs., after 24 hours (86400 seconds) will return "The Link You Followed Has Expired"

advurl_shortner.short("https://google.com/", ttl=86400, second_url="https://bing.com/")
# Returns the shortened URLs., after 24 hours (86400 seconds)  shortened link will redirect to second_url

advurl_shortner.short("https://google.com/",second_url="https://bing.com/")
# Returns shortened URLs. The shortened link is randomly redirected to one of the provided URLs.

advurl_shortner.short("https://google.com/",second_url="https://bing.com/", weights=[0.3, 0.7])
# Returns shortened URLs.
# The shortened link is randomly (weighted by weight parameter) redirected to one of the provided URLs.
# approximately 30% to "https://google.com/ and 70% to "https://bing.com/"

Getting short URL parameters and visit statistics:

advurl_shortner.stat("https://illi.cfd/H","aaa")
# Returns the parameters and visit statistics of the shortened URL stored with password "1234x".
# Example:
#{
#	"url": "http://google.com/?z=1",
#	"second_url": "http://yahoo.com/",
#	"ttl": null,
#	"date_created": "1703411470",
#	"weights": null,
#	"description":"Yahoo search engine",
#	"visits": 4,
#	"primary_url_expired": false
#}

TODO:

  • More than 2 URLs
  • Advanced visit statistics

Metadata

Release files for advurl-shortner 1.0.3

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

Source distribution (sdist)

Source distribution for advurl-shortner 1.0.3
File Size Uploaded Provenance
advurl_shortner-1.0.3.tar.gz 3.6 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for advurl-shortner 1.0.3
File Interpreter ABI Platform
advurl_shortner-1.0.3-py3-none-any.whl Python 3 none any Details

Total release size: 7.6 kB

Release files / advurl_shortner-1.0.3.tar.gz

Download URL advurl_shortner-1.0.3.tar.gz
Size 3.6 kB
Tags Source
SHA-256 checksum
How to use checksums
9eafb48abefc1b30262f3c9ef32c65ca79b1a3d9d6f8404882ce1e6d5f1b835c
BLAKE2b-256 checksum
How to use checksums
499fbfa0227deee23835b6029837aaba7703756a500f4c7ef8891905eb7ae456
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.6

Release files / advurl_shortner-1.0.3-py3-none-any.whl

Download URL advurl_shortner-1.0.3-py3-none-any.whl
Size 4.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
76c42325006d50d5da0ca417231234d273b59819dcfa96d7c2140d73712009f8
BLAKE2b-256 checksum
How to use checksums
6d2d41e2462dd405c8997282efaed3652118463275b5929dfca02c227ddb900d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.6

Security for advurl-shortner 1.0.3

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