Return raw string format from the instance

        :return:
542039
def raw(self) -> str:
        
        doc = """Version: {0}
Type: Transaction
Currency: {1}
""".format(self.version,
           self.currency)

        if self.version >= 3:
            doc += "Blockstamp: {0}\n".format(self.blockstamp)

        doc += "Locktime: {0}\n".format(self.locktime)

        doc += "Issuers:\n"
        for p in self.issuers:
            doc += "{0}\n".format(p)

        doc += "Inputs:\n"
        for i in self.inputs:
            doc += "{0}\n".format(i.inline(self.version))

        doc += "Unlocks:\n"
        for u in self.unlocks:
            doc += "{0}\n".format(u.inline())

        doc += "Outputs:\n"
        for o in self.outputs:
            doc += "{0}\n".format(o.inline())

        doc += "Comment: "
        doc += "{0}\n".format(self.comment)

        return doc
309616
def _parse_syntax(self, raw):
        
        raw = str(raw)  # treat the value as a string regardless of its actual data type
        has_syntax = re.findall(r'<(\^)?(fk__)?(\w+)?([0-9]*[.]?[0-9]+?)?(\:)?([0-9]*[.]?[0-9]+?)?(\:)?([0-9]*[.]?[0-9]+?)?>', raw, flags=re.DOTALL)

        if has_syntax:
            fake_val = re.sub(
                r'\'?\"?<(\^)?(fk__)?(\w+)?([0-9]*[.]?[0-9]+?)?(\:)?([0-9]*[.]?[0-9]+?)?(\:)?([0-9]*[.]?[0-9]+?)?>\'?\"?',
                self._replace_faker_attr,
                raw,
                flags=re.DOTALL
            )
            fake_val = fake_val.replace("'", '"')
            try:
                fake_val = json.loads(fake_val)
            except:
                pass
            return fake_val
        else:
            return raw
731284
def raw(self, query, settings=None, stream=False):
        '''
        
        '''
        query = self._substitute(query, None)
        return self._send(query, settings=settings, stream=stream).text
715140
def _extract_format_keys(self, fmt_string):
        

        class AccessSaver:
            def __init__(self):
                self.keys = []

            def __getitem__(self, key):
                self.keys.append(key)

        a = AccessSaver()
        fmt_string % a

        return a.keys
1282095
def str_def(self):
        
        return "classname={!r}; min_api_version={!r}; api_version={!r}; " \
            "message={!r};". \
            format(self.__class__.__name__, self.min_api_version,
                   self.api_version, self.args[0])
788174
def formatted_str(self, format):
        
        assert(format in ('json', 'csv'))
        ret_str_list = []
        for rec in self._records:
            if format == 'json':
                ret_str_list.append('{')
                for i in xrange(len(rec)):
                    colname, colval = self._rdef[i].name, rec[i]
                    ret_str_list.append('"%s":"%s"' % (colname, str(colval).replace('"', r'\"')))
                    ret_str_list.append(',')
                ret_str_list.pop()  # drop last comma
                ret_str_list.append('}%s' % (os.linesep))
            elif format == 'csv':
                for i in xrange(len(rec)):
                    colval = rec[i]
                    ret_str_list.append('"%s"' % (str(colval).replace('"', r'\"')))
                    ret_str_list.append(',')
                ret_str_list.pop()  # drop last comma
                ret_str_list.append('%s' % (os.linesep))
            else:
                assert(False)
        return ''.join(ret_str_list)
1206389
def from_raw(self, raw: RawScalar) -> Optional[ScalarValue]:
        
        if isinstance(raw, str):
            return raw
95906
def str_def(self):
        
        return "classname={!r}; line={!r}; column={!r}; message={!r};". \
            format(self.__class__.__name__, self.line, self.column,
                   self.args[0])
1096975
def str_def(self):
        
        return "classname={!r}; connect_retries={!r}; message={!r};". \
            format(self.__class__.__name__, self.connect_retries, self.args[0])
785963
def raw(self) -> str:
        
        doc = """Version: {0}
Type: Peer
Currency: {1}
PublicKey: {2}
Block: {3}
Endpoints:
""".format(self.version, self.currency, self.pubkey, self.blockUID)

        for _endpoint in self.endpoints:
            doc += "{0}\n".format(_endpoint.inline())

        return doc
553226
def raw(self):
        
        if self._raw:
            return text_type(self._raw).strip("\r\n")
        else:
            return text_type(base64decode(self._b64encoded)).strip("\r\n")
1036938
def GetStructFormatString(self):
    
    if self._format_string is None and self._data_type_maps:
      format_strings = []
      for member_data_type_map in self._data_type_maps:
        if member_data_type_map is None:
          return None

        member_format_string = member_data_type_map.GetStructFormatString()
        if member_format_string is None:
          return None

        format_strings.append(member_format_string)

      self._format_string = ''.join(format_strings)

    return self._format_string
725071
def get_raw_data(self, mac, response_format='json'):
        

        data = {
            self._FORMAT_F: response_format,
            self._SEARCH_F: mac
        }

        response = self.__decode_str(self.__call_api(self.__url, data), 'utf-8')

        if len(response) > 0:
            return response
        raise EmptyResponseException()
465884
def raw(self):
        
        if self._raw is None:
            self._raw = HttpStream(self)
        return self._raw
410536
def raw(self):
        
        try:
            return urlopen(str(self.url))
        except HTTPError as error:
            try:
                # parse error body as json and use message property as error message
                parsed = self._parsejson(error)
                exc = RequestError(parsed['message'])
                exc.__cause__ = None
                raise exc
            except ValueError:
                # when error body is not valid json, error might be caused by server
                exc = StatbankError()
                exc.__cause__ = None
                raise exc
595458
def to_str(self):
        ''''''
        pairs = []
        for name, value in self.get_all():
            if value and self._wrap_width:
                pairs.append('{0}:{1}'.format(
                    name,
                    '\r\n'.join(textwrap.wrap(
                        value, width=self._wrap_width,
                        drop_whitespace=False, initial_indent=' ',
                        subsequent_indent=' '
                    ))
                ))
            elif value:
                pairs.append('{0}: {1}'.format(name, value))
            else:
                pairs.append('{0}:'.format(name))

        pairs.append('')
        return '\r\n'.join(pairs)
1197189
def RawData(self):
    """"""
    result = collections.OrderedDict()

    i = 0
    while True:
      try:
        name, value, value_type = winreg.EnumValue(self._AccessRootKey(), i)
        # Only support strings here.
        if value_type == winreg.REG_SZ:
          precondition.AssertType(value, Text)
          result[name] = value
      except OSError:
        break

      i += 1

    return result