Generate human-readable, random object names
Maintained. Last release 9 months ago, commits in 2 of the last 26 weeks. Weaker on commit activity and release cadence.
pip install petnamepetname
Name
petname − an RFC1178 implementation to generate pronounceable, sometimes even memorable, "pet names", consisting of a random combination of adverbs, an adjective, and an animal name
Synopsis
- Complete version:
usage: petname [-w|--words INT] [-l|--letters INT] [-s|--separator STR] [-d|--dir STR] [-c|--complexity INT] [-u|--ubuntu]
- Python version:
usage: petname [-h] [-w WORDS] [-l LETTERS] [-s SEPARATOR]
Options
-w|--wordsnumber of words in the name, default is 2,-l|--lettersmaximum number of letters in each word, default is unlimited,-s|--separatorstring used to separate name words, default is'-',-d|--dirdirectory containingadverbs.txt,adjectives.txt,names.txt, default is/usr/share/petname/,-c|--complexity[0, 1, 2]; 0 = easy words, 1 = standard words, 2 = complex words, default=1,-u|--ubuntugenerate ubuntu-style names, alliteration of first character of each word.
Description
This utility will generate "pet names", consisting of a random combination of an adverb, adjective, and an animal name. These are useful for unique hostnames or container names, for instance.
As such, PetName tries to follow the tenets of Zooko’s triangle. Names are:
- human meaningful
- decentralized
- secure
Besides this shell utility, there are also native libraries: python-petname, python3-petname, and golang-petname. Here are some programmatic examples in code:
Examples
$ petname
wiggly-yellowtail
$ petname --words 1
robin
$ petname --words 3
primly-lasting-toucan
$ petname --words 4
angrily-impatiently-sage-longhorn
$ petname --separator ":"
cool:gobbler
$ petname --separator "" --words 3
comparablyheartylionfish
$ petname --ubuntu
amazed-asp
$ petname --complexity 0
massive-colt