Python Human Name Parser

Version 3.1.0

nameparser parses human names into seven fields — title, given, middle, family, suffix, nickname, maiden. Results are immutable, configuration is composable (Lexicon for vocabulary, Policy for behavior), and locale packs are opt-in. Requires Python 3.11+.

>>> from nameparser import parse
>>> name = parse("Dr. Juan Q. Xavier de la Vega III")
>>> name.given, name.family
('Juan', 'de la Vega')
>>> name.render("{family}, {given}")
'de la Vega, Juan'

New here? Getting started takes you through the three steps most people need:

  • Parse one name into its fields, as above.

  • Have a list of names from one source? Settings for a list of names reads the order it is written in and returns a parser configured for it.

  • Joining records from several sources? Matching names across sources groups the names and compares them field by field.

Coming from 1.x, or from 2.x code using HumanName? Migrating to 3.0.

Indices and tables

GitHub Project: https://github.com/derek73/python-nameparser