types-MarkupSafe
Typing stubs for MarkupSafe
What it is and what it does
This is a PEP 561 type stub package that provides type information for MarkupSafe, allowing static type checkers like mypy, PyCharm, and pytype to validate code using MarkupSafe. The stubs are maintained as part of the typeshed project.
The description notes that MarkupSafe has included type annotations since version 2.0, and recommends uninstalling this package if using that version or newer. It remains relevant primarily for projects using older MarkupSafe versions that lack built-in type information.
Use it for:
- Type-checking code using older MarkupSafe versions with mypy or similar tools
- Providing IDE type hints for MarkupSafe usage in projects constrained to pre-2.0 versions
- Supporting static analysis in legacy projects that depend on older MarkupSafe releases
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Provides type stubs for MarkupSafe, enabling static type checkers like mypy and PyCharm to validate code that uses MarkupSafe.
No for modern projects. The description explicitly recommends uninstalling this package if using MarkupSafe 2.0 or later, since MarkupSafe now includes its own type annotations. Install only if locked into older MarkupSafe versions lacking built-in types.
Install
types-markupsafe on PyPI
pip
pip install types-markupsafeuv
uv add types-markupsafepoetry
poetry add types-markupsafeInstalling types-MarkupSafe
Before you install
Low install friction with no runtime dependencies. Package maintenance is active, though the latest release dates to 2021-11-27.
License in practice
Licensed under Apache-2.0 (permissive), allowing broad use, modification, and distribution with minimal restrictions.
Quickstart
pip install types-MarkupSafe
# Then use with mypy or other type checkers
# mypy your_code.py
Verify before relying
- Whether this package remains necessary for MarkupSafe 2.0 or later, given MarkupSafe's own type annotations
- Current compatibility with modern versions of MarkupSafe and type-checking tools
Package facts
| License | Apache-2.0 license (permissive) |
| Python support | not specified |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | none |
| Maintenance | actively maintained — 1,721 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 2,550,057/month — #3,005 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: types_MarkupSafe-1.1.10-py3-none-any.whl
Tags
More Software Development packages
Provides backported and experimental type hints…
permissive · top 100 on PyPI
numpyNumPy provides an N-dimensional array object…
permissive · top 100 on PyPI
fastapiFastAPI is a Python web framework for building…
permissive · top 100 on PyPI
annotated-docProvides a way to document function parameters,…
permissive · top 100 on PyPI
typerTyper builds command-line applications from…
permissive · top 1,000 on PyPI
distlibDistlib provides low-level packaging utilities…
permissive · top 1,000 on PyPI
types-attrsProvides PEP 561 type stubs for the attrs…
permissive · top 15,000 on PyPI
types-Jinja2Provides PEP 561 type stubs for Jinja2,…
permissive · top 5,000 on PyPI
types-WerkzeugProvides PEP 561 type stubs for Werkzeug,…
permissive · top 5,000 on PyPI
types-FlaskProvides PEP 561 type stubs for Flask to enable…
permissive · top 5,000 on PyPI
types-jwtProvides type stubs for the jwt package,…
permissive · top 15,000 on PyPI
types-backportsProvides PEP 561 type stubs for the backports…
permissive · top 15,000 on PyPI
types-clickProvides PEP 561 type stubs for the click…
permissive · top 5,000 on PyPI
types-tornadoProvides PEP 561 type stubs for tornado,…
permissive · top 15,000 on PyPI
types-factory-boyProvides PEP 561 type stubs for factory-boy,…
permissive · top 15,000 on PyPI
MarkupSafeMarkupSafe provides a text object that escapes…
permissive · top 100 on PyPI