mktplace.mktplace_communication module

A class to canonicalize communication with the marketplace

exception mktplace.mktplace_communication.MessageException[source]

Bases: exceptions.Exception

A class to capture communication exceptions when accessing the marketplace

class mktplace.mktplace_communication.MarketPlaceCommunication(baseurl)[source]

Bases: object

A class to encapsulate communication with the market place servers

GET_HEADER = {'Accept': 'application/cbor'}
headrequest(path)[source]

Send an HTTP head request to the validator. Return the result code.

getmsg(path)[source]

Send an HTTP get request to the validator. If the resulting content is in JSON form, parse it & return the corresponding dictionary.

postmsg(msgtype, info, path='')[source]

Post a transaction message to the validator, parse the returning CBOR and return the corresponding dictionary.