Return a generator of all processed data, it just like render
        but it'll not return a table or json format data but just
        data. And the data will be processed by fields_convert_map if passed.
435395
def objects(self, json_result=False):
        
        self.rows_num = 0
        query = self.query()
        if not isinstance(query, (orm.Result, list, dict)):
            query = do_(query)
        for record in query:
            self.rows_num += 1
            r = self.object(record, json_result)
            self._cal_sum(record)
            yield r
        total = self._render_sum(True)
        if total:
            yield total
1177309
def get_fields(self):
        
        for c in self.classes.values():
            for f in c.get_fields():
                yield f
11403
def to_html_(self) -> str:
        
        try:
            renderer = pytablewriter.HtmlTableWriter
            data = self._build_export(renderer)
            return data
        except Exception as e:
            self.err(e, "Can not convert data to html")
513259
def _create_raw_data(self):
        
        result = {}
        for section in self.get_sections():
            result[section.get('id')] = 'all'
        return result
1346270
def to_json(excluded_fields = [])
      hash = {}
      self.instance_variables.each do |var|
        hash[var.to_s.delete "@"] = self.instance_variable_get var unless excluded_fields.is_a?(Array) && excluded_fields.include?(var.to_s.delete "@")
      end
      JSON.pretty_generate(hash)
    end
707153
function finishRendering(data){
			// If none object found with given id return error
			if(id && !data[0])
				return next();

			// If querying for id, then returns only the object
			if(id)
				data = data[0];

			// Render the json
			res.send(data);
		}
470358
def render(data, saltenv='base', sls='', argline='', **kwargs):  # pylint: disable=unused-argument
    '''
    
    '''
    translate_newlines = kwargs.get('translate_newlines', False)
    return _decrypt_object(data, translate_newlines=translate_newlines)
202244
def render(self, data, accepted_media_type=None, renderer_context=None):
        

        wrapper = None
        success = False

        for wrapper_name in self.wrappers:
            wrapper_method = getattr(self, wrapper_name)
            try:
                wrapper = wrapper_method(data, renderer_context)
            except WrapperNotApplicable:
                pass
            else:
                success = True
                break

        if not success:
            raise WrapperNotApplicable(
                'No acceptable wrappers found for response.',
                data=data, renderer_context=renderer_context)

        renderer_context["indent"] = 4

        return super(JsonApiMixin, self).render(
            data=wrapper,
            accepted_media_type=accepted_media_type,
            renderer_context=renderer_context)
935520
def _converter(data):
    
    handler = REGISTRY.get(data.__class__)
    if handler:
        full_name = '{}.{}'.format(
            data.__class__.__module__,
            data.__class__.__name__)
        return {
            '__class__': full_name,
            '__value__': handler(data),
        }
    raise TypeError(repr(data) + " is not JSON serializable")
1121530
def render(self, data, accepted_media_type=None, renderer_context=None):
        
        if data is None:
            return ''

        stream = StringIO()

        xml = SimplerXMLGenerator(stream, self.charset)
        xml.startDocument()
        xml.startElement(self.root_tag_name, {})

        self._to_xml(xml, data)

        xml.endElement(self.root_tag_name)
        xml.endDocument()
        return stream.getvalue()
22701
def __json(self):
        
        if self.exclude_list is None:
            self.exclude_list = []
        fields = {}
        for key, item in vars(self).items():
            if hasattr(self, '_sa_instance_state'):
                # load only deferred objects
                if len(orm.attributes.instance_state(self).unloaded) > 0:
                    mapper = inspect(self)
                    for column in mapper.attrs:
                        column.key
                        column.value
            if str(key).startswith('_') or key in self.exclude_list:
                continue
            fields[key] = item
        obj = Json.safe_object(fields)
        return str(obj)
274330
def get_info(self):
        '''
        
        '''
        self.render()
        info = super(Template, self).get_info()
        res = {}
        res['name'] = self.get_name()
        res['mutation'] = {
            'current_index': self._current_index,
            'total_number': self.num_mutations()
        }
        res['value'] = {
            'rendered': {
                'base64': b64encode(self._current_rendered.tobytes()).decode(),
                'length_in_bytes': len(self._current_rendered.tobytes()),
            }
        }
        res['hash'] = self.hash()
        res['field'] = info
        return res
933695
def render_generator(self, context, result):
		
		context.response.encoding = 'utf8'
		context.response.app_iter = (
				(i.encode('utf8') if isinstance(i, unicode) else i)  # Stream encode unicode chunks.
				for i in result if i is not None  # Skip None values.
			)
		return True
428278
def fields(iterable, fields=None):
    
    if not fields:
        for item in iterable:
            yield item

    prepared_fields = _prepare_fields(fields)

    for item in iterable:
        yield _process_fields(item, prepared_fields)
292846
def to_markdown_(self) -> str:
        
        try:
            renderer = pytablewriter.MarkdownTableWriter
            data = self._build_export(renderer)
            return data
        except Exception as e:
            self.err(e, "Can not convert data to markdown")
278034
def render_chart_data(data):
    
    builder = HtmlBuilder()
    builder._render_objects(data, datatype='chartdata')
    return builder._to_html()
823414
def prepare_static_data(self, data):
        
        d = data.copy()
        for f in self.get_fields():
            if f['static'] and f['name'] in d:
                d[f['name']] = make_view_field(f, None, self.types_convert_map, self.fields_convert_map, d[f['name']])['display']
        return d