title: How to track newly added record to NDB datastore?
body: <p>I've used the following code before:</p>
  
  <pre><code>def add_movie(movie_id, title, picture, description):
      movie = Movies(
          id=movie_id,
          title=title,
          picture=picture,
          description=description
          )
      movie.put()
  </code></pre>
  
  <p>but it didn't allow me know if movie was added as new record or if existing movie was update. So, I've changed the code to the following:</p>
  
  <pre><code>def add_movie(movie_id, title, picture, description):
      newly_added = True
      movie = Movies.get_by_id(movie_id)
      if movie:
          newly_added = False
      movie.id = movie_id
      movie.title = title
      movie.picture = picture
      movie.description = description
      movie.put()
      return newly_added
  </code></pre>
  
  <p>But looks like it will get movie first and only after that will update it. So 2 requests to datastore instead of 1. </p>
  
  <p>Is there any other way to do the same?
  Or, am I wrong and both approaches are the same from performance perspective?</p>