Caliper API Custom Endpoint Request Handler

class q2_sdk.core.http_handlers.caliper_api_custom_handler.Q2CaliperAPICustomHandler(application, request, **kwargs)[source]

Bases: Q2BaseRequestHandler

RequestHandler meant to be used for requests incoming from CaliperAPI.

property stack_cache: Q2CacheClient[source]

Q2CacheClient scoped to the current financial institution stack.

async prepare()[source]

Fires before any request handling code

By default, will check any Rate Limiter instances in self.rate_limiters and disallow further processing if any are over their specified limit

property wedge_address_configs: dict

Alias to self.db_config

property request_parameters

A convenient parameter for all query parameters and/or request.body fields.

write(chunk)[source]

Writes the given chunk to the output buffer.

To write the output to the network, use the flush() method below.

If the given chunk is a dictionary, we write it as JSON and set the Content-Type of the response to be application/json. (if you want to send JSON as a different Content-Type, call set_header after calling write()).

Note that lists are not converted to JSON because of a potential cross-site security vulnerability. All JSON output should be wrapped in a dictionary. More details at http://haacked.com/archive/2009/06/25/json-hijacking.aspx/ and https://github.com/facebook/tornado/issues/1009

Return type:

None