Every line of 'to_dict('records')' code snippets is scanned for vulnerabilities by our powerful machine learning engine that combs millions of open source libraries, ensuring your Python code is secure.
135 @property 136 def as_dict(self): 137 return self._dict
46 def to_dict(self): 47 return { 48 'k': self.k, 49 'v': self.v, 50 'version': self.version, 51 'values': self.values, 52 }
43 def _mkrecords(data): 44 for record in data['records']: 45 attribs = record.pop('attributes') 46 yield dict( 47 model = 'salesforce.%s' % attribs['type'], 48 pk = record.pop('Id'), 49 fields = record, 50 )
83 def make_record(values, is_dump=True): 84 """ 85 Export recjson from drafts 86 """ 87 if is_dump: 88 record = Record(json=values, master_format='marc') 89 else: 90 record = Record(master_format='marc') 91 for k, v in six.iteritems(values): 92 record[k] = v 93 return record