Skip to main content

Installation

pip install markdownify

Usage

Convert some HTML to Markdown:

from markdownify import markdownify as md
md('<b>Yay</b> <a href="http://github.com">GitHub</a>')  # > '**Yay** [GitHub](http://github.com)'

Specify tags to exclude (blacklist):

from markdownify import markdownify as md
md('<b>Yay</b> <a href="http://github.com">GitHub</a>', strip=['a'])  # > '**Yay** GitHub'

...or specify the tags you want to include (whitelist):

from markdownify import markdownify as md
md('<b>Yay</b> <a href="http://github.com">GitHub</a>', convert=['b'])  # > '**Yay** GitHub'

Development

To run tests:

python setup.py test

To lint:

python setup.py lint

Metadata

Release files for markdownify 0.4.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for markdownify 0.4.0
File Size Uploaded Provenance Actions
markdownify-0.4.0.tar.gz 5.5 kB Without provenance Details for markdownify-0.4.0.tar.gz

Release files / markdownify-0.4.0.tar.gz

Download URL markdownify-0.4.0.tar.gz
Size 5.5 kB
Tags Source
SHA-256 checksum
How to use checksums
7cf4787436527a60fdda3311f29b2894e59c148a3a51835d650a747b70b950e2
BLAKE2b-256 checksum
How to use checksums
d0f6b07ee31c7e0c4eb858a1f51419c898d374bca8baff423fc8eb44971af5a9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Security for markdownify 0.4.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.4.0 This release

1 release file No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page