Skip to main content

Memorable Unique Identifier

Project description

muid

Memorable Unique Identifiers

This makes no sense!

It makes no sense for a unique identifier to be memorable. That's antithetical.

And yet ...

If you are patient, try this:

from muid.memorable import muid4, mhash, mpretty
key  = muid4()       
print( mhash(key) )             

To produce unique identifier hashed to ... (stare hard)

f01dab1e-ca70-403a-a0c7-00f6c29596c4

which is within a few character translations of "readable hex":

foldable-cato-4o3a-aoct-oof6c29596c4

and transformed by mpretty() into

Foldable Cat  

using the supplied corpus of readable hex-like scrabble words.

The upshot

If you are prepared to wait minutes or hours for your unique identifiers, their hexadecimal hashes can be memorable phrases which might play a role in your application.

Mining

Got nothing better to do?

from muid.memorable import mine
mine()

Terminology

The set of strings refered to as "readable hex" is defined as the image of uuid strings (i.e. things generated by str(uuid.uuid4()) under the map which swaps out characters as follows: (5->s,1->l,7->t,0->o)

For worry warts ...

You can generate approximately 2.71 quintillion uuid4() before the risk of collision exceeds fifty percent. When using muid the relevant number is not the number of uuid's requested, but the number of attempts, which is reported. One would be surprised, to put it mildly, if this proves to be a a real issue. One can also provide Memorable.uuid with a different generator, such as one that produces longer random string.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

muid-0.0.3.tar.gz (6.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

muid-0.0.3-py3-none-any.whl (6.5 kB view details)

Uploaded Python 3

File details

Details for the file muid-0.0.3.tar.gz.

File metadata

  • Download URL: muid-0.0.3.tar.gz
  • Upload date:
  • Size: 6.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.43.0 CPython/3.7.4

File hashes

Hashes for muid-0.0.3.tar.gz
Algorithm Hash digest
SHA256 4d29d6bd3f3f619c07397a3cfd38c254db54b4f2d474e7d7af00b9d1b670397d
MD5 13d01bb0c594a67c3a2401a9cbb8c7f4
BLAKE2b-256 61a1888d7a926d2a11dfdcebedde1d714ef92596a197887c0670e45f6674146f

See more details on using hashes here.

File details

Details for the file muid-0.0.3-py3-none-any.whl.

File metadata

  • Download URL: muid-0.0.3-py3-none-any.whl
  • Upload date:
  • Size: 6.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.43.0 CPython/3.7.4

File hashes

Hashes for muid-0.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 85df5b25124e9b537d5b0bb642dfd73930e00bf8b083ccf93a7f137d15c1b314
MD5 6ac554d2ac229303324b48310bcf7331
BLAKE2b-256 1b7241fdf647c470de6315c591a949a9a0b84f24aeaf2ebb501e547e430947f3

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page