Posts

Showing posts with the label pymongo

How to use lookup filters to sort results in PythonEve using PyMongo

Image
Clash Royale CLAN TAG #URR8PPP How to use lookup filters to sort results in PythonEve using PyMongo In PythonEve using MongoDB, how can I get (internally) the last item created in a given collection? Looking into eve's mongo module find_one_raw looks like the way to go. I am trying something like the following without success: find_one_raw last = app.data.find_one_raw('aresource',**{"_created": {"sort": 1}}) last = app.data.find_one_raw('aresource',**{"_created": {"sort": 1}}) By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.