Skip to main content

types-nameparser

PyPI version Python versions

Typing stubs for the nameparser library.

Overview

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.

Installation

pip install types-nameparser

Or if you're using uv:

uv add types-nameparser

Usage

After 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."

Type Information

The stubs provide type information for the HumanName class with the following properties:

  • first: str - First name component
  • last: str - Last name component
  • middle: str - Middle name component
  • title: str - Title component (Mr., Mrs., Dr., etc.)
  • suffix: str - Suffix component (Jr., Sr., III, etc.)
  • nickname: str - Nickname component

Development

This project uses uv for dependency management and just for task running.

Setup

# Install dependencies
just install

Available Commands

# 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

Requirements

  • Python 3.10+
  • The actual nameparser library (this package only provides type stubs)

License

This project is licensed under the same terms as the original nameparser library.

Contributing

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.

Related Projects

  • nameparser - The original name parsing library
  • typeshed - Collection of type stubs for Python standard library and third-party packages

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

types_nameparser-0.3.3.tar.gz (3.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

types_nameparser-0.3.3-py3-none-any.whl (3.4 kB view details)

Uploaded Python 3

File details

Details for the file types_nameparser-0.3.3.tar.gz.

File metadata

  • Download URL: types_nameparser-0.3.3.tar.gz
  • Upload date:
  • Size: 3.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for types_nameparser-0.3.3.tar.gz
Algorithm Hash digest
SHA256 d49b857213be067e512c5dcf05053d66151b715d792351f3437a25d8e05b6b1f
MD5 d2d416e1c39f91a1ad3d66929ae8f730
BLAKE2b-256 29e60555e260c87a07fb281fe38f38a2c3f8139583011a5d0a66c218143d4ba3

See more details on using hashes here.

File details

Details for the file types_nameparser-0.3.3-py3-none-any.whl.

File metadata

File hashes

Hashes for types_nameparser-0.3.3-py3-none-any.whl
Algorithm Hash digest
SHA256 517d9e11c1320be7e0c0f5ecd67ed501e86a488c80bf56e6f20c68eac8df35d4
MD5 630a18773324ec5280f8d18e10fa3507
BLAKE2b-256 320f1ac2fcb84d57fe6255bbb1639f333beed65db727fcb8e892db4c40f9860c

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

0.3.3 This release

2 files

0.3.2

2 files

0.3.1

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page