8000 GitHub - txerpa/besepa-python: Python client for Besepa's API
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

txerpa/besepa-python

Repository files navigation

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:

pip install besepa

Configuration

Register a account and get your api_key at Besepa Portal.

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

Configure through environment variables:

export BESEPA_MODE=sandbox   # sandbox or live
export BESEPA_API_KEY=EBWKjlELKMYqRNQ6sYvFo64FtaRLRR5BdHEESmha49TM

Configure through a non-global API object

import besepa
my_api = besepa.Api({
  'mode': 'sandbox',
  'api_key': '...'})

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:

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

To run the continuous integration tests and code linting:

$ ./scripts/test
$ ./scripts/lint
0