Skip to main content

Genderize

Client for the Genderize.io web service.

https://img.shields.io/github/license/steelpangolin/genderize.svg?style=flat https://img.shields.io/pypi/v/Genderize.svg?style=flat https://img.shields.io/travis/SteelPangolin/genderize.svg?style=flat https://img.shields.io/codecov/c/github/SteelPangolin/genderize.svg?style=flat https://readthedocs.org/projects/genderize/badge/?style=flat

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'}]

Maintenance

Setup for local development:

virtualenv --prompt '(genderize) ' venv -p python3
pip install -r requirements.txt
pip install -r requirements-dev.txt

Release checklist:

  1. Generate a new version number: major.minor.micro. It should be compatible with both PEP 440 and SemVer 2.0.0.

  2. Update __version__ in genderize/__init__.py. This is read by setup.py and doesn’t need to be changed there.

  3. Add a changelog entry and date for the new version in CHANGES.rst.

  4. Commit the changes. This may be done as part of another change.

  5. Tag the commit with git tag major.minor.micro.

  6. Push the tag to GitHub with git push origin major.minor.micro.

  7. Travis will create a new PyPI release from the tag.

Metadata

Release files for Genderize 0.2.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 Genderize 0.2.0
File Size Uploaded
Genderize-0.2.0.tar.gz 6.0 kB Details

Built distributions (wheels)

Table of built distributions (wheels) for Genderize 0.2.0
File Interpreter ABI Platform
Genderize-0.2.0-py3-none-any.whl Python 3 none any Details
Genderize-0.2.0-py2-none-any.whl Python 2 none any Details

Total release size: 15.5 kB

Release files / Genderize-0.2.0.tar.gz

Download URL Genderize-0.2.0.tar.gz
Size 6.0 kB
Tags Source
SHA-256 checksum
How to use checksums
4609fbccec6901b8bd2a2cd73d6c589d04f02ea5cee12a5fab74bf5101b42acd
BLAKE2b-256 checksum
How to use checksums
a3aac94355e111863757521545014a8e2a4183f3a8152bb221abb5cdeca54492
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release files / Genderize-0.2.0-py3-none-any.whl

Download URL Genderize-0.2.0-py3-none-any.whl
Size 4.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
2cd4c889344e43cc06b711c908f251fec59a35620b569a55c37ce1f177b58c64
BLAKE2b-256 checksum
How to use checksums
73c2a84ccb44ffc298d2151deca3063732c9e155101ec378822d6e0861c0998f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release files / Genderize-0.2.0-py2-none-any.whl

Download URL Genderize-0.2.0-py2-none-any.whl
Size 4.7 kB
Tags Python 2
SHA-256 checksum
How to use checksums
6bac90bf69fb2cb9f59781d7f06d841e9e0148a5af60db2c302a7d164c5e8486
BLAKE2b-256 checksum
How to use checksums
0c63b08cb1b69b2283d6e9606851a431c3caf3a8dbb8641e3f7a1edbbf980996
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release history Release notifications | RSS feed

0.3.1

2 release files

0.3.0

2 release files

This release

0.2.0 This release

3 release files

0.1.5

3 release files

0.1.4

3 release files

0.1.3

3 release files

0.1.2

2 release files

0.1.1

1 release file

0.1.0

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