title: Generate ID from string in Python
body: <p>I'm struggling a bit to generate ID of type <code>integer</code> for given <code>string</code> in Python.</p>
  
  <p>I thought the built-it <code>hash</code> function is perfect but it appears that the IDs are too long sometimes. It's a problem since I'm limited to 64bits as maximum length.</p>
  
  <p>My code so far: <code>hash(s) % 10000000000</code>.
  The input string(s) which I can expect will be in range of 12-512 chars long.</p>
  
  <p>Requirements are:</p>
  
  <ul>
  <li>integers only</li>
  <li>generated from provided string</li>
  <li>ideally up to 10-12 chars long (I'll have ~5 million items only)</li>
  <li>low probability of collision..?</li>
  </ul>
  
  <p>I would be glad if someone can provide any tips / solutions.</p>