common_reports.schemas.builders.results
Builder operation outputs — what a render produces. Frozen value objects.
The format/styling CONFIG lives in contracts/builders/formats.py (decision (b));
this module is purely the RESULTS of a render. schemas/ may import contracts/
(TocEntry is a contract — re-exported here for convenience), never the reverse.
Classes
EmailPayload
A ready-to-send email — the composer output. multipart/mixed [G12].
__init__
def __init__(subject: str, html_body: str, recipients: tuple[str, ...] = (), attachments: tuple[Path, ...] = (), multipart_subtype: str = 'mixed') -> NoneFields and properties declared here; inherited members belong to the bases above.
attachments
attachments: tuple[Path, ...] = ()html_body
html_body: strmultipart_subtype
multipart_subtype: str = 'mixed'recipients
recipients: tuple[str, ...] = ()subject
subject: strFigureAsset
A rendered figure in its target forms. Order = (interactive, static, url) [G16].
__init__
def __init__(interactive_html: str = '', static_png: str = '', hosted_url: str | None = None) -> NoneFields and properties declared here; inherited members belong to the bases above.
hosted_url
hosted_url: str | None = Noneinteractive_html
interactive_html: str = ''static_png
static_png: str = ''GhostPost
A Ghost Admin post payload (Mobiledoc single HTML-card).
__init__
def __init__(title: str, mobiledoc: str, status: str = 'draft', tags: tuple[str, ...] = (), visibility: str = 'public', authors: tuple[Mapping[str, str], ...] = _ORIGIN_AUTHORS) -> NoneFields and properties declared here; inherited members belong to the bases above.
authors
authors: tuple[Mapping[str, str], ...] = _ORIGIN_AUTHORSmobiledoc
mobiledoc: strstatus
status: str = 'draft'tags
tags: tuple[str, ...] = ()title
title: strvisibility
visibility: str = 'public'mobiledoc_for
@staticmethoddef mobiledoc_for(html: str) -> strEXACT Mobiledoc html-card payload (verified: ghost.py generate_post).
RenderResult
The output of a render — the HTML plus an asset manifest.
attachments holds the inline image parts an email render referenced as
cid: (EmailRenderer(images="cid")); send them with the HTML:
client.send(to, subject, html=result.html, attachments=result.attachments).
__init__
def __init__(html: str, assets: tuple[FigureAsset, ...] = (), manifest: Mapping[str, Any] = dict(), attachments: tuple[Attachment, ...] = ()) -> NoneFields and properties declared here; inherited members belong to the bases above.
assets
assets: tuple[FigureAsset, ...] = ()attachments
attachments: tuple[Attachment, ...] = ()html
html: strmanifest
manifest: Mapping[str, Any] = field(default_factory=dict)save
def save(path: str | Path) -> Path