Skip to main content

Python implementation of the Ruby Signature library (

Project description


Python implementation of the Ruby Signature library


pip install apysignature


Client example

from apysignature import signature
params = {'some'='parameters'}
token = signature.Token('my_key', 'my_secret')
request = signature.Request('POST', '/api/thing', params)
auth_hash = request.sign(token)
query_params = params.update(auth_hash)'http://myservice/api/thing', data=query_params)

`query_params` looks like:


Server example (Django)

from apysignature import signature
auth_request = signature.Request(request.method, str(request.path), params)
public_key = params['auth_key']
token = signature.Token(public_key, private_key)
except AuthenticationError as e:
return HttpResponse('Unauthorized', status=401)

# Do whatever you need to do


Version > 0.2 is for Python 3
use < 0.2 for Python 2


Copyright (c) 2014 Erick Ponce. See LICENSE 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.

Files for apysignature, version 0.2.1
Filename, size File type Python version Upload date Hashes
Filename, size apysignature-0.2.1.tar.gz (3.9 kB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page