Catalog PyPI
Back to packageRELEASE DETAILS

1.0.3

PyPI

advurl-shortner

Easy-to-use, powerful python library to help you to shorten urls with advanced options.

apishortenurlurl_shortner
Published8 Jan 2024
Direct dependencies1
Transitive dependenciesNot calculated

README

Version 1.0.3 documentation

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

Downloads & popularity

Awaiting observations

No metric observations yet

Download counts and popularity will appear here as the collector receives them.

Declared dependencies 1

Native requirements
1 direct targetsNot calculated transitive count
Package / targetRequirementRelationship
requests
Environment
{
  "extras": "",
  "marker": null,
  "requires_python": ">=3, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*",
  "evaluation": "NOT_EVALUATED"
}
requests >=2.23.0runtime

Distribution files

2 collected
advurl_shortner-1.0.3-py3-none-any.whl

bdist_wheel · 3.87 KB · Python py3

Source file
advurl_shortner-1.0.3.tar.gz

sdist · 3.53 KB · Python source

Source file

Repository

PENDING
advurlshortner/advurl-shortner-python

Shared repository data · GitHub

License detected in repository
Not collected

Metadata history

Meaningful changes
Current collected state Current

Observed since 20 Oct, 20:06 UTC

No superseded metadata states collected. Unchanged observations do not create new revisions.

Record identity

package_version:2a7f6f0379dc87c732b4919deb8955e364a2eec6545e39e2f4523ddc2df6b351

Other collected versions

View all collected versions →