graphemeu
Unicode grapheme helpers
Decision gist · record as of 2026-08-14
Yes, if you need correct grapheme-aware string handling. The package has no dependencies, installs easily, and carries no security vulnerabilities. The aging maintenance status (218 days since release) is a minor concern but not a blocker—the library is a stable fork that updates with Unicode versions. Install it when user-perceived character boundaries matter more than raw performance; avoid it if you're working with very long strings or can tolerate Unicode code-point semantics.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Requires Python 3.10 or later.
- Low friction: pure Python wheel with no runtime dependencies.
- Maintenance status is aging—last release 218 days ago—but the repository is active and the package is a maintained fork addressing Unicode 17.0.0.
License · maintenance · safety
MIT (permissive) — MIT license permits commercial and private use with minimal restrictions; you may use, modify, and distribute the package freely provided you retain the license notice.
last release 2026-01-08 (218 days) · last repo commit 2026-01-08 · 11 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 2,153,333 downloads/mo, #3,248 on PyPI
Alternatives
Verify before relying
pip install graphemeu
import graphemeu as grapheme
string = 'u̲n̲d̲e̲r̲l̲i̲n̲e̲d̲'
print(grapheme.length(string)) # 10 (user-perceived characters)
print(grapheme.slice(string, 0, 3)) # 'u̲n̲d̲'- Whether the aging maintenance status (218 days since last release) will continue to track future Unicode versions.
- Real-world performance characteristics on production workloads beyond the documented 10,000-character ASCII benchmark.
What it is and what it does
graphemeu is a Unicode-aware string library that treats grapheme clusters—the user-perceived characters that may span multiple Unicode code points—as the fundamental unit of text manipulation. Standard Python string functions count and slice by individual Unicode characters, which can split combining marks, emoji modifiers, and other multi-codepoint sequences. This package implements the Unicode Standard Annex #29 rules to correctly identify grapheme boundaries and provides functions like length(), slice(), and contains() that operate on graphemes instead.
The library is most useful when you need to count or truncate text the way users see it—for example, when formatting text-based tables, enforcing display width limits, or ensuring that truncation doesn't corrupt combining marks or emoji. It trades performance for correctness: grapheme operations scale linearly with string length and are notably slower than Unicode code-point operations, so it's best suited for relatively short strings or operations on the beginning of long strings.
Use it for
- Count visible characters in user input for UI validation or display length constraints.
- Truncate or slice text at user-perceived boundaries without corrupting combining marks or emoji modifiers.
- Format text-based tables or monospaced output where column widths must match perceived character width.
- Process strings containing emoji with skin-tone or gender modifiers as single units.
- Validate text length for systems that measure by grapheme clusters rather than Unicode code points.
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes, if you need correct grapheme-aware string handling.
The package has no dependencies, installs easily, and carries no security vulnerabilities. The aging maintenance status (218 days since release) is a minor concern but not a blocker—the library is a stable fork that updates with Unicode versions. Install it when user-perceived character boundaries matter more than raw performance; avoid it if you're working with very long strings or can tolerate Unicode code-point semantics.
Install
graphemeu on PyPI
Before you install
Low friction: pure Python wheel with no runtime dependencies. Maintenance status is aging—last release 218 days ago—but the repository is active and the package is a maintained fork addressing Unicode 17.0.0.
Requires Python 3.10 or later.
License in practice
MIT license permits commercial and private use with minimal restrictions; you may use, modify, and distribute the package freely provided you retain the license notice.
Quickstart
pip install graphemeu
import graphemeu as grapheme
string = 'u̲n̲d̲e̲r̲l̲i̲n̲e̲d̲'
print(grapheme.length(string)) # 10 (user-perceived characters)
print(grapheme.slice(string, 0, 3)) # 'u̲n̲d̲'
Verify before relying
- Whether the aging maintenance status (218 days since last release) will continue to track future Unicode versions.
- Real-world performance characteristics on production workloads beyond the documented 10,000-character ASCII benchmark.
Package facts
| License | MIT permissive |
| Python support | Supports the current Python release >=3.10 |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | None |
| Maintenance | Aging 218 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 2,153,333 / month, #3,248 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 :: DevelopersProgramming Language :: Python |
Evidence: graphemeu-0.10.0-py3-none-any.whl
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 › “unicode string length by user characters”
- graphemeuProvides string manipulation functions that work with user-perceived…
- graphemeProvides string manipulation functions that work with grapheme…
- cwcwidthcwcwidth provides fast Python bindings for POSIX wcwidth and wcswidth…
Give your agent the search over MCP, or paste the wish link into any chat.
More Linguistic packages
Detects and normalizes text encoding from unknown or ambiguous sources, supporting all IANA character sets that Python's core library provides codecs for, with the ability to register custom codecs.
tiktoken is a fast BPE tokenizer that converts text into token sequences compatible with OpenAI models, supporting multiple encoding schemes including o200k_base and model-specific encodings.
Install it if you work with OpenAI APIs or need to understand token boundaries in GPT-family models.
Detects character encoding and language in byte sequences with high accuracy, supporting 99 encodings and returning confidence scores, language tags, and MIME types.
Install it if you need to detect character encoding or language in byte data; the rewrite makes it substantially faster and more accurate than its predecessors.
Converts Unicode text to ASCII by transliterating non-ASCII characters into their closest ASCII equivalents, with no runtime dependencies.
However, if transliteration quality or ongoing maintenance matters, consider unidecode instead despite its GPL-only license.
Lark is a parsing library that builds abstract syntax trees from context-free grammars, supporting multiple parsing algorithms (Earley, LALR(1), CYK) with automatic line and column tracking.
Python bindings to the tree-sitter parsing library, enabling incremental parsing and syntax tree analysis for source code.
See also grapheme · uniseg · unicode-segmentation-rs · unicodedataplus · tangled-up-in-unicode · emoji · confusable-homoglyphs · anyascii · wcwidth · confusables