A simple python library to take first names and return their gender using the genderize.io API.
Python
Latest commit 40b55bc Dec 11, 2016 @block8437 committed on GitHub Fixed bugs with recent API changes
Updated to use HTTPS and no longer cast to a list on single name queries.
Permalink
Failed to load latest commit information.
.gitignore Initial commit Dec 3, 2013
LICENSE Initial commit Dec 3, 2013
README.md Update README.md Nov 5, 2015
gender.py Fixed bugs with recent API changes Dec 11, 2016

README.md

gender.py

A simple library to take first names and return their gender using the genderize.io API.

Usage

>>> from gender import getGenders
>>> getGenders(["Brian","Apple","Jessica","Zaeem","NotAName"])
[(u'male', u'1.00', 483), (u'female', u'0.86', 14), (u'female', u'1.00', 787), (u'male', u'1.00', 1), (u'None', u'0.0', 0.0)]

Output

Output is a list of results form the website, formated to be (name (string), probability (string), amount of documents that support the gender choice (int))

Requirements

Requires requests to function for HTTP requests.