Metadata-Version: 2.4
Name: minimindslab-yaml-front-matter
Version: 0.1.0
Summary: Parse and emit simple YAML front matter blocks in plain text files, returning the extracted metadata and body without requiring PyYAML.
Author: MiniMindsLab
License: MIT
Requires-Python: >=3.11
Description-Content-Type: text/markdown
License-File: LICENSE
Dynamic: license-file

# MiniMindsLab YAML Front Matter

A tiny, dependency-free Python library for parsing and emitting simple YAML front matter blocks in text content.

## Features

- Parses front matter only when text begins with a delimiter line exactly equal to `---`.
- Supports simple scalar metadata values (`string`, `int`, `float`, `bool`, `null`).
- Preserves content by returning original text as body when front matter is absent or malformed.
- Emits deterministic output with sorted metadata keys.
- Pure standard library, Python 3.11+.

## Example

```python
from minimindslab_yaml_front_matter import parse_front_matter, emit_front_matter

text = """---
title: Hello
draft: false
count: 3
---
Body text\n"""

result = parse_front_matter(text)
print(result.metadata)  # {'title': 'Hello', 'draft': False, 'count': 3}
print(result.body)      # 'Body text\n'

rendered = emit_front_matter(result.metadata, result.body)
print(rendered)
```
