Skip to main content

A Python package that converts Markdown to HTML using Tailwind CSS 4 for styling.

Project description

md2html-tailwind4

A Python package that converts Markdown to clean, styled HTML using Tailwind CSS 4 classes.

Designed for projects that render HTML inside a Tailwind-powered frontend (Django, FastAPI, static sites, etc.). No build step required — just pass in Markdown, get back ready-to-render HTML.

Features

  • Converts Markdown to HTML with full Tailwind CSS 4 class annotations
  • Responsive tables with overflow scrolling
  • Audio table support (3-column tables with media URLs become interactive audio players)
  • Automatically escapes Django template delimiters ({{ }}, {% %}) inside code blocks
  • External links get target="_blank" and rel="noopener noreferrer" automatically
  • Dark mode support via Tailwind's dark: variants
  • CLI tool included

Installation

pip install md2html-tailwind4

Usage

Python API

from md2html_tailwind4 import Converter

converter = Converter()
html = converter.convert_md_to_html("# Hello\n\nThis is **Markdown**.")
print(html)

Command Line

md2html input.md output.html

Requirements

  • Python >= 3.11

License

MIT — White Neuron Co., Ltd.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

md2html_tailwind4-1.0.0.tar.gz (9.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

md2html_tailwind4-1.0.0-py3-none-any.whl (7.2 kB view details)

Uploaded Python 3

File details

Details for the file md2html_tailwind4-1.0.0.tar.gz.

File metadata

  • Download URL: md2html_tailwind4-1.0.0.tar.gz
  • Upload date:
  • Size: 9.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for md2html_tailwind4-1.0.0.tar.gz
Algorithm Hash digest
SHA256 f11dad30e46b4d0b31d6fd46c87f3831c058ae15a8bbe1d560b772a714ef3f41
MD5 92bd76748eef78ed6a1aa016d10354fc
BLAKE2b-256 18c826c69e3bb1d30cfd43da787b6eef4b7fd8e9f7f0a6c31fb9349bc1e1b1a0

See more details on using hashes here.

Provenance

The following attestation bundles were made for md2html_tailwind4-1.0.0.tar.gz:

Publisher: python-publish.yml on White-Neuron/md2html-tailwind4

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file md2html_tailwind4-1.0.0-py3-none-any.whl.

File metadata

File hashes

Hashes for md2html_tailwind4-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 192e10cca5cf3fe4e6ca194edf9320f7419f94b436cdf0da03c8116dade3311b
MD5 cd90e6495ddd929e324b7c91b088b5a3
BLAKE2b-256 ed5dffa050b943d011f7e62ac2dad2f7e4132b6155fd2bb1c1f340414646a7dc

See more details on using hashes here.

Provenance

The following attestation bundles were made for md2html_tailwind4-1.0.0-py3-none-any.whl:

Publisher: python-publish.yml on White-Neuron/md2html-tailwind4

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page