LazyRequests

This class provides a set of functions to interact with the requests library. It can cache a requests invocation for latter use, or call it immediately. This behaviour allows to check the the url of the request before calling it or to instantiate requests to call them in parallel later.

class meraki_api.LazyRequests(url, headers, data=None)

Allow to call requests lazily. When called you should provide all the necessary parameters to call make the request. By default the header and the url are mandatory. The data parameter is optional, and should only be provided if we want to call a put or post request.

cache(method)

Caches a function that calls a requests method with the saved params.

call()

Invokes the cached function or throws an error.

delete()

Caches a function that calls requests.delete with current parameters.

get()

Caches a function that calls requests.get with current parameters.

post()

Caches a function that calls requests.post with current parameters.

put()

Caches a function that calls requests.put with current parameters.