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
Usage
Python API
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
Command-line
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.2.0.tar.gz
(27.1 kB
view details)
Built Distribution
File details
Details for the file names_generator-0.2.0.tar.gz
.
File metadata
- Download URL: names_generator-0.2.0.tar.gz
- Upload date:
- Size: 27.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.12.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | de60e354b8ca8f2d1ce0816079d3ba569417371867b94328021f03c9dd47a5be |
|
MD5 | 41413151bb4ed28da928eb07371e8831 |
|
BLAKE2b-256 | fdde60c26d1488db2ffdb050d2c0e6007998c2afd90760a4d7b23d32cde5b446 |
File details
Details for the file names_generator-0.2.0-py3-none-any.whl
.
File metadata
- Download URL: names_generator-0.2.0-py3-none-any.whl
- Upload date:
- Size: 26.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.12.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 693e8e48e9a54a2a8f714b01d1bd70945743a15d4587059e7e4e16efc361be11 |
|
MD5 | 15a004f402e3e980c27b914e5daa7f22 |
|
BLAKE2b-256 | bf3d7210fc4b1999771b875d96ffa30cf4384c7fe8f0a7d9874df4b753b7703e |