{"id":5816,"library":"randomname","title":"Random Name Generator","description":"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.","status":"active","version":"0.2.1","language":"en","source_language":"en","source_url":"https://github.com/beasteers/randomname","tags":["random","name generation","identifier","slug","utility"],"install":[{"cmd":"pip install randomname","lang":"bash","label":"Install with pip"}],"dependencies":[],"imports":[{"note":"The primary function `get_name()` is directly accessible after importing the `randomname` package.","symbol":"get_name","correct":"import randomname\nname = randomname.get_name()"}],"quickstart":{"code":"import randomname\n\n# Generate a simple adjective-noun name\nname1 = randomname.get_name()\nprint(f\"Generated name 1: {name1}\")\n\n# Generate a name with specific categories (e.g., from 'weather' adjectives and 'cats' nouns)\nname2 = randomname.get_name(adj='weather', noun='cats')\nprint(f\"Generated name 2 (weather-cats): {name2}\")\n\n# Generate a name with multiple adjective categories\nname3 = randomname.get_name(adj=['colors', 'sound'], noun='ghosts')\nprint(f\"Generated name 3 (colors-sound-ghosts): {name3}\")\n\n# Generate a name with a custom format (e.g., verb-adjective-noun)\nname4 = randomname.get_name(fmt='v/art a/music_theory n/apex_predators')\nprint(f\"Generated name 4 (custom format): {name4}\")","lang":"python","description":"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."},"warnings":[{"fix":"Maintain a set of generated names and regenerate if a duplicate is produced, or use a different generator like 'UniqueRandomNameGenerator' if available in a similar library (e.g., 'funkybob').","message":"Repeated calls to `randomname.get_name()` may yield duplicate names, as the library does not inherently guarantee uniqueness across calls. If unique names are required, callers must implement their own tracking and retry logic.","severity":"gotcha","affected_versions":"All versions"},{"fix":"Review generated names in sensitive contexts. Consider customizing wordlists by supplying specific categories or custom words to `get_name()` if stricter control over vocabulary is needed.","message":"The wordlists used by `randomname` are sourced externally and, while intended for general use, may contain words that some users find offensive or inappropriate. The library's README acknowledges this and requests users to report such instances.","severity":"gotcha","affected_versions":"All versions"}],"env_vars":null,"last_verified":"2026-04-14T00:00:00.000Z","next_check":"2026-07-13T00:00:00.000Z"}