GH-88597: Added command line interface to UUID module. by achhina · Pull Request #99463 · python/cpython (original) (raw)

UUID module now supports command line usage.

❯ ./python.exe -m uuid
5f2d57b1-90e8-417c-ba5d-69b9b6f74289

❯ ./python.exe -m uuid -h
usage: uuid.py [-h] [-u {uuid1,uuid3,uuid4,uuid5}] [-ns NAMESPACE] [-n NAME]

Generates a uuid using the selected uuid function.

options: -h, --help show this help message and exit -u {uuid1,uuid3,uuid4,uuid5}, --uuid {uuid1,uuid3,uuid4,uuid5} The function to use to generate the uuid. By default uuid4 function is used. -ns NAMESPACE, --namespace NAMESPACE The namespace used as part of generating the uuid. Only required for uuid3/uuid5 functions. -n NAME, --name NAME The name used as part of generating the uuid. Only required for uuid3/uuid5 functions.