Python WePay SDK
Python
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
docs
wepay
.gitignore
.landscape.yml
.travis.yml
AUTHORS.rst
CHANGELOG.rst
LICENSE
MANIFEST.in
README.rst
requirements.txt
setup.cfg
setup.py

README.rst

python-wepay: Python WePay SDK

Documentation Status Latest Version Number of PyPI downloads Code Health Tests Coverage Travis-CI

Features

  • Make API calls in a very natural pythonic way, ex:
>>> api = WePay(production=False, access_token='STAGE_243...')
>>> response = api.account.create("name", "description", type='nonprofit')
>>> account_id = response['account_id']
>>> callback_uri = "https://example.com/ipn/account/%s" % account_id
>>> response = api.account.modify(account_id, callback_uri=callback_uri)
>>> api.preapproval.create("short description", "daily", amount=45.5, account_id=account_id)
{'preapproval_id': 619202, 'preapproval_uri': 'https://stage.wepay.com/api/preapproval/619202'}
  • Validation of all required and optional parameters to each one of the calls.
  • Very easy construction of batch calls, simply by passing batch_mode=True to a call, ex:
>>> call1 = api.checkout.create(1234, short_description, type, amount, 'USD', batch_mode=True)
>>> call2 = api.withdrawal.find(1235, sort_order='ASC', access_token='access_token_for_other_account', batch_mode=True)
>>> response = api.batch.create(client_id, client_secret, [call1, call2])

About

This package started as a part of Django WePay Application, but I soon realized it could be useful to other developers in Python community that do not use Django. Originally it meant to be an extension of an official Python WePay SDK, but instead it became a replacement. This package is also listed as a third party Python SDK on WePay.

Status

Production.

Requirements

Installation

pip install python-wepay

Documentation

http://python-wepay.readthedocs.org/en/latest/index.html

License

MIT licensed. See the bundled LICENSE file for more details.