larzmark
Markdown → HTML, and an SEO-first static site generator. Zero dependencies.
Turn a Markdown string into clean HTML, or turn a folder of Markdown files into a
complete static website — every page wrapped with a full set of SEO tags (title,
description, canonical, Open Graph, Twitter, JSON-LD) and a sitemap.xml, out of
the box.
import larzmark
# one string
larzmark.render("# Hello\n\nSome **bold** text.") # -> "<h1 id=...>Hello</h1>..."
# a whole site
larzmark.build_site("content/", "public/",
base_url="https://example.com",
site_name="My Site")
Why
- Zero dependencies. Pure standard library — no
markdown, nojinja2, no build toolchain. One import, and it runs anywhere Python does. - SEO is the default, not an add-on. Every generated page ships with the meta tags search engines and social cards actually read, plus JSON-LD structured data and a sitemap — driven straight from front matter.
- Real Markdown. Headings (with anchor ids), emphasis, code spans and fenced blocks, links, images, blockquotes, nested ordered/unordered lists, horizontal rules, and GFM pipe tables.
- Safe output. Text is HTML-escaped and URLs are sanitised, so untrusted
Markdown can't inject tags or break out of an
href. - Composable. Pair it with larzchart to embed inline SVG charts, or generate pages from data in larzdb.
Install
pip install larzmark
Front matter drives the SEO
---
title: My Post
description: A short, search-friendly summary.
type: article
date: 2026-07-26
author: Ada Lovelace
image: https://example.com/cover.png
---
# My Post
The first paragraph becomes the meta description if you don't set one.
build_site reads that and emits:
<title>My Post</title>
<meta name="description" content="A short, search-friendly summary.">
<link rel="canonical" href="https://example.com/blog/my-post.html">
<meta property="og:title" content="My Post">
<meta property="og:type" content="article">
<meta name="twitter:card" content="summary_large_image">
<script type="application/ld+json">{"@context":"https://schema.org","@type":"Article",...}</script>
API
render(md) |
Markdown string → HTML fragment |
parse_front_matter(text) |
(meta_dict, body) |
Document.parse(text) |
parsed doc with .title, .description, .html, .meta |
seo_head(title, description, canonical=, image=, ...) |
just the <head> SEO tags |
render_page(doc, canonical=, template=) |
one full HTML page |
build_site(src, out, base_url=, site_name=, template=) |
build a whole site + sitemap |
Bring your own template (a str.format string with {head}, {content},
{lang}) or use the built-in responsive, dark-mode-aware default.
Supported Markdown
Headings #–###### · bold · italic · code · fenced code blocks with
language classes · links · · > blockquotes · nested
-/1.
lists · --- rules · GFM pipe tables (with :--: alignment) ·
strikethrough · <https://autolinks>.
It's a practical, readable subset — the Markdown people actually write for docs, blogs, and READMEs — not a spec-exhaustive parser.
Tests
python -m unittest discover -s tests -v # 31 tests, zero deps
The Larz stack
Pure-Python, zero-dependency building blocks:
- larz — money-native web framework
- larzchain — from-scratch PoW blockchain
- larzmoney — exact, penny-perfect money
- larzcrypt — pure-Python cryptography toolkit
- larzdb — crash-safe embedded database
- larzagent — zero-dep AI agent framework
- larzchart — data to inline SVG charts
- larzmark — this library
License
MIT © larz-scripter
Metadata
Release files for larzmark 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 | |
|---|---|---|---|---|
| larzmark-0.1.0.tar.gz | 14.1 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| larzmark-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 26.2 kB
Release files / larzmark-0.1.0.tar.gz
| Download URL | larzmark-0.1.0.tar.gz |
|---|---|
| Size | 14.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
4941acb6f4e3868a99a4cd961948fd68e20a87e1da46f857a4da9bd500b0ef25
|
|
BLAKE2b-256 checksum How to use checksums |
f39a8be172eb1fd583efcaa9487f323e9dc2f3c9b0a8254d87be4d78f2a5e3d2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.13
|
Release files / larzmark-0.1.0-py3-none-any.whl
| Download URL | larzmark-0.1.0-py3-none-any.whl |
|---|---|
| Size | 12.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
b54b2be6bc77a992bffddc757f22767e3cc9e3e416424163534cdbf82a9b3f6a
|
|
BLAKE2b-256 checksum How to use checksums |
5ae2edc661f7572ca2c93e28e79e19caa9d3befed08ff9102d04a1aa6cca0108
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.13
|
Security for larzmark 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.
To learn more about protecting yourself from malicious actors, visit our package security documentation.