Skip to main content

Typing stubs for the nameparser library

Project description

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

Project details


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.1.tar.gz (3.2 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.1-py3-none-any.whl (3.2 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: types_nameparser-0.3.1.tar.gz
  • Upload date:
  • Size: 3.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for types_nameparser-0.3.1.tar.gz
Algorithm Hash digest
SHA256 a3467ac4371d6f6fd0097dd77e1dad05fbadba70f2c3bce602d1170b02d86795
MD5 8254e9eb656a1eb12e3fbf21c0041eda
BLAKE2b-256 656f1bab9b82ed9374798fff12aa31b3cd1d9c6218a9750e1c90cc751dc13060

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for types_nameparser-0.3.1-py3-none-any.whl
Algorithm Hash digest
SHA256 999ffa2c28691768e51db9133979b704f593c816089566018fd6b2bb2a6efd77
MD5 0a2f66fd2c851ac98e22335ae76642f1
BLAKE2b-256 ffe4501f15be90b5bee10f3526afe4c6e3461603c6a5b00f1c130cc3af3f72da

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page