Random Name Generator

0.2.1 · active · verified Tue Apr 14

randomname is a Python library that generates random adjective-noun style names, similar to those used by Docker containers or GitHub repositories, to create memorable and easy-to-type unique identifiers. It is currently at version 0.2.1 and has an infrequent release cadence, with the last update in January 2023.

Warnings

Install

Imports

Quickstart

This quickstart demonstrates how to generate random names using `randomname.get_name()`. It shows basic usage, how to specify word categories (adjectives, nouns, verbs, ipsum, names), and how to define a custom format for the generated names.

import randomname

# Generate a simple adjective-noun name
name1 = randomname.get_name()
print(f"Generated name 1: {name1}")

# Generate a name with specific categories (e.g., from 'weather' adjectives and 'cats' nouns)
name2 = randomname.get_name(adj='weather', noun='cats')
print(f"Generated name 2 (weather-cats): {name2}")

# Generate a name with multiple adjective categories
name3 = randomname.get_name(adj=['colors', 'sound'], noun='ghosts')
print(f"Generated name 3 (colors-sound-ghosts): {name3}")

# Generate a name with a custom format (e.g., verb-adjective-noun)
name4 = randomname.get_name(fmt='v/art a/music_theory n/apex_predators')
print(f"Generated name 4 (custom format): {name4}")

view raw JSON →