skillfed

gender-guesser

Get the gender from first name.

gender-guesser v0.4.0 984.0K downloads/30d#4,579 on PyPI145
Copyleft license GPLv3 AGING released

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-guesser

uv

uv add gender-guesser

poetry

poetry add gender-guesser

Installing 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

gender detection from namefirst name gender classifiername-based gender predictiongender guesser libraryinfer gender from first namegender lookup by namemultilingual gender detection
name-parsingdemographicsdata-enrichment

More Linguistic packages