python-frontmatter
Parse and manage posts with YAML (or other) frontmatter
Decision gist · record as of 2026-08-14
Yes. Low install friction, no security vulnerabilities, MIT license, active maintenance, and a single stable dependency make this a safe choice. Install it if you work with front-matter-delimited documents (Jekyll posts, static site content, or similar). Skip it only if your workflow doesn't involve parsing metadata-prefixed text files.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Low friction: pure Python wheel with a single runtime dependency (pyyaml).
- Active maintenance with a recent release (86 days ago) and 427 repository stars.
License · maintenance · safety
MIT (permissive) — MIT license permits unrestricted use, modification, and distribution with only attribution required—no restrictions on commercial or proprietary use.
last release 2026-05-20 (86 days) · last repo commit 2026-05-20 · 427 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 19,580,081 downloads/mo, #1,060 on PyPI
Alternatives
Verify before relying
import frontmatter
post = frontmatter.load('document.txt')
print(post['title']) # access metadata
print(post.content) # access body content
# Or parse from text:
metadata, content = frontmatter.parse(text)- Whether JSON, TOML, and other front matter formats are equally well-supported or if YAML is the primary use case
- Performance characteristics when processing large files or batch operations
What it is and what it does
Python Frontmatter is a lightweight parser for documents that combine structured metadata (front matter) with body content, separated by delimiters. It reads files or text containing YAML (or other format) metadata blocks followed by content, and exposes them as separate, easily accessible objects—metadata as a dictionary and content as a string. The package handles common workflows: loading from files or file-like objects, parsing raw text, accessing metadata fields as dictionary keys, modifying metadata, and writing the combined document back to text or file format.
It's built for static site generators, documentation systems, and any workflow where you need to attach structured metadata to plain-text documents. The single runtime dependency is pyyaml, and it supports Python 3.10 and later. The package is actively maintained and has been stable since its early releases.
Use it for
- Parse Jekyll or Hugo blog posts that use YAML front matter for metadata like title, date, and tags
- Extract and modify document metadata in static site generators or documentation pipelines
- Build content management workflows where metadata and body are stored together in plain text
- Process Markdown files with structured headers for automation or indexing
- Strip and rewrite front matter in batch document transformations
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes.
Low install friction, no security vulnerabilities, MIT license, active maintenance, and a single stable dependency make this a safe choice. Install it if you work with front-matter-delimited documents (Jekyll posts, static site content, or similar). Skip it only if your workflow doesn't involve parsing metadata-prefixed text files.
Install
python-frontmatter on PyPI
Before you install
Low friction: pure Python wheel with a single runtime dependency (pyyaml). Active maintenance with a recent release (86 days ago) and 427 repository stars.
License in practice
MIT license permits unrestricted use, modification, and distribution with only attribution required—no restrictions on commercial or proprietary use.
Quickstart
import frontmatter
post = frontmatter.load('document.txt')
print(post['title']) # access metadata
print(post.content) # access body content
# Or parse from text:
metadata, content = frontmatter.parse(text)
Verify before relying
- Whether JSON, TOML, and other front matter formats are equally well-supported or if YAML is the primary use case
- Performance characteristics when processing large files or batch operations
Package facts
| License | MIT permissive |
| Python support | Supports the current Python release >=3.10 |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | 1 packagepyyaml |
| Maintenance | Actively maintained 86 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 19,580,081 / month, #1,060 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | Development Status :: 5 - Production/StableIntended Audience :: DevelopersNatural Language :: EnglishProgramming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13 |
Evidence: python_frontmatter-1.3.0-py3-none-any.whl
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “yaml frontmatter parser”
- python-frontmatterParses and manages text files with YAML (or JSON, TOML) front matter,…
- mdformat-frontmattermdformat-frontmatter is an mdformat plugin that preserves YAML front…
- myst-parserMyST-Parser extends CommonMark-compliant Markdown with syntax for…
Give your agent the search over MCP, or paste the wish link into any chat.
More Markup packages
PyYAML parses and emits YAML 1.1 data format, enabling serialization and deserialization of configuration files and Python objects to and from human-readable YAML text.
A Python markdown parser that converts markdown to HTML following the CommonMark specification, with support for plugins and custom syntax rules.
Install it if you need reliable markdown-to-HTML conversion.
Beautiful Soup parses HTML and XML documents into a navigable tree, providing Pythonic methods to search, iterate, and modify the parsed content.
Install it if you need to parse or extract data from markup documents.
et_xmlfile writes large XML files with minimal memory overhead by serializing elements to disk as they are created, rather than holding the entire tree in memory.
Install it if incremental XML writing fits your use case; skip it if your XML documents are small or you already use lxml.
Parses and edits TOML files while preserving formatting, comments, and structure, then serializes them back with layout intact.
Install it if you're building tools that touch TOML files and user readability of the source matters.
Parses Python docstrings in ReST, Google, Numpydoc, and Epydoc formats, extracting structured information like descriptions, parameters, return types, and exceptions.
Install it if you need to programmatically read and extract structured data from Python docstrings.
See also mdformat-front-matters · mdformat-frontmatter · parse-errors · pytoml · f90nml · yaml-rs · tree-sitter-yaml · yte · whatthepatch · pyyml