Typing stubs for the nameparser library.
This package provides type information (stub files) for the nameparser library, enabling better IDE support and static type checking when working with human name parsing functionality.
The nameparser library is a Python library for parsing human names into their component parts (first name, last name, middle name, title, suffix, etc.), but it doesn't include type hints. This package fills that gap by providing comprehensive type stubs.
pip install types-nameparserOr if you're using uv:
uv add types-nameparserAfter installation, you can use the type stubs with your existing nameparser code:
from nameparser import HumanName
# Now you get full type hints and IDE support!
name = HumanName("Dr. John Michael Smith Jr.")
print(name.first) # "John"
print(name.last) # "Smith"
print(name.middle) # "Michael"
print(name.title) # "Dr."
print(name.suffix) # "Jr."The stubs provide type information for the HumanName class with the following properties:
first: str- First name componentlast: str- Last name componentmiddle: str- Middle name componenttitle: str- Title component (Mr., Mrs., Dr., etc.)suffix: str- Suffix component (Jr., Sr., III, etc.)nickname: str- Nickname component
This project uses uv for dependency management and just for task running.
# Install dependencies
just install# Run linting
just lint
# Run linting with auto-fix
just lint-fix
# Format code
just format
# Type checking
just type-check
# Run tests
just test
# Run tests with coverage
just test-cov- Python 3.10+
- The actual
nameparserlibrary (this package only provides type stubs)
This project is licensed under the same terms as the original nameparser library.
Contributions are welcome! Please feel free to submit a Pull Request. For major changes, please open an issue first to discuss what you would like to change.
- nameparser - The original name parsing library
- typeshed - Collection of type stubs for Python standard library and third-party packages