项目作者: txerpa

项目描述 :
Python client for Besepa's API
高级语言: Python
项目地址: git://github.com/txerpa/besepa-python.git
创建时间: 2017-10-13T12:03:31Z
项目社区:https://github.com/txerpa/besepa-python

开源协议:MIT License

下载


Besepa Python

Build Status codecov Scrutinizer Code Quality

ALPHA STAGE, dont use in production

The Besepa Python provides simple python wrapper to Besepa.com’s API. The Besepa APIs ara fully supported by the SDK.

Installation

Install using pip:

  1. pip install besepa

Configuration

Register a account and get your api_key at Besepa Portal.

  1. import besepa
  2. besepa.configure({
  3. "mode": "sandbox", # sandbox or live
  4. "api_key": "EBWKjlELKMYqRNQ6sYvFo64FtaRLRR5BdHEESmha49TM" })

Configure through environment variables:

  1. export BESEPA_MODE=sandbox # sandbox or live
  2. export BESEPA_API_KEY=EBWKjlELKMYqRNQ6sYvFo64FtaRLRR5BdHEESmha49TM

Configure through a non-global API object

  1. import besepa
  2. my_api = besepa.Api({
  3. 'mode': 'sandbox',
  4. 'api_key': '...'})
  5. payment = besepa.Debit({...}, api=my_api)

Development

To work on the Besepa SDK codebase, you’ll want to clone the repository,
and create a Python virtualenv with the project requirements installed:

  1. $ git clone git@github.com:txerpa/besepa.git
  2. $ cd besepa
  3. $ ./scripts/setup

To run the continuous integration tests and code linting:

  1. $ ./scripts/test
  2. $ ./scripts/lint