--- id: pinyin version: "0.4.0" license: BSD license_treatment: permissive maintenance: abandoned --- # pinyin — Translate chinese chars to pinyin based on Mandarin.dat License: permissive · Maintenance: abandoned · Downloads: 79.1K/mo ## 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 above — verify before relying. Converts Chinese characters to pinyin (romanized Mandarin pronunciation) in multiple formats, and provides prototype Chinese-to-English translation via CC-CEDICT data. 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 pip install pinyin uv add pinyin poetry add pinyin ## Installing pinyin 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. 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=' ')) Package targets Python 2.6–3.5; compatibility with Python 3.6+ is unverified. Abandoned since 2016 with no active maintenance. 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: unspecified - Install friction: high - Maintenance: abandoned - Downloads: 79.1K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags chinese to pinyin conversion, mandarin romanization, pinyin generator, chinese character romanize, chinese to english translation, cedict dictionary lookup, chinese phonetic romanization, chinese-nlp, romanization, abandoned [View on SkillFed](https://skillfed.io/packages/pinyin) · [View on PyPI](https://pypi.org/project/pinyin/)