Skip to content

Python client for go.debian.net and deb.li URL shortening service

License

Notifications You must be signed in to change notification settings

ninjatrench/GoDebian_api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Make In India <3

Documentation and Wiki

Python client for go.debian.net and deb.li URL shortening service

Full documentation is available at https://wiki.debian.org/deb.li

Installation

Python 2.6+

sudo pip install GoDebian_api

Python 3.2+

sudo pip3 install GoDebian_api

sudo is optional (used for system wide installtion, not required while using virtualenv

Features

  • Consume deb.li and go.debian.net API | URL shoretening service
  • Check for IP whitelist for this service
  • Add new URL against randomly generated key
  • Add static URL against pre-defined KEY
  • Get existing URL via KEY
  • Generate preview URL
  • Pure Python Module
  • Works with Python 2.6+ and 3.2+
  • No dependencies

Usage Examples

>>> import GoDebian
>>> a = GoDebian.GoDebianApi()

>>> a.add_url("http://www.debian.org")
'http://go.debian.net/3xEIl'

>>> a.get_url("3xEIl")
'http://www.debian.org'

>>> a.get_preview_url("3xEIl")
'http://go.debian.net/p/3xEIl'

>>> a.add_static_url("http://harshdaftary.com", "harsh")
'http://go.debian.net/harsh'

>>>a.get_url("harsh")
'http://harshdaftary.com'

About

Python client for go.debian.net and deb.li URL shortening service

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages