Skip to main content

Lightweight requests wrapper for REST API calls

Project description

Following the same philosophy of Requests module (REST) ApiConsumer is here to make your life easier.

Are you lazy enough to configure authentication for every single request? How about handling errors? Wouldn’t it be great if all that could be done in 2 lines?

How to use

Behold the power of ApiConsumer:

>>> from apiconsumer import ApiConsumer
>>> my_api = ApiConsumer(url='https://myapi.com', extra_headers={'Authorization': 'JWT mytoken'})
>>> users = my_api.get_users()

Making POST request is also easy:

>>> new_user = my_api.post_users(data={'email': 'someguy@something.com', 'password': 'correct-horse-battery-staple'})

How to install

$ pip install apiconsumer

Contribute

Be our guest. We’d like to see your awesome ideas. Just fork the repo, create a branch and create pull request.

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 apiconsumer, version 1.0.0b3
Filename, size File type Python version Upload date Hashes
Filename, size apiconsumer-1.0.0b3-py2.py3-none-any.whl (6.2 kB) File type Wheel Python version py2.py3 Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page