consul.callback module¶
- class consul.callback.CB[source]¶
Bases:
object- classmethod json(postprocess=None, allow_404=True, one=False, decode=False, is_id=False, index=False)[source]¶
postprocess is a function to apply to the final result.
allow_404 if set, None will be returned on 404, instead of raising NotFound.
index if set, a tuple of index, data will be returned.
one returns only the first item of the list of items. empty lists are coerced to None.
decode if specified this key will be base64 decoded.
is_id only the ‘ID’ field of the json object will be returned.