--- id: pyuca version: "1.2" license: MIT license_treatment: permissive maintenance: active --- # pyuca — a Python implementation of the Unicode Collation Algorithm License: permissive · Maintenance: active · Downloads: 276.7K/mo ## What it is and what it does pyuca is a Python implementation of the Unicode Collation Algorithm (UCA), the standard method for sorting text in multiple languages and scripts. It passes conformance tests for Unicode versions from 5.2.0 through 10.0.0 depending on your Python version, and handles the linguistic nuances that plain string sorting misses: accents, diacritics, language-specific letter orderings (like Spanish ch), and character expansions (like German ä sorting as ae). You use it by creating a Collator instance and passing its sort_key method to Python's sorted() function. For example, café correctly sorts before caff when using the collator, whereas standard sorting would place caff first. The package has no runtime dependencies and installs as a pure Python wheel, making it lightweight and portable. Use it for: - Sort user-facing lists (names, cities, products) in multilingual applications where accent and diacritic handling matters. - Build search and filter systems that respect language-specific collation rules for better UX. - Process linguistic or historical text data that requires proper Unicode-aware ordering. - Implement locale-independent sorting in databases or APIs serving international users. - Handle Spanish, German, French, and other language-specific letter orderings in sorted output. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Implements the Unicode Collation Algorithm to sort strings in non-English languages correctly, handling accents, contractions, and expansions according to Unicode standards. Yes. pyuca is a stable, actively maintained implementation of a well-defined standard with zero dependencies, no security vulnerabilities, and permissive licensing. Install it if you need correct multilingual string sorting; it solves a real problem that Python's default sort does not. The last release was 2017, but the repository remains active and the algorithm is mature—this is not a red flag for a standards-based library. ## Install pip install pyuca uv add pyuca poetry add pyuca ## Installing pyuca Before you install: Low friction: pure Python wheel with no runtime dependencies. Actively maintained as of 2026-07-25 with stable status and 226 repository stars. License in practice: MIT license (permissive) on Python code; allkeys.txt data file carries a similar license. No restrictions on commercial or proprietary use. Quickstart: pip install pyuca from pyuca import Collator c = Collator() sorted(["cafe", "caff", "café"], key=c.sort_key) Verify before relying: - Whether Unicode 10.0.0 support (Python 3.7+) extends to newer Python versions released after 2017 - Performance characteristics on large datasets or real-world multilingual corpora ## Package facts - License: MIT (permissive) - Python support: unspecified - Install friction: low - Maintenance: active - Downloads: 276.7K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags unicode collation algorithm, sort non-english strings, multilingual string sorting, unicode text collation, accent-aware sorting, international text ordering, unicode, internationalization, collation [View on SkillFed](https://skillfed.io/packages/pyuca) · [View on PyPI](https://pypi.org/project/pyuca/)