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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
pyshoper-0.1.2.tar.gz
(10.7 kB
view details)
Built Distribution
pyshoper-0.1.2-py3-none-any.whl
(16.9 kB
view details)
File details
Details for the file pyshoper-0.1.2.tar.gz
.
File metadata
- Download URL: pyshoper-0.1.2.tar.gz
- Upload date:
- Size: 10.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: python-requests/2.20.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3157d4ac9889be7a095547d46522f2ef17ae6a780e7fa5d76e0424f1668f6e4e |
|
MD5 | a5be2d40d03a4d3343bb05d29d6542eb |
|
BLAKE2b-256 | a8925fb67bb5fbabab7108d675988bf58c9908b8ddda8008f3a2cbb520f4ed5e |
File details
Details for the file pyshoper-0.1.2-py3-none-any.whl
.
File metadata
- Download URL: pyshoper-0.1.2-py3-none-any.whl
- Upload date:
- Size: 16.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: python-requests/2.20.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9a10a8259ce6dbfbb53172bcd5964e612bbae368a512e444f8335f9934a46ede |
|
MD5 | d99362bd3d8dd2d9cc4c3d25edd6b8ba |
|
BLAKE2b-256 | c4d95e823a0d11791b8febb26cf66f548103ad48c0c88a576af47b69cb796a53 |