Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Retrieve data from MongoDB
I saved some data in mongodb using mongoengine. That binary field look like this
{ "$binary": "/9j/4QA4.........ldfl==", "$type": "00"}
I need read / retrieve only that $binary part using mongoengine? How to do that?
I'm beginner for python programming. I'm developing a little python program and mongodb use as a database with mongoengine. In my program I stored data in mongodb collection coreectly without any error. Now I want to use that stored data for some processes. As a example in my case I stored some binary data and It stored in mongodb collection named user as {"propic"{"$binary": {"base64": "/9j/4AAQS........iigAooooAKKKKAP/2Q==","subType": "00"}}}. So I need get the data inside "base64" for a some process. How to do that?
Have you looked at this or this?
Feel like you're not getting the answers you want? Checkout the help/rules for things like what to include/not include in a post, how to use code tags, how to ask smart questions, and more.

Pro-tip - there's an inverse correlation between the number of lines of code posted and my enthusiasm for helping with a question :)

Possibly Related Threads…
Thread Author Replies Views Last Post
Exclamation MongoDB cannot connect - pymongo speedev 1 646 Aug-21-2021, 01:35 PM
Last Post: ndc85430
  Retrieve data from oscilloscope using pyserial on ubuntu jte350 3 1,153 Apr-29-2021, 04:36 PM
Last Post: jte350
  find a string in a field in MongoDB Leon79 2 1,039 Jul-19-2020, 09:20 PM
Last Post: menator01
  insert more data at once in MongoDB Leon79 2 1,120 Jul-05-2020, 01:34 PM
Last Post: Leon79
  Regex to retrieve data from json in script tag. DreamingInsanity 4 6,532 Dec-20-2019, 06:18 PM
Last Post: DreamingInsanity
  Load JSON file data into mongodb using pymongo klllmmm 1 9,566 Jun-28-2019, 12:47 AM
Last Post: klllmmm
  Retrieve data from Terminal output or from an ASE variable. DreamingInsanity 0 1,417 Jul-08-2018, 05:51 PM
Last Post: DreamingInsanity
  Collecting Data from Twitter with Tweepy and MongoDB fatony 1 2,733 Apr-10-2017, 09:38 PM
Last Post: fatony

Forum Jump:

User Panel Messages

Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020