markdownify Python HTML to Markdown Conversion Library
markdownify is a Python library that converts HTML content to clean Markdown text. It supports tag filtering, heading styles, custom converters, and code language detection, making it essential for content extraction and document transformation pipelines.
Installation
Use the upstream install or setup path that matches your environment:
- pip install markdownify
- To run tests and the linter run pip install tox once, then tox.
Requirements and caveats from upstream:
- .. |build| image:: https://img.shields.io/github/actions/workflow/status/matthewwithanm/python-markdownify/python-app.yml?branch=develop
- :target: https://github.com/matthewwithanm/python-markdownify/actions/workflows/python-app.yml?query=workflow%3A%22Python+application%22
- :target: https://github.com/matthewwithanm/python-markdownify/blob/develop/LICENSE
Basic usage or getting-started notes:
============
=====
Convert some HTML to Markdown:
Source: https://github.com/matthewwithanm/python-markdownify
Extracted from upstream docs: https://raw.githubusercontent.com/matthewwithanm/python-markdownify/HEAD/README.rst