title: Using Python's UUID to generate unique IDs, should I still check for duplicates?
body: <p>I'm using Python's UUID function to create unique IDs for objects to be stored in a database:</p>
  
  <pre><code>&gt;&gt;&gt; import uuid
  &gt;&gt;&gt; print uuid.uuid4()
  2eec67d5-450a-48d4-a92f-e387530b1b8b
  </code></pre>
  
  <p>Is it ok to assume that this is indeed a unique ID? </p>
  
  <p>Or should I double-check that this unique ID has not already been generated against my database before accepting it as valid.</p>