Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

A Flask wrapper for WePay's Python API

branch: master

Fetching latest commit…

Octocat-spinner-32-eaf2f5

Cannot retrieve the latest commit at this time

Octocat-spinner-32 flaskext
Octocat-spinner-32 .gitignore
Octocat-spinner-32 LICENSE
Octocat-spinner-32 README.markdown
Octocat-spinner-32 setup.py
Octocat-spinner-32 test_wepay.py
README.markdown

Flask-WePay

This extension provides a simple wrapper for WePay's Python API.

Installation

$ pip install flask-wepay

Usage

Provide your API key in your app's config file. The following may be set:

WEPAY_CONSUMER_KEY WEPAY_CONSUMER_SECRET WEPAY_IN_PRODUCTION WEPAY_ACCESS_TOKEN

Now in order to initialize the WePay object we pass the app object to it as follows:

from flask import Flask
from flaskext.wepay import WePay

app = Flask(__name__)
wepay = WePay(app)

The API of the WePay Python API is now exposed via this object. The following methods are available:

wepay.call(uri, params, token)

wepay.get_authorization_urls(redirect_uri, options={}, scope='')

wepay.get_token(redirect_uri, code)
Something went wrong with that request. Please try again.