https://github.com/treyhunner/names
Random name generator
https://github.com/treyhunner/names
Last synced: about 1 month ago
JSON representation
Random name generator
- Host: GitHub
- URL: https://github.com/treyhunner/names
- Owner: treyhunner
- License: mit
- Created: 2013-02-15T00:08:37.000Z (over 12 years ago)
- Default Branch: master
- Last Pushed: 2023-10-16T07:42:46.000Z (over 1 year ago)
- Last Synced: 2025-05-12T04:45:44.758Z (about 1 month ago)
- Language: Python
- Size: 1.13 MB
- Stars: 468
- Watchers: 18
- Forks: 107
- Open Issues: 19
-
Metadata Files:
- Readme: README.rst
- Changelog: CHANGES.rst
- Contributing: CONTRIBUTING.rst
- License: LICENSE.txt
- Authors: AUTHORS.rst
Awesome Lists containing this project
README
names
=====.. image:: https://secure.travis-ci.org/treyhunner/names.png?branch=master
:target: http://travis-ci.org/treyhunner/names
.. image:: https://coveralls.io/repos/treyhunner/names/badge.png?branch=master
:target: https://coveralls.io/r/treyhunner/names
.. image:: https://pypip.in/v/names/badge.png
:target: https://crate.io/packages/names
.. image:: https://pypip.in/d/names/badge.png
:target: https://crate.io/packages/namesRandom name generator
Installation
------------The script is `available on PyPI`_. To install with pip::
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:.. code-block:: bash
$ names
John PowellPython Package Usage
~~~~~~~~~~~~~~~~~~~~
Here are examples of all current features:.. code-block:: pycon
>>> 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.. _mit license: http://th.mit-license.org/2013
.. _available on PyPI: http://pypi.python.org/pypi/names/