Random name generator
Python Shell
Latest commit c485a43 Dec 15, 2014 @treyhunner Merge pull request #14 from svisser/patch-1
Removed sudo from installation command



https://secure.travis-ci.org/treyhunner/names.png?branch=master https://coveralls.io/repos/treyhunner/names/badge.png?branch=master https://pypip.in/v/names/badge.png https://pypip.in/d/names/badge.png

Random name generator


The script is available on PyPI. To install with pip:

pip install names


Names can be used as a command line utility or imported as a Python package.

Command Line Usage

To use the script from the command line:

$ names
John Powell

Python Package Usage

Here are examples of all current features:

>>> import names
>>> names.get_full_name()
u'Patricia Halford'
>>> names.get_full_name(gender='male')
u'Patrick Keating'
>>> names.get_first_name()
>>> names.get_first_name(gender='female')
>>> names.get_last_name()


This project is released under an MIT License.

Data in the following files are public domain (derived from 1990 Census data):

  • dist.all.last
  • dist.female.first
  • dist.male.first