normality
Micro-library to normalize text strings
Decision gist · record as of 2026-08-14
Yes. Normality is a mature, actively maintained library with no known vulnerabilities, low install friction, and a permissive MIT license. It solves a concrete text-preprocessing problem with a small, focused API. Install it if you need to normalize Unicode text; avoid it only if pyicu is unavailable in your environment and you cannot use an older version.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Requires Python 3.10 or later.
- Version 3.0+ requires pyicu, which may need system ICU libraries; if unavailable, use normality < 3.0.0.
- Low friction install with a pure-Python wheel.
License · maintenance · safety
permissive license (permissive) — MIT license (permissive). You may use, modify, and distribute normality freely in commercial and private projects, provided you retain the copyright notice and license text.
last release 2026-03-08 (159 days) · last repo commit 2026-03-08 · 158 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 294,758 downloads/mo, #7,942 on PyPI
Alternatives
Verify before relying
pip install normality
from normality import normalize, slugify
text = normalize('Nie wieder "Grüne Süppchen" kochen!')
slug = slugify('My first blog post!')- Whether pyicu is available in your target deployment environment (it requires system ICU libraries on some platforms).
What it is and what it does
Normality is a lightweight text-preprocessing library that applies a suite of Unicode normalization functions to prepare text for analysis. It removes diacritics (accents), punctuation, excess whitespace, and other character classes in a single pass, and can generate URL-safe slugs from arbitrary text. The package is built around a small set of composable functions—normalize, slugify, collapse_spaces, ascii_text, latinize_text—each handling a specific normalization task.
As of version 3.0, normality requires pyicu as a mandatory dependency, which brings full Unicode Collation Algorithm support but adds a system-level dependency. The package supports Python 3.10 through 3.13 and is actively maintained. It is useful as a preparation step for text analysis pipelines, search indexing, or any workflow where consistent text representation matters.
Use it for
- Normalize user-supplied text before indexing into a search engine or database.
- Generate URL-safe slugs from article titles or user-generated content.
- Clean and deduplicate text fields by removing diacritics and punctuation before comparison.
- Preprocess multilingual text for downstream NLP or machine learning tasks.
- Collapse irregular whitespace in scraped or imported text data.
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes.
Normality is a mature, actively maintained library with no known vulnerabilities, low install friction, and a permissive MIT license. It solves a concrete text-preprocessing problem with a small, focused API. Install it if you need to normalize Unicode text; avoid it only if pyicu is unavailable in your environment and you cannot use an older version.
Install
normality on PyPI
Before you install
Low friction install with a pure-Python wheel. Actively maintained as of 2026-03-08 with recent commits. Note: version 3.0 and later require pyicu as a mandatory dependency; if that is unavailable in your environment, consider pinning to normality < 3.0.0.
Requires Python 3.10 or later. Version 3.0+ requires pyicu, which may need system ICU libraries; if unavailable, use normality < 3.0.0.
License in practice
MIT license (permissive). You may use, modify, and distribute normality freely in commercial and private projects, provided you retain the copyright notice and license text.
Quickstart
pip install normality
from normality import normalize, slugify
text = normalize('Nie wieder "Grüne Süppchen" kochen!')
slug = slugify('My first blog post!')
Verify before relying
- Whether pyicu is available in your target deployment environment (it requires system ICU libraries on some platforms).
Package facts
| License | permissive license permissive |
| Python support | Supports the current Python release >=3.10 |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | 4 packagesbanalchardetcharset-normalizerpyicu |
| Maintenance | Actively maintained 159 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 294,758 / month, #7,942 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | Development Status :: 3 - AlphaIntended Audience :: DevelopersLicense :: OSI Approved :: MIT LicenseOperating System :: OS IndependentProgramming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13 |
Evidence: normality-3.1.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 › “remove diacritics punctuation”
- normalityNormality removes diacritics, punctuation, and other character…
- PyArabicPyArabic provides functions to manipulate Arabic text and…
- fold-to-asciiConverts Unicode characters outside the basic ASCII range into their…
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 proces · python-slugify · pyunormalize · zalgolib · unicode-slugify · sacremoses · bnunicodenormalizer · slugify · anyascii · PyArabic