Table of Contents
Configurable unique ID generation.
Provided is an implementation of a "unique" ID generator in Python. The implementation does not follow UUID or GUID standards, but rather uses available system, host, user, shell environment, process, and other ephemeral information fed into a hasher (by default MD5) to generate the ID.
The system is designed to be used both as a standalone application and as a module. The data used to be fed into the hash, as well as the hashing mechanism itself, can be overridden both through the command line and programmatically by importing the module.
Getting the software
The current version of uid is 1.0.3.
The latest version of the software is available in a tarball here: http://www.alcyone.com/software/uid/uid-latest.tar.gz.
The official URL for this Web site is http://www.alcyone.com/software/uid/.
uid.py is intended to be used under Unix and Unix-like systems in Python 2.x.
This code is released under the GPL.
The module works by implementing a
To generate and print one UID:
To see the input that goes into the hash, you can run it in verbose mode:
To specify an alternate hashing mechanism (in this case SHA), you can specify another module to use:
./uid.py -H sha
To feed in additional (hopefully uniquifying) information, use the
./uid.py -x "This is more incidental information"
Finally, one can generate multiple UIDs in one run with the
./uid.py -n 10
These options, of course, can be intermixed.
The following command line options alter the behavior of the program as follows:
A new hasher can be chosen with the
To generate multiple UIDs in one run, use the
Finally, to provide additional incidental information, use the
A set of options to choose between the different update groups would be great; this would allow people to use uid to merely generate host IDs, user IDs, etc.
Version 1.0.3 $Date: 2005/04/25 $ $Author: max $
Table of ContentsThis document was automatically generated on Mon Apr 25 15:24:40 2005 by HappyDoc version 2.1