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.

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 details)

Uploaded Source

Built Distribution

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

names_generator-0.0.2-py3-none-any.whl (26.7 kB view details)

Uploaded Python 3

File details

Details for the file names_generator-0.0.2.tar.gz.

File metadata

  • Download URL: names_generator-0.0.2.tar.gz
  • Upload date:
  • Size: 22.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.25.0 setuptools/50.3.2 requests-toolbelt/0.9.1 tqdm/4.54.0 CPython/3.8.6

File hashes

Hashes for names_generator-0.0.2.tar.gz
Algorithm Hash digest
SHA256 d3e2ee83862849e9ed5b1dfd47db1663b29079ed4ec748dd3ee6df5620661fd6
MD5 a40186146f354a4fed973284d9ec4830
BLAKE2b-256 4b7418173379a4f56657741ca48d79e996ebf2bcd5484ec40c468fc37d22df55

See more details on using hashes here.

File details

Details for the file names_generator-0.0.2-py3-none-any.whl.

File metadata

  • Download URL: names_generator-0.0.2-py3-none-any.whl
  • Upload date:
  • Size: 26.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.25.0 setuptools/50.3.2 requests-toolbelt/0.9.1 tqdm/4.54.0 CPython/3.8.6

File hashes

Hashes for names_generator-0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 01755624cd53526fb370a15d344e3ee006d90371de80c2b00117e1ee5258fb18
MD5 dc7abf67460a7f9c4febc6407352b069
BLAKE2b-256 447dda29f9c8f13be06499d6fa11704b8d43a2947327f05418adfb758e5a7921

See more details on using hashes here.

Supported by

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