title: How to get the object id in PyMongo after an insert?
body: <p>I'm doing a simple insert into Mongo...</p>
  
  <pre><code>db.notes.insert({ title: "title", details: "note details"})
  </code></pre>
  
  <p>After the note document is inserted, I need to get the object id immediately. The result that comes back from the insert has some basic info regarding connection and errors, but no document and field info.</p>
  
  <p>I found some info about using the update() function with upsert=true, I'm just not sure if that's the right way to go, I have not yet tried it. </p>