Skip to main content
Join the official 2019 Python Developers SurveyStart the survey!

Python client to shoper.pl REST api

Project description

pyshoper - Python client to shoper.pl REST api

Summary

Exampler of use

Basic usage of pyshoper:

from pyshoper.client import ShoperClient

base_url = "https://example.com"
api = ShoperClient('login', 'password', base_url=base_url)

print(api.products_list(filters={'stock.stock': 0}))

and expected result should something alike:

{
    'count': '49',
    'list': [
        {'code': 'prod-0001', ...},
        {'code': 'prod-0002', ...},
        {'code': 'prod-0003', ...},
        {'code': 'prod-0004', ...},
        ...
    ],
    'page': 1,
    'pages': 5,
}

to iterate through all products using client's generator:

for i, prod in enumerate(api.products_generator(limit=100)):
    print(prod)
    if i > 200:
        break

More

Exceptions

Project details


Download files

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

Files for pyshoper, version 0.1.2
Filename, size File type Python version Upload date Hashes
Filename, size pyshoper-0.1.2-py3-none-any.whl (16.9 kB) File type Wheel Python version py3 Upload date Hashes View hashes
Filename, size pyshoper-0.1.2.tar.gz (10.7 kB) File type Source Python version None Upload date Hashes View hashes

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page