Skip to main content

Python bindings for fast_h2m, a high-performance HTML to Markdown converter

Project description

fast-h2m

Python bindings for fast_h2m, a high-performance HTML to Markdown converter.

import fast_h2m

markdown = fast_h2m.convert_to_markdown("<h1>Hello</h1><p>World</p>")
result = fast_h2m.convert("<h1>Hello</h1>", {"include_document_structure": True})

For throughput-oriented conversion of common HTML, opt into the lean DOM path:

markdown = fast_h2m.convert_to_markdown(
    html,
    {"tier_strategy": "fast_dom"},
)

fast_dom skips the richer metadata, structure, visitor, selector, and repair machinery used by the full converter.

For mdream-backed lean conversion:

markdown = fast_h2m.convert_to_markdown(
    html,
    {"tier_strategy": "mdream"},
)

For chunked streaming conversion:

stream = fast_h2m.MarkdownStreamProcessor()
markdown = ""
markdown += stream.process_chunk("<h1>Hello</h1>")
markdown += stream.process_chunk("<p>World</p>")
markdown += stream.finish()

The package targets Python 3.8+ and exposes the Rust converter through PyO3.

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

fast_h2m-0.4.1.tar.gz (338.7 kB view details)

Uploaded Source

Built Distributions

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

fast_h2m-0.4.1-cp38-abi3-win_amd64.whl (912.6 kB view details)

Uploaded CPython 3.8+Windows x86-64

fast_h2m-0.4.1-cp38-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.0 MB view details)

Uploaded CPython 3.8+manylinux: glibc 2.17+ x86-64

fast_h2m-0.4.1-cp38-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (959.3 kB view details)

Uploaded CPython 3.8+manylinux: glibc 2.17+ ARM64

fast_h2m-0.4.1-cp38-abi3-macosx_11_0_arm64.whl (904.3 kB view details)

Uploaded CPython 3.8+macOS 11.0+ ARM64

File details

Details for the file fast_h2m-0.4.1.tar.gz.

File metadata

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

File hashes

Hashes for fast_h2m-0.4.1.tar.gz
Algorithm Hash digest
SHA256 085a24723975b52702d5d390a3b8be0a3c5204a9a4f0176b1fd359bf117e1a68
MD5 1e19c01f4e2d928c5f9bd23b0f1b51bc
BLAKE2b-256 1ab1e2bfcb873c01f9768e904b11b501e8e26eb560205e1ceb63ed17f7e960fb

See more details on using hashes here.

Provenance

The following attestation bundles were made for fast_h2m-0.4.1.tar.gz:

Publisher: release.yml on RustedBytes/fast-h2m

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

File details

Details for the file fast_h2m-0.4.1-cp38-abi3-win_amd64.whl.

File metadata

  • Download URL: fast_h2m-0.4.1-cp38-abi3-win_amd64.whl
  • Upload date:
  • Size: 912.6 kB
  • Tags: CPython 3.8+, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for fast_h2m-0.4.1-cp38-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 f8905f7be232d6be837c08f24f5c0b2c1fb649054243810aca0537d7f7fb5e22
MD5 336753cdddf8ff32d0f0c8a7f5efc37b
BLAKE2b-256 19e58ad759278aca6e19317de4fddbc0c13f06a7554c5b956074eb77bb462175

See more details on using hashes here.

Provenance

The following attestation bundles were made for fast_h2m-0.4.1-cp38-abi3-win_amd64.whl:

Publisher: release.yml on RustedBytes/fast-h2m

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

File details

Details for the file fast_h2m-0.4.1-cp38-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for fast_h2m-0.4.1-cp38-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 2f94746aca29236777da6184f95615fd927e3afa6bcf91da8f9718a61ff16a52
MD5 4b20de5f9a4663641f2db174912e6ba2
BLAKE2b-256 5f1cbc4ad062016b6b598b1e0fc00ea5039a031a8f7c60f21e20e53e6bd10311

See more details on using hashes here.

Provenance

The following attestation bundles were made for fast_h2m-0.4.1-cp38-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl:

Publisher: release.yml on RustedBytes/fast-h2m

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

File details

Details for the file fast_h2m-0.4.1-cp38-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for fast_h2m-0.4.1-cp38-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 cae1b20cd6863316baf14ce26b0f4c52bb7a8d179a92ac7409bd0c98369ebe29
MD5 4c43ca7c6755012d91793e3b88f5b556
BLAKE2b-256 b927cee9f40fa7548037a5f036db741c08e76663a57dd3b288a1ce3e8987f58e

See more details on using hashes here.

Provenance

The following attestation bundles were made for fast_h2m-0.4.1-cp38-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl:

Publisher: release.yml on RustedBytes/fast-h2m

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

File details

Details for the file fast_h2m-0.4.1-cp38-abi3-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for fast_h2m-0.4.1-cp38-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 b36a0b700db148eb87faa30e371e18db0c2d61cef749b518947b58f2f0201671
MD5 7a46b2f3c39b8a6223d6d316a5dddba5
BLAKE2b-256 2f49d0372021ba59b5495198090a5062177037ee9bec75f373dce955ad6402f6

See more details on using hashes here.

Provenance

The following attestation bundles were made for fast_h2m-0.4.1-cp38-abi3-macosx_11_0_arm64.whl:

Publisher: release.yml on RustedBytes/fast-h2m

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