Skip to main content

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)

Uploaded Source

Built Distribution

smartbonuspy-0.0.3-py3-none-any.whl (9.4 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page