Clone of the Moby/Docker random name generator as a Python package.
Project description
Clone of the Moby/Docker random name generator as a Python package.
Installation
$ pip install names_generator
Examples
The API only really consists of a single function.
>>> from names_generator import generate_name
>>> generate_name()
'vigorous_goldstine'
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)
True
The package also exposes a basic command-line interface for scripting outside of Python
$ generate_name
clever_matsumoto
$ generate_name --style=capital
Heuristic Einstein
$ generate_name --help
usage: generate_name [-h] [-v] [--style NAME]
Generate random name pairing.
options:
-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:
https://github.com/glentner/names_generator
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.0.2.tar.gz
(22.9 kB
view hashes)
Built Distribution
Close
Hashes for names_generator-0.0.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 01755624cd53526fb370a15d344e3ee006d90371de80c2b00117e1ee5258fb18 |
|
MD5 | dc7abf67460a7f9c4febc6407352b069 |
|
BLAKE2b-256 | 447dda29f9c8f13be06499d6fa11704b8d43a2947327f05418adfb758e5a7921 |