{"id":2613,"library":"nameparser","title":"Nameparser","description":"Nameparser is a simple Python module designed for parsing human names into their distinct components, such as title, first, middle, last, suffix, and nickname. It supports a variety of common name formats for Latin-based languages and is currently at version 1.1.3, receiving updates for bug fixes and feature enhancements.","status":"active","version":"1.1.3","language":"python","source_language":"en","source_url":"https://github.com/derek73/python-nameparser","tags":["name parsing","human names","text processing","natural language processing"],"install":[{"cmd":"pip install nameparser","lang":"bash","label":"Install stable version"}],"dependencies":[],"imports":[{"symbol":"HumanName","correct":"from nameparser import HumanName"}],"quickstart":{"code":"from nameparser import HumanName\n\nname = HumanName(\"Dr. Juan Q. Xavier de la Vega III (Doc Vega)\")\n\nprint(f\"Title: {name.title}\")\nprint(f\"First: {name.first}\")\nprint(f\"Middle: {name.middle}\")\nprint(f\"Last: {name.last}\")\nprint(f\"Suffix: {name.suffix}\")\nprint(f\"Nickname: {name.nickname}\")\nprint(f\"Full Name (formatted): {name}\")","lang":"python","description":"Parses a full name string into a `HumanName` object, allowing access to its individual components as attributes like `title`, `first`, `middle`, `last`, `suffix`, and `nickname`."},"warnings":[{"fix":"If you relied on `full_name` returning the exact original string, store the original string separately or adjust your code to expect the formatted output.","message":"The `full_name` attribute's behavior changed. Before v1.0.4, it returned the original input string. Since v1.0.4, it returns a formatted string output based on the parsed components.","severity":"breaking","affected_versions":">=1.0.4"},{"fix":"Thoroughly test parsing outcomes for a representative set of names if upgrading from pre-1.0.0 versions to ensure consistent results.","message":"Version 1.0.0 introduced significant refactoring of prefix handling and support for prefixes on first names, which may alter parsing results for certain names compared to older versions.","severity":"breaking","affected_versions":">=1.0.0"},{"fix":"Call `name_instance.parse_full_name()` after modifying constants that affect parsing or ensure constants are configured before instantiation/first parsing.","message":"If you customize the parser's constants (e.g., adding new titles, prefixes, suffixes) after a `HumanName` instance has been created or its `full_name` attribute set, you must explicitly call `name.parse_full_name()` to re-parse the name and apply the new configurations.","severity":"gotcha","affected_versions":"All versions"},{"fix":"To force capitalization of mixed-case names, use `name.capitalize(force=True)` or set `nameparser.config.CONSTANTS.force_mixed_case_capitalization = True` globally.","message":"By default, `HumanName` will not adjust the capitalization of names that are already in mixed case. It primarily corrects all upper or all lower case names.","severity":"gotcha","affected_versions":"All versions"},{"fix":"For non-English names, consider customizing `nameparser.config.Constants` with language-specific titles, prefixes, and suffixes, or evaluate alternative libraries if primary use is non-Latin or non-English.","message":"The library is primarily designed for English names. While it can be useful for other Latin-based languages, it may not perform optimally for languages with significantly different name structures without custom configuration.","severity":"gotcha","affected_versions":"All versions"}],"env_vars":null,"search_vec":"'1.1.3':44 'base':37 'bug':48 'common':31 'compon':16 'current':41 'design':8 'distinct':15 'enhanc':52 'featur':51 'first':20 'fix':49 'format':33 'human':11,55 'languag':38,60 'last':22 'latin':36 'latin-bas':35 'middl':21 'modul':7 'name':12,32,53,56 'namepars':1,2 'natur':59 'nicknam':25 'pars':10,54 'process':58,61 'python':6 'receiv':45 'simpl':5 'suffix':23 'support':27 'text':57 'titl':19 'updat':46 'varieti':29 'version':43","created_at":"2026-04-11T01:35:28.815207+00:00","updated_at":"2026-04-16T17:18:45.179812+00:00","problems":[{"fix":"Install the library using pip: `pip install nameparser`","cause":"The 'nameparser' library is not installed in the current Python environment or the environment is not correctly activated.","error":"ModuleNotFoundError: No module named 'nameparser'"},{"fix":"Use the correct attribute name, for example: `name.middle` instead of `name.middle_name`.","cause":"The user is attempting to access a name component using an incorrect attribute name. The correct attribute for middle names is 'middle'.","error":"AttributeError: 'HumanName' object has no attribute 'middle_name'"},{"fix":"Ensure that values assigned to `HumanName` attributes are always strings, lists of strings, or `None`.","cause":"A `HumanName` attribute (like `first`, `middle`, `last`, etc.) was assigned a value that is not a string, a list of strings, or `None`.","error":"TypeError: Can only assign strings, lists or None to name attributes. Got <class 'int'>"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":"2.1.0","cli_name":"","cli_version":null,"type":"library","homepage":null,"github":"https://github.com/derek73/python-nameparser","docs":null,"changelog":null,"pypi":"https://pypi.org/project/nameparser/","npm":null,"openapi_spec":null,"status_page":null,"smithery":null,"categories":["serialization"],"base_url":null,"auth_type":null,"provenance":{"verified_status":"passing","verified_at":"2026-06-28","last_verified":"2026-08-28","next_check":"2026-07-28","install_tag":null}}