Skip to main content

Generate random adj-noun names like docker and github.

Project description

randomname

Generate random unique ids using real words - like docker containers or github repos.

Often, I get tired of trying to hunt down files in folders differentiated by some numeric id, and unless I need to encode a timestep into the name, I'd rather use an id that's memorable and easy to type.

The wordlists are graciously sourced from: https://github.com/imsky/wordlists

Install

pip install randomname

Usage

# get adj-noun:
$ randomname get
# sleek-voxel
$ randomname get
# frayed-potentiality
$ randomname get
# recursive-vector
$ randomname get
# convoluted-peninsula

# specify adj-noun sub-categories (respectively):
$ randomname get weather shopping,cats
# freezing-store

# or define your own format:
$ randomname generate adj/sound n/apex_predators
# blaring-crocodile

# use multiple categories:
$ randomname generate v/art,v/thought a/sound n/apex_predators
# doodle-silent-salamander

# mix in your own words:
$ randomname generate v/fire a/music_theory n/cats cat
# toast-adagio-angora-cat

The lists include various word classes:

  • adjectives (a, adj) - ya know those describe-y things
    • e.g. a/colors, adj/shape, adjectives/sound
  • nouns (n, nn) - people, places, things dawg
    • e.g. n/cats, nn/ghosts, nouns/wine
  • verbs (v, vb) - doing things
    • e.g. v/art, vb/3d_graphics
  • names (nm) - things like surnames, streets, cities, etc.
    • e.g. nm/cities, names/codenames
  • ipsum (ip) - misc.
    • e.g. ip/reddit, ipsum/blockchain

It's importable too!

import randomname

# generate name using all categories
name = randomname.get_name()
# or specify a subset of the categories
name = randomname.get_name(adj=('music_theory',), noun=('cats', 'food'))
# or - you can take a bit more liberty about
name = randomname.generate(
    'v/fire', 'adj/music_theory', ('n/cats', 'n/food'))

# these contain the available groups
print('adjective categories:', randomname.ADJECTIVES)
print('noun categories:', randomname.NOUNS)

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

randomname-0.0.3.tar.gz (30.5 kB view details)

Uploaded Source

File details

Details for the file randomname-0.0.3.tar.gz.

File metadata

  • Download URL: randomname-0.0.3.tar.gz
  • Upload date:
  • Size: 30.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/46.1.3 requests-toolbelt/0.9.1 tqdm/4.36.1 CPython/3.7.4

File hashes

Hashes for randomname-0.0.3.tar.gz
Algorithm Hash digest
SHA256 0c42cfff8f431f065cbdd2aafb888f4e561c45b7952199eaa4f65277b0518e6a
MD5 7d0657590f9eb2beca668500e00d3faa
BLAKE2b-256 90fcbdfbc6b882cef647faf47ef58195696767cfa1c416a9e6512f2fe6e1db3f

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