Typing stubs for the nameparser library
Project description
types-nameparser
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 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
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
nameparserlibrary (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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file types_nameparser-0.3.2.tar.gz.
File metadata
- Download URL: types_nameparser-0.3.2.tar.gz
- Upload date:
- Size: 3.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
700f0d19c5c080746d207c4bfbf7369ecca0264622fe2c5e811d6a46abc30756
|
|
| MD5 |
44ebcc7ccfadd86018d28107802e71f4
|
|
| BLAKE2b-256 |
1e1c0081658e731ba9802cfaa91f7e6a819a1f1428183c28f7e71963412f9c16
|
File details
Details for the file types_nameparser-0.3.2-py3-none-any.whl.
File metadata
- Download URL: types_nameparser-0.3.2-py3-none-any.whl
- Upload date:
- Size: 3.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b28918f304ccf582e97f2b86812a1ce5fb93d93683eadcb0cf7ea794bddf545f
|
|
| MD5 |
a4908d48febcd6a7e1b99b083db14120
|
|
| BLAKE2b-256 |
4378499704b0aa3f47d263b5b888882c2428df30f94aa8b1712a5000716bbca2
|