Message from discussion
Return distinct keys from MongoDB using asyncmongo
Received: by 10.58.186.166 with SMTP id fl6mr3163618vec.24.1348522149168;
Mon, 24 Sep 2012 14:29:09 -0700 (PDT)
X-BeenThere: python-tornado@googlegroups.com
Received: by 10.52.89.80 with SMTP id bm16ls712636vdb.9.gmail; Mon, 24 Sep
2012 14:29:07 -0700 (PDT)
MIME-Version: 1.0
Received: by 10.52.23.145 with SMTP id m17mr2158435vdf.0.1348522146965; Mon,
24 Sep 2012 14:29:06 -0700 (PDT)
Authentication-Results: ls.google.com; spf=pass (google.com: domain of
alabdeloua...@gmail.com designates internal as permitted sender)
smtp.mail=alabdeloua...@gmail.com; dkim=pass
header...@gmail.com
Received: by k6g2000vbr.googlegroups.com with HTTP; Mon, 24 Sep 2012 14:29:06
-0700 (PDT)
Date: Mon, 24 Sep 2012 14:29:06 -0700 (PDT)
In-Reply-To: <b612634f-f5ce-41a5-ab8a-fd34e29af583@googlegroups.com>
References: <b612634f-f5ce-41a5-ab8a-fd34e29af583@googlegroups.com>
User-Agent: G2/1.0
X-HTTP-UserAgent: Mozilla/5.0 (Windows NT 5.1) AppleWebKit/535.7 (KHTML, like
Gecko) Chrome/16.0.912.77 Safari/535.7,gzip(gfe)
Message-ID: <df8b1a92-758d-4be0-9991-9fb2f14ee7be@k6g2000vbr.googlegroups.com>
Subject: Re: Return distinct keys from MongoDB using asyncmongo
From: aliane abdelouahab <alabdeloua...@gmail.com>
To: Tornado Web Server <python-tornado@googlegroups.com>
Content-Type: text/plain; charset=ISO-8859-1
have you tried it using this:
http://emptysquare.net/blog/introducing-motor-an-asynchronous-mongodb-driver-for-python-and-tornado/
On 24 sep, 22:14, L-R <laur...@human.co> wrote:
> I'm using asyncmongo with Tornado + gen.engine, and just wondering what the
> syntax is for the equivalent of db.collection.distinct("mykey")?
>
> I assume it's something like
>
> result, error = yield gen.Task(settings.DB.my_data.find, {},
> distinct=[("key","mykey")])
>
> But that won't work. Anyone know how to do this?
>
> Thanks.