Skip to main content

Clone of the Moby/Docker random name generator as a Python package.

Project description

License PyPI Version Python Versions

Clone of the Moby/Docker random name generator as a Python package.


$ pip install names_generator


Python API

The API only really consists of a single function.

>>> from names_generator import generate_name
>>> generate_name()

Customize the formatting of the name by specifying a style, one of plain, capital, hyphen, or underscore (default).

>>> generate_name(style='capital')
'Hardcore Thompson'

Pin a seed value for the underlying PRNG to reproduce a given name.

>>> generate_name(seed=42) == generate_name(seed=42)


The package also exposes a basic command-line interface for scripting outside of Python

$ generate_name

$ generate_name --style=capital
Heuristic Einstein

$ generate_name --help
usage: generate_name [-h] [-v] [--style NAME]
Generate random name pairing.

-s, --style    NAME    Formatting (default: underscore).
-h, --help             Show this message and exit.
-v, --version          Show the version and exit.

Documentation and issue tracking at:

Project details

Download files

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

Source Distribution

names_generator-0.2.0.tar.gz (27.1 kB view hashes)

Uploaded Source

Built Distribution

names_generator-0.2.0-py3-none-any.whl (26.7 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page