Markdown Link Resolver
A zero-dependency Python micro-tool to resolve relative links and image paths in Markdown files to absolute URLs. Perfect for web scraping, RAG pipelines, and LLM data preparation.
Installation
pip install markdown-link-resolver
(For local development: pip install -e .)
Basic Usage
from markdown_link_resolver import resolve_markdown_links
base_url = "[https://example.com/blog/](https://example.com/blog/)"
dirty_markdown = "Check out our [about us](../about) page or our ."
clean_markdown = resolve_markdown_links(dirty_markdown, base_url)
print(clean_markdown)
# Output: Check out our [about us](https://example.com/about) page or our .
Advanced: Base64 Images & Authentication (v0.2.0)
If you are passing scraped data to Multimodal LLMs (like GPT-4o or Claude 3.5), you can automatically inline images as base64 strings.
If the images are behind a login wall, you can pass custom HTTP headers (like a Bearer token or session cookie) to authenticate the download.
auth_headers = {
"Authorization": "Bearer YOUR_API_TOKEN"
}
md_with_images = "Look at this chart: "
prepared_md = resolve_markdown_links(
md_with_images,
base_url="[https://secure.example.com/](https://secure.example.com/)",
inline_images=True,
headers=auth_headers
)
# Output: Look at this chart: 
Graceful Fallbacks: If an image download times out (5s) or returns a 404, the script gracefully falls back to the absolute URL without crashing your pipeline.
Metadata
Release files for markdown-link-resolver 0.2.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 | Actions |
|---|---|---|---|---|
| markdown_link_resolver-0.2.0.tar.gz | 5.6 kB | With provenance | Details for markdown_link_resolver-0.2.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| markdown_link_resolver-0.2.0-py3-none-any.whl | Python 3 | none | any | Details for markdown_link_resolver-0.2.0-py3-none-any.whl |
Total release size: 10.4 kB
Release files / markdown_link_resolver-0.2.0.tar.gz
| Download URL | markdown_link_resolver-0.2.0.tar.gz |
|---|---|
| Size | 5.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
231a9b0fb54cc39f0f62104b007da782681b142f054b543e2c6ce41e201e0462
|
|
BLAKE2b-256 checksum How to use checksums |
5dfa255362700b2d68160ba19740e232e213d99c8196da9fddd7b5d1331361ce
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 26, 2026.
Transparency logRelease files / markdown_link_resolver-0.2.0-py3-none-any.whl
| Download URL | markdown_link_resolver-0.2.0-py3-none-any.whl |
|---|---|
| Size | 4.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
6ad3ed76da5663c8ecae7e0ad13c8ce15ca46a02b71d6071cb074d0b723efc9d
|
|
BLAKE2b-256 checksum How to use checksums |
66538bbbb8d3ae5555395d84bbf5cbdf02b1bb305bc117dd652e8e5f07548ac4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 26, 2026.
Transparency logSecurity for markdown-link-resolver 0.2.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.
Full provenance
All 2 files in this release have been uploaded with provenance metadata.
Attestation for markdown_link_resolver-0.2.0.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 26, 2026.
Transparency logA 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.