Random name and slug generator
Project description
Do you want random human-readable strings?
>>> from coolname import generate_slug
>>> generate_slug()
'big-maize-loris-of-renovation'
>>> generate_slug()
'tunneling-amaranth-rhino-of-holiness'
>>> generate_slug()
'soft-cuddly-shrew-of-expertise'
Features
Generate slugs, ready to use, Django-compatible.
>>> from coolname import generate_slug >>> generate_slug() 'qualified-agama-of-absolute-kindness'Generate names as sequences and do whatever you want with them.
>>> from coolname import generate >>> generate() ['beneficial', 'bronze', 'bee', 'of', 'glee'] >>> ' '.join(generate()) 'limber transparent toad of luck' >>> ''.join(x.capitalize() for x in generate()) 'CalmRefreshingTerrierOfAttraction'Generate names of specific length: 2, 3 or 4 words.
>>> generate_slug(2) 'mottled-crab' >>> generate_slug(3) 'fantastic-acoustic-whale' >>> generate_slug(4) 'military-diamond-tuatara-of-endeavor'Note: without argument, it returns a random length, but probability of 4‑word name is much higher. Prepositions and articles (of, from, the) are not counted as words.
Use in command line:
$ coolname prophetic-tireless-bullfrog-of-novelty $ coolname 3 -n 2 -s '_' wildebeest_of_original_champagne ara_of_imminent_luckOver 1010 random names.
Words
Combinations
Example
4
1010
talented-enigmatic-bee-of-hurricane
3
108
ambitious-turaco-of-joviality
2
105
prudent-armadillo
>>> from coolname import get_combinations_count >>> get_combinations_count(4) 64175336926Hand-picked vocabulary. sexy and demonic are about the most “offensive” words here - but there is only a pinch of them, for spice. Most words are either neutral, such as red, or positive, such as brave. And subject is always some animal, bird, fish, or insect - you can’t be more neutral than Mother Nature.
Easy customization. Create your own rules!
>>> from coolname import RandomGenerator >>> generator = RandomGenerator({ ... 'all': { ... 'type': 'cartesian', ... 'lists': ['first_name', 'last_name'] ... }, ... 'first_name': { ... 'type': 'words', ... 'words': ['james', 'john'] ... }, ... 'last_name': { ... 'type': 'words', ... 'words': ['smith', 'brown'] ... } ... }) >>> generator.generate_slug() 'james-brown'
Installation
pip install coolname
coolname is written in pure Python and has no dependencies. It works on any modern Python version (3.7+), including PyPy.
Release history
3.0.0 (2026-01-29)
Breaking change: Python 3.6 is not supported anymore. Tests cover Python 3.7-3.14 and PyPy 3.7-3.11.
Better type hints (now checked with mypy)
Minor bug fixed, concerning abnormal configs (most likely didn’t affect anyone)
More mythical animals + one mistake fixed + few other words
2.2.0 (2023-01-09)
More dogs, cats and cows!
2.1.0 (2022-12-07)
Support OpenSSL FIPS by using hashlib.md5(..., usedforsecurity=False)
2.0.0 (2022-10-24)
Support for old Python versions (<3.5) is dropped, because it’s 2022
Command line usage and pipx support.
With additional owls and bitterns
1.1.0 (2018-08-02)
32-bit Python is supported.
1.0.4 (2018-02-17)
Breaking changes:
Renamed RandomNameGenerator to RandomGenerator.
randomize was removed, because it was just an alias to random.seed.
Phrase lists give you even more freedom when creating custom generators.
You can seed or even replace the underlying random.Random instance, see Randomization.
Change the default generator using COOLNAME_DATA_DIR and COOLNAME_DATA_MODULE. This also saves memory!
Total number of combinations = 60 billions.
For earlier releases, see History
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 coolname-3.0.0.tar.gz.
File metadata
- Download URL: coolname-3.0.0.tar.gz
- Upload date:
- Size: 61.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
01eb22437f77a904d5cb993842b3cd07e182e707014a82f3dfa31881968ecee1
|
|
| MD5 |
80a0056dd83d996aed307ff5be99136b
|
|
| BLAKE2b-256 |
244989681dae5d3fe5a2c8cbf108d12e3c10a5778b393ed5c3c2803faf49057b
|
File details
Details for the file coolname-3.0.0-py2.py3-none-any.whl.
File metadata
- Download URL: coolname-3.0.0-py2.py3-none-any.whl
- Upload date:
- Size: 39.5 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
64fd6bc9dac1ef566eaa94e2829360c8dae8d63eb97d8853d39622d169849cbf
|
|
| MD5 |
f37cbfa81ea2815ce3c572e4207edbff
|
|
| BLAKE2b-256 |
1845bd4b563055b87ccf007ec8b510d5a8cf963f3119951ab495b95a856364ec
|