Skip to main content
Warning: You are using the test version of PyPI. This is a pre-production deployment of Warehouse. Changes made here affect the production instance of TestPyPI (
Help us improve Python packaging - Donate today!

The Python client library for the Beans API

Project Description

[Beans]( SDK allows you to easily integrate a loyalty program in your application.


We recommend installing with pip.
pip install beans


Beans SDK needs [Beans Plugin]( in order to correctly work.

The following is the syntax for making API requests:
import beans

# Initialize the API
beans.initialize('SECRET_KEY')'[module]/[action]/', [params], [cookies])
- [module] : The module to call, e.g. reward. [Module list](
- [action] : Each module supports multiple actions such as add or get.
- [cookies]: cookies associated to the request
- [params] : Arguments as dictionary (optional)

A secret key is required for using the SDK. To get a secret key, need to have a Business account on [Beans](

Example and error handling

# Check if the user possess your card
is_beans_card ='card/check/', cookies=request.cookies)

# Add 1000 beans point to the user card
if is_beans_card:
arg = {'beans': 1000}'beans/add/',params=arg, cookies=cookies)
except beans.BeansException as e:

Here is the [List of API methods](

Python Version Supported
- 2.7
- 3.3
- 3.4
Release History

Release History

This version
History Node


History Node


Download Files

Download Files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
beans-1.0.1.tar.gz (3.6 kB) Copy SHA256 Checksum SHA256 Source Jun 21, 2014

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting