Re: [mongodb-user] Filter out _id field from pymongo (Python driver) results?

15 views
Skip to first unread message

Bernie Hackett

unread,
Sep 10, 2012, 3:17:25 AM9/10/12
to mongod...@googlegroups.com
Pass {'_id': False} as the second parameter (fields) to Collection.find().

On Sun, Sep 9, 2012 at 9:45 PM, ddw <david...@gmail.com> wrote:
> I'm creating an API using Python and MongoDB with the pymongo driver. I
> don't want to return the _id field to the client. I searched all over the
> documentation - is there any way to filter that field out of the results in
> Python?
>
> Thanks!
>
> --
> You received this message because you are subscribed to the Google
> Groups "mongodb-user" group.
> To post to this group, send email to mongod...@googlegroups.com
> To unsubscribe from this group, send email to
> mongodb-user...@googlegroups.com
> See also the IRC channel -- freenode.net#mongodb
Reply all
Reply to author
Forward
0 new messages