YOURLS Client

This small library was created to provide an easy interface to YOURLS from a python program.

Simple example of shortening a URL:

import yourls.client

c = yourls.client.YourlsClient('http://localhost/yourls/yourls-api.php', username='username', password='password')
url = c.shorten('http://autoqa.fedorahosted.org/autoqa', custom='autoqa')

News

There has been a change in how errors are thrown in 0.2.0, please see the API documenatation for details.

Code Download

The code can be checked out from the github repository:
  • git clone git://github.com/tflink/python-yourls.git
Or the code can be downloaded as a tarball from github:

API Documentation

exception yourls.YourlsError(message)[source]

Base exception for all Yourls exceptions

exception yourls.YourlsOperationError(url, message)[source]

Error during URL operations

Indices and tables