Skip to main content

names

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

Random name generator

Installation

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

sudo pip install names

Usage

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()
'Bernard'
>>> names.get_first_name(gender='female')
'Christina'
>>> names.get_last_name()
'Szczepanek'

License

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

Changes

0.3.0 (2013-05-14)

  • Fixed Python 3 support

  • Improved tests and fixed minor bugs

0.2 (2013-02-17)

  • Initial release

Contributing

Please file bugs to the Github issue tracker. Pull requests are welcome.

Hacking and Pull Requests

Please try to conform to PEP8 for code contributions and ensure that the tests continue to function.

Please include new tests with your pull requests when appropriate.

Running the tests

You will need tox and coverage installed to run the tests on your code:

$ pip install tox coverage

To run the tests and generate a coverage report:

$ ./runtests.sh

The coverage output should look similar to this:

_____________________ summary _____________________
py27: commands succeeded
py32: commands succeeded
py33: commands succeeded
pypy: commands succeeded
flake8: commands succeeded
congratulations :)
Name             Stmts   Miss Branch BrMiss  Cover
--------------------------------------------------
names/__init__      25      0      8      0   100%
names/main           4      0      0      0   100%
--------------------------------------------------
TOTAL               29      0      8      0   100%

Release files for names 0.3.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for names 0.3.0
File Size Uploaded
names-0.3.0.tar.gz 789.1 kB Details

Release files / names-0.3.0.tar.gz

Download URL names-0.3.0.tar.gz
Size 789.1 kB
Tags Source
SHA-256 checksum
How to use checksums
726e46254f2ed03f1ffb5d941dae3bc67c35123941c29becd02d48d0caa2a671
BLAKE2b-256 checksum
How to use checksums
444ef9cb7ef2df0250f4ba3334fbdabaa94f9c88097089763d8e85ada8092f84
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release history Release notifications | RSS feed

This release

0.3.0 This release

1 release file

0.2

1 release file

0.1

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page