Skip to main content

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:

  1. 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),
  2. Generate your app password here,
  3. Install pyAllegro with pip install pyAllegro
  4. Import from pyAllegro.api import AllegroRestApi, AllegroWebApi
  5. 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:

To do

  • publish package on pypi
  • RestApi put
  • RestApi delete
  • restApi post

Changelog

ver. 0.1.0:

  • automatic token refreshing

ver. 0.1.1, 0.2.0:

  • load token automatically in RestApi.resource_get() method

ver. 0.3.0:

  • added response2JSON() function in WebApi - convert suds response to JSON.

Project details


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

pyAllegro-0.3.1-py3-none-any.whl (6.9 kB view details)

Uploaded Python 3

File details

Details for the file pyAllegro-0.3.1-py3-none-any.whl.

File metadata

  • Download URL: pyAllegro-0.3.1-py3-none-any.whl
  • Upload date:
  • Size: 6.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.11.0 pkginfo/1.4.2 requests/2.19.1 setuptools/40.1.0 requests-toolbelt/0.8.0 tqdm/4.24.0 CPython/3.6.4

File hashes

Hashes for pyAllegro-0.3.1-py3-none-any.whl
Algorithm Hash digest
SHA256 c23a2ea6853302a16383229e9bded01c469315685e3f1affc788f7a8d0f59d70
MD5 4cd48aa64059f201e5aba3ff592c464d
BLAKE2b-256 36c4a58c543a525d613c9589187f5d7df5712b72e4c930a11234976c2492f4e1

See more details on using hashes here.

Supported by

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