FetchMD
Fetch any web page as clean Markdown.
Features
- Fetches a URL and returns Markdown (sync, minimal API).
- Prefers Markdown/plain responses via
Accept, falls back to HTML conversion. - Extracts main content with readability by default.
- Absolutizes links and images for fetched URLs.
- Supports piping raw HTML via stdin.
Install
Requires Python >= 3.10.
uv tool install fetchmd
CLI
# Run without installing
uv run fetchmd https://example.com
# Install once, then:
fetchmd https://example.com
# Read raw HTML from stdin
curl https://example.com | fetchmd -
# Skip readability, convert full HTML
fetchmd --raw https://example.com
Python API
from fetchmd import fetchmd
md = fetchmd("https://example.com")
Behavior
text/markdownandtext/plainare returned as-is.- HTML is cleaned with readability unless
--rawis used. - Relative
hrefandsrcare converted to absolute URLs for fetched pages. - When reading from stdin (
-), there is no base URL, so links remain unchanged.
Testing
Run tests on a single Python version:
uv run --python 3.12 --with pytest -- pytest
Run the supported-version matrix:
./scripts/test-matrix.sh
Override versions (space-separated):
PY_VERSIONS="3.10 3.11 3.12 3.13 3.14" ./scripts/test-matrix.sh
Metadata
Release files for fetchmd 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| fetchmd-0.1.0.tar.gz | 30.9 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| fetchmd-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 36.0 kB
Release files / fetchmd-0.1.0.tar.gz
| Download URL | fetchmd-0.1.0.tar.gz |
|---|---|
| Size | 30.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
f5ea587457e711f0cc377b43af4ca6c768be6a98cc7fe33b04794caf951dc74c
|
|
BLAKE2b-256 checksum How to use checksums |
8b64cc797b6361bda5d41b802f1ae5d22827d7c71bbc082fa4825ecd2c19b573
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.9.26 {"installer":{"name":"uv","version":"0.9.26","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Release files / fetchmd-0.1.0-py3-none-any.whl
| Download URL | fetchmd-0.1.0-py3-none-any.whl |
|---|---|
| Size | 5.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
4413b847941afcb9f0d143757ab34321f61c6049abff87f528179b3a46dfc5d6
|
|
BLAKE2b-256 checksum How to use checksums |
941e2934d2f99832e797ed1fa45d69369bebde4c36b7e595d1e052a9f7164e10
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.9.26 {"installer":{"name":"uv","version":"0.9.26","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Security for fetchmd 0.1.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.