title: Creating a unique dictionary key
body: <h1>The problem</h1>
  <p>I am making an e-commerce in Django and the user can pick multiple items before adding them to the cart, I'm using the timestamp as an object id in the user's cart when add to cart button clicked.</p>
  <p>When add to cart button clicked I have a dict of</p>
  <pre><code>{&quot;item_id&quot;:&quot;qty&quot;}
  </code></pre>
  <p>creating the cart object goes like</p>
  <pre><code>{&quot;timestamp&quot;:&quot;item_id;qty&quot;}
  </code></pre>
  <p>the timestamp serves as an unique id so i can give id to the rows of the cart if they need to be deleted, if so sends the id of the element of the cart in the back-end and deletes the same element from the user's cart object</p>
  <p>The timestamp is not unique... The process is too fast that the timestamp stays the same and it does not make different keys any advice to have a different timestamp would be appreciated .</p>