</>PackageGraphPackageGraph

MarkupSafe

PyPIv3.0.3

Safely add untrusted strings to HTML/XML markup.

Not recommended for new projects

No — MarkupSafe should not be adopted for new projects. No license declared — you have no explicit right to use this code.

  • ?Adoption: grade ?, Not reported by this registry.

    No download data reported for this package yet.

  • BMaintenance: grade B, Good.

    Last published 347 days ago. 4 releases in the last 2 years.

  • AWeight: grade A, Excellent.

    Zero runtime dependencies, about 11 KB installed.

  • BSupply chain: grade B, Good.

    This package lists no maintainer.

  • FLicense: grade F, Failing.

    No license declared — you have no explicit right to use this code.

Grades are computed deterministically from registry metadata collected by PackageGraph — downloads, dependents, publish dates, the resolved dependency tree, maintainer count, and declared licenses. No third-party scores are used.

Install cost

What you actually take on by adding MarkupSafe to a project.

0
Direct dependencies

Runtime packages this one declares itself.

0
Total installed

Distinct packages in the full runtime tree, deduplicated the way a package manager would.

11 KB
Install size

Unpacked size of this package plus its entire runtime tree.

Tree depth

Longest resolved dependency chain below this package.

Compatibility

Python
python >=3.9

Quick start

A usage example from the MarkupSafe README.

>>> from markupsafe import Markup, escape

>>> # escape replaces special characters and wraps in Markup
>>> escape("<script>alert(document.cookie);</script>")
Markup('&lt;script&gt;alert(document.cookie);&lt;/script&gt;')

>>> # wrap in Markup to mark text "safe" and prevent escaping
>>> Markup("<strong>Hello</strong>")
Markup('<strong>hello</strong>')

>>> escape(Markup("<strong>Hello</strong>"))
Markup('<strong>hello</strong>')

>>> # Markup is a str subclass
Example truncated — see the full README.

Used by

Popular packages that depend on MarkupSafe.

Relationship graph

Dependencies (left) and dependents (right) of MarkupSafe.

Jinja2MarkupSafe
MarkupSafe dependencies dependents

Release history

1 release in the last two years, typically about 136 days apart.

Recent versions of MarkupSafe
VersionPublishedSizeLicense
3.0.3latest11 months ago11 KB
3.0.21 year ago14 KB
3.0.11 year ago14 KB
3.0.01 year ago14 KB
2.1.52 years ago18 KB
2.1.42 years ago18 KB
2.1.33 years ago17 KB
2.1.23 years ago17 KB
2.1.14 years ago17 KB
2.1.04 years ago17 KB
2.0.15 years ago18 KB
2.0.05 years ago14 KB
2.0.0rc25 years ago14 KB
2.0.0rc15 years ago13 KB
2.0.0a16 years ago13 KB

Overview

MarkupSafe is an PyPI package that safely add untrusted strings to HTML/XML markup. It has 1 known dependents in the graph. The latest version is 3.0.3.

Who should use it

Teams working in the PyPI ecosystem who need safely add untrusted strings to HTML/XML markup and value a focused solution.

When not to use it

Consider an alternative if you need to or if a more actively-maintained option better fits your PyPI stack.

Pros

  • Zero runtime dependencies — minimal footprint.

Cons

  • No license detected — review usage terms before adopting.

Auto-generated from collected registry metadata. No external claims are inferred.

Funding

Frequently asked questions

Should I use MarkupSafe?

No — MarkupSafe should not be adopted for new projects. No license declared — you have no explicit right to use this code.

How do I install MarkupSafe?

Run `pip install MarkupSafe` to add MarkupSafe to your PyPI project.

What license is MarkupSafe released under?

No license was detected in MarkupSafe's metadata; review the repository before use.

How popular is MarkupSafe?

PyPI does not publish download counts. Within PackageGraph's crawl, 1 known packages depend on MarkupSafe.

Is MarkupSafe still maintained?

The most recent release of MarkupSafe (v3.0.3) was published 11 months ago.