Skip to content

JohRust/docker-names-python

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

docker-names-python

Create random names identical to default docker container names.

This is a python port of the name generator from the Moby project that is used to create the well-known naming schemes of docker containers: https://github.com/moby/moby/blob/master/pkg/namesgenerator/names-generator.go

Note that there are no guarantees to avoid naming collisions. Generating very high numbers of random names will lead to dublicates.

Installation

Just copy the docker names folder into your project and import it as a module.

Usage

>>> import docker_names
>>> docker_names.get_random_name(retry=0)
'practical_banach'
>>> docker_names.get_random_name(retry=1)
'kind_fermi1'

See also

https://github.com/beasteers/randomname for more complex random name generation.

About

Create random names identical to default docker container names.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages