Web & Protocols · zero-dependency · MIT

larzsitemap

Grow a sitemap.xml the way a real site actually does.

Parses what's already listed, adds only the genuinely new URLs, leaves everything else untouched - ported from a real production job that adds newly-published pages to a live sitemap.xml. Pairs with indexnow: add a URL to the sitemap, then indexnow.submit_urls() it.

larzscript pkg install sitemap
View on GitHub →Learn the stack

What you get

Try it

import "sitemap" as sitemap
let xml_text = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<urlset xmlns=\"http://www.sitemaps.org/schemas/sitemap/0.9\">\n  <url><loc>https://example.com/</loc></url>\n</urlset>\n"
let result = sitemap.add_urls(xml_text, ["https://example.com/", "https://example.com/blog/new-post/"], {"changefreq": "monthly", "priority": "0.7"})
print("added:", result["added"])
Output
added: [https://example.com/blog/new-post/]

Why it's in the Larz Stack

larzsitemap is a real Larzscript package (larzscript pkg install sitemap) - money-native, zero dependencies, the same language as the rest of the estate, not a separate Python runtime. It composes with the rest of the Larz Stack and the Larz framework.