>>> aa={'a':123, 'b':323, 'c':123, 'd':123, 'e':453, 'f':56}
>>> aa
{'a': 123, 'b': 323, 'c': 123, 'd': 123, 'e': 453, 'f': 56}
>>> dict(sorted(aa.items(), key=lambda item: item[1], reverse=True))
{'e': 453, 'b': 323, 'a': 123, 'c': 123, 'd': 123, 'f': 56}
>>> dict(sorted(aa.items(), key=lambda item: item[1], reverse=False))
{'f': 56, 'a': 123, 'c': 123, 'd': 123, 'b': 323, 'e': 453}