Or wait, that's not python sort, that's part of pymongo. And theres a limit function in pymongo, pardon my noobness