diff --git a/catDB.py b/catDB.py new file mode 100644 index 0000000000000000000000000000000000000000..33df663cfb209e281112bc4dbcb207e21aa7b3d7 --- /dev/null +++ b/catDB.py @@ -0,0 +1,24 @@ +# pymongo for MongoDB support +import pymongo +# For timestamping in MongoDB +import datetime + +#pymongo connect +DBConHost = 'localhost' +DBConPort = 27017 +DBName = 'matningar' +DBTableName = 'stability' + +DBCon = pymongo.MongoClient(DBConHost, DBConPort) +DB = DBCon[DBName] +DBTableStability = DB[DBTableName] + +#post = { + ##"timestamp" : int(time.time()), +##Not needed since first 4bits of _id is timestamp + #"stability" : mos, + #"position" : False # Position appended here +#} + +for post in DBTableStability.find(): + print(post)