pyAllegro is a framework, that provides a simple way to use Allegro Web API and Rest AP.
Project description
allegro-api
pyAllegro is a framework, that provides a simple way to use Allegro Web API and Rest AP. You don't need to know how RESTful, SOAP or oauth 2.0 works.
As for now it's prepared for getting data from allegro - not for managing your account or bidding.
Get started:
- Go to https://apps.developer.allegro.pl/ and register your app. You need to setup redirecion url to
http://localhost:8000
- it will be your local server that recive your autorization data (oauth 2.0), - Generate your app password here,
- Install pyAllegro with
pip install pyAllegro
- Import
from pyAllegro.api import AllegroRestApi, AllegroWebApi
- Setup credentials that you recived from allegro (by default it's saved here: '/Users/{user}/.allegroApiConfig'):
WebApi = AllegroWebApi()
WebApi.credentials_set(
appName='<credentials from allegro>',
clientId='<credentials from allegro>',
clientSecred='<credentials from allegro>',
userLogin='<allegro login>',
redirectUrl='<redirect uri - the same you provided during app registration on allegro >',
appPassword='<app password>'
)
RestApi = AllegroRestApi()
RestApi.credentials_set(
appName='<credentials from allegro>',
clientId='<credentials from allegro>',
clientSecred='<credentials from allegro>',
redirectUrl='http://localhost:8000'
)
How to use pyAllegro:
Allegro api documentation:
References
Thanks to:
- https://cwsi.pl/ecommerce/allegro/podstawy-obslugi-web-api-allegro-pl-web-services-i-modul-suds-jurko-w-pythonie
- https://cwsi.pl/ecommerce/allegro/allegro-pl-rest-api-w-pythonie-wprowadzenie/
To do
- publish package on pypi
- RestApi put
- RestApi delete
- restApi post
Changelog
ver. 0.1.0:
- automatic token refreshing
ver. 0.1.1:
- load token automatically in
RestApi.resource_get()
method
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 Distributions
No source distribution files available for this release.See tutorial on generating distribution archives.
Built Distribution
Close
Hashes for pyAllegro-0.2.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8000cd22320247e138f8a2f1c37de8b37a2f89cd43ef73ae2f3720ec135d7478 |
|
MD5 | 13eab7e98d76cf8696e6815582f6a0d0 |
|
BLAKE2b-256 | 8fc35a36624c81d2e11093eb0c9c491290c9aa223dc2ea526a51dfca6b8e2a99 |