skip to navigation
skip to content

api-proxy 0.1.5

Thin layer to access resources living behind api's

Latest Version: 0.1.3

  • Compliant with django’s session authentication and csrf protection.
  • Inspired by django-rest-framework GenericView’s enforced url.


pip install api-proxy

Create a login proxy

import api_proxy as proxy

class Login(proxy.BaseProxy):
    url = '/login/'

login = Login(){'username': 'user', 'password': 'pass'})
print login.result.status_code
print login.result.json()

Create a resource proxy

class UserAccounts(proxy.ResourceProxy):
    url = '/users/'
    detail = '{username}'

users = User(session_source=login){'username': 'nedstark', 'password': '123'})
print users.result.json()
File Type Py Version Uploaded on Size
api-proxy-0.1.5.tar.gz (md5) Source 2014-01-23 2KB