Skip to content

docs: complete README usage example (lists, PyAttachment attributes)#86

Merged
kurok merged 1 commit into
masterfrom
fix-issue-52-readme-example
Jun 12, 2026
Merged

docs: complete README usage example (lists, PyAttachment attributes)#86
kurok merged 1 commit into
masterfrom
fix-issue-52-readme-example

Conversation

@kurok

@kurok kurok commented Jun 12, 2026

Copy link
Copy Markdown
Contributor

What

Fleshes out the README usage example to demonstrate the full public API accurately.

  • Parse from bytes (opening the file in binary mode), with parse_email wrapped in try/except ParseError.
  • Access subject, date, and iterate headers (a dict[str, str]).
  • Iterate text_plain and text_html (both are list[str]).
  • Iterate attachments, showing each PyAttachment's filename, mimetype, and content (bytes).
  • Adds a short attribute reference table for PyMail and PyAttachment.

All attributes are verified against fast_mail_parser/__init__.pyi. The example was run against a freshly built module (maturin develop) and executes without error.

Docs only — no changes to src/, tests, or config.

Closes #52

…butes

Closes #52

Signed-off-by: yuriyryabikov <22548029+kurok@users.noreply.github.com>
@kurok kurok merged commit ae094d7 into master Jun 12, 2026
7 checks passed
@kurok kurok deleted the fix-issue-52-readme-example branch June 12, 2026 21:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Complete the README usage example (lists, PyAttachment attributes)

1 participant