pyspelling
Spell checker.
What it is and what it does
PySpelling is a Python wrapper around the Aspell and Hunspell command-line spell checkers, designed to automate spell checking across different file types in a project. It lets you define multiple spelling tasks, each with its own filters and options, so you can apply different rules to Python docstrings, HTML, Markdown, and other formats. The package works around limitations in Aspell and Hunspell's built-in filters by providing more granular control—for example, you can exclude specific HTML elements by ID or class name, or skip particular content within docstrings.
PySpelling integrates with CI/CD pipelines to fail builds when misspellings are detected, making it useful for maintaining code quality in automated workflows. It depends on parsing libraries like BeautifulSoup4, lxml, and Markdown to handle different file formats, and uses wcmatch for pattern matching. The package is production-stable, supports Python 3.9 through 3.14, and carries no known security vulnerabilities.
Use it for:
- Enforce consistent spelling in documentation and docstrings across a Python project as part of CI/CD.
- Filter out code identifiers and technical terms from spell checking while validating natural-language comments.
- Scan HTML or Markdown files while ignoring specific tags or sections that shouldn't be spell-checked.
- Automate spell checking for multiple file types (Python, Markdown, HTML, YAML) with different rules per type.
- Catch misspellings in generated or templated content before deployment.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
PySpelling wraps Aspell or Hunspell to automate spell checking across project files with customizable filters and task-based configuration, and can fail builds in CI when misspellings are found.
Yes, if you need automated spell checking in CI and are willing to install Aspell or Hunspell separately. The package is stable, permissively licensed, and has low install friction. The aging maintenance status (261 days since last release) is not a blocker for a mature tool, but verify that Aspell/Hunspell setup fits your deployment model before committing.
Install
pyspelling on PyPI
pip
pip install pyspellinguv
uv add pyspellingpoetry
poetry add pyspellingInstalling pyspelling
Before you install
Low install friction with a pure Python wheel and seven runtime dependencies (beautifulsoup4, html5lib, lxml, markdown, pyyaml, soupsieve, wcmatch). Maintenance status is aging—last release was 261 days ago—but the repository remains active with recent commits and no archived status.
License in practice
MIT license (permissive) means you can use, modify, and distribute PySpelling with minimal restrictions, making it safe for both open-source and commercial projects.
Quickstart
pip install pyspelling
Create a .spellcheckignore or config file, then run:
pyspelling check
Requires Aspell or Hunspell to be installed on your system as external command-line tools; PySpelling is a wrapper around them, not a standalone spell checker.
Verify before relying
- Whether Aspell or Hunspell installation is automatic or requires manual setup on each platform.
- Specific filter types and extensibility mechanisms beyond the description's mention of custom Python filters.
- Performance characteristics when scanning large projects or many file types.
Package facts
| License | MIT (permissive) |
| Python support | supports the current Python release (>=3.9) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 7 — beautifulsoup4, html5lib, lxml, markdown, pyyaml, soupsieve, wcmatch |
| Maintenance | aging — 261 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 166,947/month — #10,480 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: pyspelling-2.12.1-py3-none-any.whl
Keywords: spelling
Tags
More Python Modules packages
Converts domain names between Unicode and…
permissive · top 100 on PyPI
setuptoolsSetuptools is a Python build backend and…
permissive · top 100 on PyPI
PyYAMLPyYAML parses and emits YAML 1.1 data format,…
permissive · top 100 on PyPI
pydanticPydantic validates Python data structures…
permissive · top 100 on PyPI
annotated-typesProvides reusable metadata objects for use with…
permissive · top 100 on PyPI
typing-inspectionProvides runtime tools to inspect and…
permissive · top 100 on PyPI
pyphenPyphen hyphenates text in multiple languages…
copyleft · top 1,000 on PyPI
pyspellcheckerDetects misspelled words and suggests…
permissive · top 5,000 on PyPI
codespellCodespell finds and fixes common misspellings…
copyleft · top 5,000 on PyPI
typosFinds and corrects spelling mistakes in source…
permissive · top 5,000 on PyPI
sphinxcontrib-spellingA Sphinx extension that checks documentation…
permissive · top 5,000 on PyPI
pyenchantPyEnchant provides Python bindings to the…
copyleft · top 5,000 on PyPI
mkdocs-spellcheckA spell checker plugin for MkDocs that…
permissive · top 15,000 on PyPI
symspellpysymspellpy is a Python port of SymSpell v6.7.2…
permissive · top 15,000 on PyPI
language_tool_pythonPython wrapper for LanguageTool that checks…
copyleft · top 15,000 on PyPI
backrefsBackrefs extends Python's re and regex…
permissive · top 5,000 on PyPI