Generate unique and memorable name strings.
Project description
py-unique-names-generator
Generate unique and memorable name strings
Prerequisites
Python 3.6 or greater.
Installation
$ pip install unique-names-generator
Usage
In [1]: from unique_names_generator import get_random_name
In [2]: get_random_name()
Out[2]: 'Pink Dragon'
Parameters
combo - List of lists
The package comes with a bunch of random names as lists. By default, we use a color and animal to generate a random name.
Other lists are ADJECTIVES, ANIMALS, COLORS, COUNTRIES, LANGUAGES, NAMES, STAR_WARS.
In [1]: from unique_names_generator import get_random_name
In [2]: from unique_names_generator.data import ADJECTIVES, STAR_WARS
In [3]: get_random_name(combo=[ADJECTIVES, STAR_WARS])
Out[3]: 'Furious Yoda'
separator - A string, default is blank space
In [1]: from unique_names_generator import get_random_name
In [2]: from unique_names_generator.data import ADJECTIVES, NAMES
In [69]: get_random_name(combo=[ADJECTIVES, NAMES], separator="_")
Out[69]: 'Fun_Antonie'
style - A string, one of capital|lowercase|uppercase.
In [1]: from unique_names_generator import get_random_name
In [2]: from unique_names_generator.data import ADJECTIVES, NAMES
In [3]: get_random_name(separator="-", style="lowercase")
Out[3]: 'crimson-cat'
And, you can pass your own list of words. But let's face it, then this package would just be a function which randomly chooses a word from a list of strings. So its better to keep adding to the list here or fork it for your own use.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file unique-names-generator-1.0.2.tar.gz.
File metadata
- Download URL: unique-names-generator-1.0.2.tar.gz
- Upload date:
- Size: 29.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.8.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1f8fcc95b27ae5f065b3df8ab62d5e749e9fd383ff7748607e63a10345248e7a
|
|
| MD5 |
464480b52fb3e213f98f420cf9430fcc
|
|
| BLAKE2b-256 |
8ac7d30a4d79f7ae47a20543cdfa28613c6405c3c29b03abe120eb8e33294149
|
File details
Details for the file unique_names_generator-1.0.2-py2.py3-none-any.whl.
File metadata
- Download URL: unique_names_generator-1.0.2-py2.py3-none-any.whl
- Upload date:
- Size: 27.9 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.8.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ea3c7ba5e1d2926e82b183a306bbef924980b007fe7492a8f64b62b052de1b77
|
|
| MD5 |
c0b802f2aa5ff9439db479bec79d6e74
|
|
| BLAKE2b-256 |
203ef1a29edc94af8dec3843c1e1fb6e4b7f19e242f36544202b01f3aadf77f8
|