pinyin
Translate chinese chars to pinyin based on Mandarin.dat
Decision gist · record as of 2026-08-14
No, unless you are maintaining legacy Python 2 code. The package is abandoned with no updates since 2016 and targets obsolete Python versions. For modern projects, seek an actively maintained alternative. If you must use it, test thoroughly on your target Python version first.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Package targets Python 2.6–3.5; compatibility with Python 3.6+ is unverified.
- Abandoned since 2016 with no active maintenance.
- High install friction: the package is abandoned (last release 2016-11-24, over 3550 days ago) and targets obsolete Python versions (2.6, 2.7, 3.2–3.5).
License · maintenance · safety
BSD (permissive) — Permissive BSD license allows commercial and private use. The translation data file is CC-BY-SA 3.0, which requires attribution if you redistribute the data.
last release 2016-11-24 (3550 days)
0 known vulnerabilities (OSV.dev, 2026-08-14) · 79,145 downloads/mo, #14,377 on PyPI
Alternatives
Verify before relying
pip install pinyin
import pinyin
print(pinyin.get('你好'))
print(pinyin.get('你好', format='strip', delimiter=' '))- Whether the package actually works on modern Python versions despite classifiers targeting only 2.6–3.5
- Current state of the Mandarin.dat data file and whether it is complete or outdated
- Whether the cedict translation module functions correctly on Python 3 as noted in the description
What it is and what it does
Pinyin is a library for converting Chinese characters to their romanized Mandarin pronunciation (pinyin). It reads from a Mandarin.dat data file and supports multiple output formats: diacritical marks (nǐ hǎo), numerical tone notation (ni3hao3), or stripped ASCII (ni hao). It also includes an experimental Chinese-to-English translation module using CC-CEDICT data, though this is noted as a prototype and only functions on Python 3.
The package has no runtime dependencies and is lightweight, but it is no longer maintained. The last release was in 2016, and the classifiers indicate support only for Python 2.6–3.5, making it incompatible with modern Python environments without testing or forking.
Use it for
- Convert Chinese text to pinyin for phonetic display or learning applications
- Extract initial consonants from Chinese characters for indexing or sorting
- Generate numerical tone notation for linguistic analysis or text-to-speech systems
- Look up English translations of Chinese words or phrases using the cedict module
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
No, unless you are maintaining legacy Python 2 code.
The package is abandoned with no updates since 2016 and targets obsolete Python versions. For modern projects, seek an actively maintained alternative. If you must use it, test thoroughly on your target Python version first.
Install
pinyin on PyPI
Before you install
High install friction: the package is abandoned (last release 2016-11-24, over 3550 days ago) and targets obsolete Python versions (2.6, 2.7, 3.2–3.5). No active maintenance or security updates.
Package targets Python 2.6–3.5; compatibility with Python 3.6+ is unverified. Abandoned since 2016 with no active maintenance.
License in practice
Permissive BSD license allows commercial and private use. The translation data file is CC-BY-SA 3.0, which requires attribution if you redistribute the data.
Quickstart
pip install pinyin
import pinyin
print(pinyin.get('你好'))
print(pinyin.get('你好', format='strip', delimiter=' '))
Verify before relying
- Whether the package actually works on modern Python versions despite classifiers targeting only 2.6–3.5
- Current state of the Mandarin.dat data file and whether it is complete or outdated
- Whether the cedict translation module functions correctly on Python 3 as noted in the description
Package facts
| License | BSD permissive |
| Python support | Not specified |
| Install friction | High. Source build required |
| Runtime dependencies | None |
| Maintenance | Abandoned 3,550 days since the last release |
| First released | |
| Downloads | 79,145 / month, #14,377 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | Development Status :: 4 - BetaIntended Audience :: DevelopersLicense :: OSI Approved :: BSD LicenseProgramming Language :: Python :: 2.6Programming Language :: Python :: 2.7Programming Language :: Python :: 3.2Programming Language :: Python :: 3.3Programming Language :: Python :: 3.4Programming Language :: Python :: 3.5Programming Language :: Python :: Implementation :: CPythonProgramming Language :: Python :: Implementation :: PyPyTopic :: Software Development |
Evidence: pinyin-0.4.0.tar.gz
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “mandarin romanization”
- pinyinConverts Chinese characters to pinyin (romanized Mandarin…
- xpinyinConverts Chinese characters (hanzi) to their phonetic romanization…
- cutletCutlet converts Japanese text to romaji (Latin characters) using…
Give your agent the search over MCP, or paste the wish link into any chat.
More Software Development packages
Provides backported and experimental type hints for Python 3.9+, allowing use of newer typing features on older Python versions and enabling early experimentation with type system PEPs before they enter the standard library.
NumPy provides an N-dimensional array object and a comprehensive suite of mathematical, linear algebra, Fourier transform, and random number functions for scientific computing in Python.
FastAPI is a Python web framework for building REST APIs using type hints, with automatic request validation, serialization, and interactive API documentation.
Provides a way to document function parameters, class attributes, return types, and variables inline using Python's `Annotated` type hint syntax instead of traditional docstrings.
Typer builds command-line applications from Python functions using type hints, automatically generating help text, argument parsing, and shell completion.
Install it if you are building CLIs in Python.
Distlib provides low-level packaging utilities for building, distributing, and managing Python software—including metadata handling, version specifiers, wheel support, script installation, and dependency resolution.
See also xpinyin · pypinyin-dict · pypinyin · hangul-romanize · zhon · pronouncing · hanzidentifier · readchar · uroman · anyascii