gender-guesser
Get the gender from first name.
What it is and what it does
Gender Guesser is a lightweight name-to-gender classifier that looks up first names in a static database and returns a gender classification. It returns one of six outcomes: unknown (name not in database), andy (equally likely male or female), male, female, mostly_male, or mostly_female. The package supports internationalized names (including non-ASCII characters), case-sensitive or case-insensitive matching, and country-specific inference—the same name can yield different results depending on the country context you provide.
The package wraps data originally from Jorg Michael's standalone 'gender' program and is a fork of the SexMachine project. It has no external runtime dependencies and installs as a pure Python wheel. The underlying data is static and was last updated in the original package's 2016 release; the package itself has not been actively maintained since then, though the repository remains available.
Use it for:
- Preprocessing demographic data in research or analytics pipelines where gender inference from names is acceptable
- Filtering or categorizing contact lists or user databases by inferred gender for marketing or segmentation
- Handling name-gender mismatches in data quality checks or data cleaning workflows
- Multilingual name processing where you need gender hints across different language origins
- Building simple heuristics for form validation or user profile enrichment in low-stakes contexts
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Guesses the gender of a person from their first name using a lookup database, with support for country-specific inference and internationalized names.
Yes, if you need a simple, dependency-free gender classifier for non-critical use cases and accept the copyleft licensing. The package is stable and has no known vulnerabilities, but be aware it is aging (last release 2016) with static data, so accuracy may be limited for modern or uncommon names. Not suitable for high-stakes demographic inference or proprietary software without GPL compliance.
Install
gender-guesser on PyPI
pip
pip install gender-guesseruv
uv add gender-guesserpoetry
poetry add gender-guesserInstalling gender-guesser
Before you install
Installation is frictionless—a pure Python wheel with no runtime dependencies. However, the package is aging: last release was 2016-12-05 and the repository shows no commits since 2025-05-20, suggesting minimal active maintenance despite the repository not being archived.
License in practice
Distributed under GPLv3 (copyleft). The generator code requires derivative works to be GPLv3-licensed; the data file nam_dict.txt is under the GNU Free Documentation License. Use in proprietary software will require careful licensing review.
Quickstart
import gender_guesser.detector as gender
d = gender.Detector()
print(d.get_gender(u"Bob")) # Returns: male
print(d.get_gender(u"Jamie", u'great_britain')) # Country-specific lookup
Verify before relying
- Accuracy and bias characteristics of the gender predictions across different name origins and demographics
- Whether the underlying data from Jorg Michael's 'gender' program has been updated since the package's 2016 release
- Current maintenance status and whether the repository is actively accepting bug reports or pull requests
Package facts
| License | GPLv3 (copyleft) |
| Python support | not specified |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | none |
| Maintenance | aging — 3,539 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 984,046/month — #4,579 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: gender_guesser-0.4.0-py2.py3-none-any.whl
Tags
More Linguistic packages
Detects and normalizes text encoding from…
permissive · top 100 on PyPI
tiktokentiktoken is a fast BPE tokenizer that converts…
permissive · top 1,000 on PyPI
chardetDetects character encoding and language in byte…
permissive · top 1,000 on PyPI
text-unidecodeConverts Unicode text to ASCII by…
copyleft · top 1,000 on PyPI
larkLark is a parsing library that builds abstract…
permissive · top 1,000 on PyPI
tree-sitterPython bindings to the tree-sitter parsing…
permissive · top 1,000 on PyPI
GenderizeGenderize is a client library that queries the…
permissive · top 15,000 on PyPI
names-datasetLooks up demographic information about first…
permissive · top 15,000 on PyPI
namesGenerates random human names (first, last, or…
permissive · top 15,000 on PyPI
getnameProvides random name generation for cats, dogs,…
permissive · top 15,000 on PyPI
deepfaceDeepFace performs face recognition,…
permissive · top 15,000 on PyPI
category-encodersTransforms categorical variables into numeric…
permissive · top 5,000 on PyPI
date-guesserExtracts publication dates from web pages by…
permissive · top 15,000 on PyPI
django-localflavorProvides country-specific form fields,…
permissive · top 5,000 on PyPI
ResemblyzerResemblyzer generates a 256-value embedding…
permissive · top 15,000 on PyPI
vokativConverts Czech given names and surnames into…
permissive · top 15,000 on PyPI