Client for Genderize.io web service.
Project description
Genderize
Client for Genderize.io web service.
Basic usage
Import the Genderize class and call its get method with a list of names.
from genderize import Genderize print(Genderize().get(['James', 'Eva', 'Thunderhorse']))
[{u'count': 1037, u'gender': u'male', u'name': u'James', u'probability': 0.99}, {u'count': 234, u'gender': u'female', u'name': u'Eva', u'probability': 1.0}, {u'gender': None, u'name': u'Thunderhorse'}]
Shell usage
If run as a script, takes a list of names on stdin, and prints them with their genders.
echo "James\nEva\nThunderhorse" | python -m genderize
James: male Eva: female Thunderhorse: None
Advanced usage
Create a Genderize instance with a custom user agent, and an API key. Note that you’ll need to use your own API key or this example won’t work.
from genderize import Genderize genderize = Genderize( user_agent='GenderizeDocs/0.0', api_key='example_api_key') print(genderize.get(['James', 'Eva', 'Thunderhorse']))
[{u'count': 1037, u'gender': u'male', u'name': u'James', u'probability': 0.99}, {u'count': 234, u'gender': u'female', u'name': u'Eva', u'probability': 1.0}, {u'gender': None, u'name': u'Thunderhorse'}]
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Genderize-0.1.5.tar.gz
(4.9 kB
view hashes)
Built Distributions
Close
Hashes for Genderize-0.1.5-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3805a8eab98e01d1aa8c1ec4650d53fbcb74c6c3b2140f5bba83b323db8539fe |
|
MD5 | 2c5b626a4358bda55004985b2dfbdcf9 |
|
BLAKE2b-256 | 978fd4797f290ce127a3ef6c038c0ef1105e4814b84507bf91d141d5c01cef45 |
Close
Hashes for Genderize-0.1.5-py2-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | be075a78b4dcfe53cd412197bb00f50a3407e210236a23412de6a6127d268e2d |
|
MD5 | 1249529b725ff0030fb95999d1d64682 |
|
BLAKE2b-256 | 79bcd3a90b3f06d77f253b37e543edbe0b24607380d8802f5ee51ef72e7c382e |