Python flask._compat.iteritems() Examples
The following are 6
code examples of flask._compat.iteritems().
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example.
You may also want to check out all available functions/classes of the module
flask._compat
, or try the search function
.
Example #1
Source File: tag.py From recruit with Apache License 2.0 | 5 votes |
def to_json(self, value): # JSON objects may only have string keys, so don't bother tagging the # key here. return dict((k, self.serializer.tag(v)) for k, v in iteritems(value))
Example #2
Source File: tag.py From Building-Recommendation-Systems-with-Python with MIT License | 5 votes |
def to_json(self, value): # JSON objects may only have string keys, so don't bother tagging the # key here. return dict((k, self.serializer.tag(v)) for k, v in iteritems(value))
Example #3
Source File: tag.py From Building-Recommendation-Systems-with-Python with MIT License | 5 votes |
def to_json(self, value): # JSON objects may only have string keys, so don't bother tagging the # key here. return dict((k, self.serializer.tag(v)) for k, v in iteritems(value))
Example #4
Source File: tag.py From scylla with Apache License 2.0 | 5 votes |
def to_json(self, value): # JSON objects may only have string keys, so don't bother tagging the # key here. return dict((k, self.serializer.tag(v)) for k, v in iteritems(value))
Example #5
Source File: config.py From ctpbee with MIT License | 5 votes |
def get_namespace(self, namespace, lowercase=True, trim_namespace=True): """获取命名空间""" rv = {} for k, v in iteritems(self): if not k.startswith(namespace): continue if trim_namespace: key = k[len(namespace):] else: key = k if lowercase: key = key.lower() rv[key] = v return rv
Example #6
Source File: tag.py From android_universal with MIT License | 5 votes |
def to_json(self, value): # JSON objects may only have string keys, so don't bother tagging the # key here. return dict((k, self.serializer.tag(v)) for k, v in iteritems(value))