Skip to main content

pypi build status coverage documentation

Do you want random human-readable strings?

>>> from coolname import generate_slug
>>> generate_slug()
'tiny-optimal-crocodile-of-progress'
>>> generate_slug()
'cherubic-leopard-of-delightful-serendipity'
>>> generate_slug()
'wealthy-athletic-swift-of-tempest'

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_luck
  • Over 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)
    83377588406
  • Hand-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.10+), including PyPy.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

coolname-4.1.0.tar.gz (38.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

coolname-4.1.0-py3-none-any.whl (39.9 kB view details)

Uploaded Python 3

File details

Details for the file coolname-4.1.0.tar.gz.

File metadata

  • Download URL: coolname-4.1.0.tar.gz
  • Upload date:
  • Size: 38.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.2

File hashes

Hashes for coolname-4.1.0.tar.gz
Algorithm Hash digest
SHA256 1db8b0857d0e40795cf555f449542cc3b8fe4a85b64ae3507fb475bafa2924fa
MD5 48858859a08eebde2b5027e7e6f20242
BLAKE2b-256 5097c6d3911b2c9ba7c129820bbbd2ef1e9bae8402aa70f15820dc3a9d770e87

See more details on using hashes here.

File details

Details for the file coolname-4.1.0-py3-none-any.whl.

File metadata

  • Download URL: coolname-4.1.0-py3-none-any.whl
  • Upload date:
  • Size: 39.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.2

File hashes

Hashes for coolname-4.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 2721ab2112788ad3f92b398ed48533d58be30450c4e7b266f9407fcdf37c8d24
MD5 73ca668be8d402dd1867993f3e2b558b
BLAKE2b-256 f996e0ea059650e0db3755d2e734cd65fb15aa5546e5cdf96e7e68ae018cc994

See more details on using hashes here.

Release history Release notifications | RSS feed

5.0.0

2 files

4.2.0

2 files

This release

4.1.0 This release

2 files

4.0.0

2 files

3.0.0

2 files

2.2.0

2 files

2.1.0

2 files

2.0.0

2 files

1.1.0

2 files

1.0.4

2 files

0.2.1

1 file

0.1.1

2 files

0.1.0

1 file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page