Linked Markdown Python
Python implementation of Linked Markdown, packaged for PyPI.
Status: All 26 conformance tests passing.
API
from linked_markdown.extract import extract
from linked_markdown.errors import (
LinkedMarkdownError,
LMD_NO_FRONTMATTER,
LMD_INVALID_FRONTMATTER,
)
result = extract(markdown)
# => ExtractResult(front_matter="...", body="...", attrs={...})
extract(content: str) -> ExtractResult[dict]
Parses frontmatter from a Linked Markdown document. Supports YAML (---, ---yaml, = yaml =), JSON (---, ---json, = json =), and TOML (---toml, +++, = toml =) formats.
- Strips UTF-8 BOM and normalizes CRLF to LF before parsing.
- Returns
front_matterwith a trailing newline for non-empty frontmatter. front_matteris""for empty frontmatter (---\n---).bodyhas leading newlines stripped.
LinkedMarkdownError
Thrown for all error conditions. Has a .code property:
| Code | When |
|---|---|
LMD_NO_FRONTMATTER |
No frontmatter delimiters found |
LMD_INVALID_FRONTMATTER |
Unknown marker, unparseable content, non-object attrs, or no closing delimiter |
try:
extract(markdown)
except LinkedMarkdownError as e:
if e.code == LMD_NO_FRONTMATTER:
...
Development
git submodule update --init --recursive
uv sync
uv run pytest
Metadata
Release files for linked-markdown 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 | Actions |
|---|---|---|---|---|
| linked_markdown-0.1.0.tar.gz | 2.9 kB | With provenance | Details for linked_markdown-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| linked_markdown-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for linked_markdown-0.1.0-py3-none-any.whl |
Total release size: 7.1 kB
Release files / linked_markdown-0.1.0.tar.gz
| Download URL | linked_markdown-0.1.0.tar.gz |
|---|---|
| Size | 2.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
53d866230794c0be468fb287fcad9f606c01fd6f881249f80f8da14aeff56f97
|
|
BLAKE2b-256 checksum How to use checksums |
18f0551b8c0642d17ba9921442d47161d4936a1614cc6be8372241e717404089
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
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 Jul 6, 2026.
Transparency logRelease files / linked_markdown-0.1.0-py3-none-any.whl
| Download URL | linked_markdown-0.1.0-py3-none-any.whl |
|---|---|
| Size | 4.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
b0c7464038ffa61b92dbbf4e1e27bced18c39cd68e05611ed6dfa57b9cbebeb8
|
|
BLAKE2b-256 checksum How to use checksums |
7a72d98295f3b056916aa0b7e4cae474e3945835fa6cc87c164fffcbf24f5f9c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
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 Jul 6, 2026.
Transparency logSecurity for linked-markdown 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.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for linked_markdown-0.1.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 Jul 6, 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.