BeanBag

BeanBag is a set of modules that provide some syntactic sugar to make interacting with REST APIs easy and pleasant.

A simple example:

>>> import beanbag  # version 1 api
>>> github = beanbag.BeanBag("https://api.github.com")
>>> watchers = github.repos.ajtowns.beanbag.watchers()
>>> for w in watchers:
...     print(w["login"])
>>> import beanbag.v2 as beanbag # version 2 api
>>> github = beanbag.BeanBag("https://api.github.com")
>>> watchers = GET(github.repos.ajtowns.beanbag.watchers)
>>> for w in watchers:
...     print(w.login)

Credits

Code contributors:

Documentation contributors:

Test case contributors and bug reporters:

BeanBag is inspired by Kadir Pekel’s Hammock, though sadly only shares a license, and not any actual code. Hammock is available from https://github.com/kadirpekel/hammock.

Indices and tables