Skip to main content

A module that provides access to .gd URL Shortener

Project description

Python Module for is.gd - v.gd URL Shortener.

What is this?

GD Shortener allow Python software to access is.gd - v.gd URL shortener service.

Using this module you could shorten an URL to a small one like Twitter does for its link.

This service is provided by is.gd - v.gd and, thru the classes in this module, you could view stats on shortened URLs and obtain reverse lookup on URLs.

Install

To install GD Shortener, run the following command:

pip install gdshortener

Usage

After install, to use GD Shortener is sufficient to import the package, choose the implementing class ISGDShortener or VGDShortener (it maps to is.gd or v.gd) and use the following code:

import gdshortener

s = gdshortener.ISGDShortener()
print s.shorten('http://www.google.com')

If you want statistic usage on a URL use:

print s.shorten(url = 'http://www.google.com', log_stat = True)

If you want a custom URL use:

print s.shorten(url = 'http://www.google.com', custom_url = 'Pippus')

If you have an already shortened URL and want a reverse looup:

print s.lookup('http://is.gd/Pippus')

License

GD Shortener is licensed under LGPL. See LICENSE.txt for details.

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

gdshortener-0.0.1.tar.gz (4.5 kB view details)

Uploaded Source

File details

Details for the file gdshortener-0.0.1.tar.gz.

File metadata

  • Download URL: gdshortener-0.0.1.tar.gz
  • Upload date:
  • Size: 4.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for gdshortener-0.0.1.tar.gz
Algorithm Hash digest
SHA256 4ea9d05bd8b430939d18790a5be6c0923a9db936efaea3b41221e2015b603ed4
MD5 f3e1129be82af9f1c6628757a68ff87a
BLAKE2b-256 7a36d6d0e054b73f0f7ffd1cb479f7014502807de2618f2677a769cb9f2f3e3e

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