This package provides Python implementation of Smartbonus api. Supported all public api of smartbonus.
Project description
Smartbonus package for Python language
This package provides Python implementation of Smartbonus api. Supported all public api of smartbonus.
With 100% test coverage.
Installation
Use the pip
command:
$ pip install smartbonuspy
Requirements
Smartbonus package tested against Python 3.8.1
Example
from smartbonus import SmartBonus, set_root_path
# Creating sb
# Ask about params smartbonus team
set_root_path("https://your.smartbonus.com/api/v2/")
sb = SmartBonus("your store id")
# Get smartbonus info about client: catch error by self
client, ok = sb.get_client('0555555555')
print(client, ok)
# Get erorr
data, ok = sb.get_client('0555555555', raise_error=False)
if ok:
print('your client', data)
else:
print('error', data)
# see tests for more
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
smartbonuspy-0.0.3.tar.gz
(7.8 kB
view hashes)
Built Distribution
Close
Hashes for smartbonuspy-0.0.3-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b0c5282bd4ab9db5078826217786a07ee0b112fb4b4e6962e4b96df91696fbc4 |
|
MD5 | bce6822b7a71fd53af2d4fc85e2df99c |
|
BLAKE2b-256 | 409c1d05e78ab34f296b635efc541c47a1ca5fa101cd9dc1a946d403832e18b7 |