textstat
Calculate statistical features from text
Decision gist · record as of 2026-08-14
Yes. Textstat is actively maintained, has no known vulnerabilities, installs with low friction, and offers a straightforward API for a well-defined task. It is suitable for anyone needing to measure text readability or grade level, whether for educational, editorial, or accessibility purposes. The MIT license removes licensing concerns.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- nltk may require downloading language data on first use; see nltk documentation for setup if tokenization fails.
- Low friction install with three runtime dependencies (pyphen, nltk, setuptools).
- Active maintenance with recent release on 2026-02-18 and 1377 repository stars.
License · maintenance · safety
MIT (permissive) — MIT license permits unrestricted use, modification, and distribution with minimal obligations—suitable for commercial and proprietary projects.
last release 2026-02-18 (177 days) · last repo commit 2026-02-18 · 1,377 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 1,378,074 downloads/mo, #3,983 on PyPI
Alternatives
Verify before relying
pip install textstat
import textstat
text = "Playing games has always been thought to be important to the development of well-balanced and creative children."
print(textstat.flesch_reading_ease(text))
print(textstat.flesch_kincaid_grade(text))- Whether nltk requires additional data downloads (e.g., corpora) beyond the package install for full functionality.
- Performance characteristics on very large texts or batch processing workloads.
- Accuracy comparison between the multiple readability formulas for specific use cases.
What it is and what it does
Textstat is a text analysis library that computes readability and complexity metrics using established linguistic formulas. It provides functions like Flesch Reading Ease, Flesch-Kincaid Grade Level, Gunning FOG, SMOG Index, Coleman-Liau Index, Dale-Chall Readability Score, and others—each returning a numerical score or grade level that estimates the difficulty of comprehending a given text.
The library supports multiple languages (en_US, de, es, fr, it, nl, pl, ru) with language-specific formula variants, and includes Spanish-specific readability tests. It depends on pyphen for hyphenation and nltk for linguistic processing. Most functions accept plain text and return a single metric; text_standard() synthesizes multiple formulas into a consensus grade estimate.
Use it for
- Evaluate readability of educational content, documentation, or web copy before publication.
- Assess whether written material matches its intended audience's reading level.
- Analyze text complexity in academic or publishing workflows to guide revision.
- Compare readability across multiple documents or versions to track clarity improvements.
- Generate readability reports for content management or accessibility compliance.
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes.
Textstat is actively maintained, has no known vulnerabilities, installs with low friction, and offers a straightforward API for a well-defined task. It is suitable for anyone needing to measure text readability or grade level, whether for educational, editorial, or accessibility purposes. The MIT license removes licensing concerns.
Install
textstat on PyPI
Before you install
Low friction install with three runtime dependencies (pyphen, nltk, setuptools). Active maintenance with recent release on 2026-02-18 and 1377 repository stars.
nltk may require downloading language data on first use; see nltk documentation for setup if tokenization fails.
License in practice
MIT license permits unrestricted use, modification, and distribution with minimal obligations—suitable for commercial and proprietary projects.
Quickstart
pip install textstat
import textstat
text = "Playing games has always been thought to be important to the development of well-balanced and creative children."
print(textstat.flesch_reading_ease(text))
print(textstat.flesch_kincaid_grade(text))
Verify before relying
- Whether nltk requires additional data downloads (e.g., corpora) beyond the package install for full functionality.
- Performance characteristics on very large texts or batch processing workloads.
- Accuracy comparison between the multiple readability formulas for specific use cases.
Package facts
| License | MIT permissive |
| Python support | Supports the current Python release >=3.6 |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | 3 packagespyphennltksetuptools |
| Maintenance | Actively maintained 177 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 1,378,074 / month, #3,983 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | Intended Audience :: DevelopersIntended Audience :: EducationIntended Audience :: Science/ResearchProgramming Language :: PythonProgramming Language :: Python :: 3Programming Language :: Python :: 3 :: OnlyProgramming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.9Topic :: Text Processing |
Evidence: textstat-0.7.13-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 › “readability scoring”
- textstatTextstat calculates readability and complexity metrics from text…
- breadabilityExtracts the main readable content from HTML pages by identifying and…
- complexipyCalculates cognitive complexity scores for Python code to measure how…
Give your agent the search over MCP, or paste the wish link into any chat.
More Text Processing packages
A drop-in replacement for Python's standard `re` module that adds advanced regex features like nested sets, fuzzy matching, lookaround in conditionals, and full Unicode case-folding while maintaining backward compatibility.
pyparsing provides a library for building text parsers directly in Python code using composable grammar classes, handling quoted strings, whitespace variation, and embedded comments without regex or lex/yacc.
Install it if you need to parse text or define grammars programmatically.
fonttools manipulates font files in multiple formats (TrueType, OpenType, AFM, Type 1, Mac-specific) and includes TTX, a tool to convert fonts to and from XML text format.
Install it if you need to read, write, or manipulate fonts programmatically or via the TTX command-line tool.
Docutils converts plaintext documentation in reStructuredText format into multiple output formats including HTML, XML, and LaTeX using a modular processing system.
RapidFuzz provides fast fuzzy string matching using Levenshtein Distance and related metrics, implemented mostly in C++ with Python bindings for rapid similarity scoring and approximate string matching.
Install it if you need fuzzy string matching; it's a solid replacement for FuzzyWuzzy with better licensing and performance.
tinycss2 parses CSS strings into token and block objects, and generates CSS strings from those objects, following the CSS Syntax Level 3 specification without enforcing specific properties or values.
Install it if your project requires CSS tokenization or syntax manipulation.
See also rouge · textacy · rubric · access · lexical-diversity · rouge-chinese · langdetect · syllapy · text2num · detoxify