Skip to content
Advertisement

Tag: pymongo

Unable to update database in Stripe webhook

I have a mongodb database tracking if a user has paid through stripe. Once a user pays, I would like to change the database from False to True. However, even though my webhook seems to be working on the Stripe dashboard, the database isn’t updating. Additionally, if I add a print statement it doesn’t print anything. I am using the

MongoDB/Python – Date in collection (to use for query)

I just started using mongoDB (Version 3.6.8) today, and I like it. I was reading that it should be possible to have a date object directly in the database, but I can’t get it to work. Also I was wondering if it is the best solution or if I should just store my dates as “Epoch millis” instead? I am

pymongo auth failed in python script

I have installed mongodb and enabled auth. and its working find. I can connect it from remote notebook using robomongo application: and We can connect from server shell locally using: Everything works fine, but when we try it using pymongo api. authentications failed. below is the python code: Tools used: Error trace: Solution: problem was with database name, following code

How to run MongoDB commands with pymongo?

I need to see list of connections to MongodDB. I know how to do it in mongo console: Now I want to do the same using pymongo. I tried following and it didn’t work: After that I used db.command() in various combinations trying to pass “db.currentOp(true)” to it without success. How to do it properly? The question is how to

Removing _id element from Pymongo results

I’m attempting to create a web service using MongoDB and Flask (using the pymongo driver). A query to the database returns documents with the “_id” field included, of course. I don’t want to send this to the client, so how do I remove it? Here’s a Flask route: This returns: I thought it was a dictionary and I could just

Advertisement