Questions tagged [pymongo-2.x]

Version 2 of [pymongo]

Version 2 of the official Python driver for MongoDB.

PyMongo 3 is not backward compatible with PyMongo 2 (see the changelog). If you're not sure what version of PyMongo you're running, consider using the generic tag.

20 questions
0
votes
2 answers

MongoDB $concatenate Date Error

I am working on a mongo aggregation project to group average readings every two hours which returns the desired output as follows { "_id": { "Year": 2016, "locationID": " WL 001", "Day": 25, …
user1895915
  • 89
  • 2
  • 11
0
votes
1 answer

rs.stepDown using pymongo

I am trying to step down MongoDB primary using python script.I see the below on my output. Is there a way I can mark the exit code as OK. Code: if 'primary' in isMaster: primary =(isMaster['primary']).split(':')[0] conn =…
monicak
  • 45
  • 4
0
votes
1 answer

Database is not appearing in MongoVue

I am using MongoVue and Python library Pymongo to insert some documents. I used MongoVue to see the db created. It was not listed. However, I made a find() request in shell. I got all the inserted documents. Once I manually create DB all the…
Kavitha Madhavaraj
  • 562
  • 1
  • 6
  • 23
0
votes
1 answer

accessing specific key value via flask pymongo Object

lets say db = MongoEngine(app) class User(db.Document): uid = db.SequenceField() uname = db.StringField() user = User.objects I dont know much mongodb, but is something like this possible?: specific_user = user[uid]
user2290820
  • 2,709
  • 5
  • 34
  • 62
0
votes
2 answers

Abstract classes and PyMongo; can't instantiate abstract class

I created the empty abstract class AbstractStorage and inherited the Storage class from it: import abc import pymongo as mongo host = mongo.MongoClient() print(host.alive()) # True class AbstractStorage(metaclass=abc.ABCMeta): pass class…
vaultah
  • 44,105
  • 12
  • 114
  • 143
1
2