PostContext

Documentation for eth_defi.vault_report.post.PostContext Python class.

class PostContext

Bases: object

Everything needed to render the post body.

Built by eth_defi.vault_report.report.generate_monthly_vault_report() with bundle-relative image paths, and copied by eth_defi.vault_report.report.publish_report_draft() with the uploaded Ghost image URLs. Only charts and podcast_images differ between the two.

Attributes summary

month_label

E.g.

stats

Summary statistics bullet points for the report content updates section, plain text

tables

Section key -> rendered HTML table, see eth_defi.vault_report.sections.render_section_table(), which escapes the vault data.

charts

Chart key -> image URL or relative path.

criteria_notes

Section or chart key -> bullet points describing the selection criteria; only what the chart and table do not show

previous

Previous report post with its HTML body, from the Ghost Content API, if found.

podcasts

Latest podcast episodes, newest first; the section is left out when empty

podcast_images

Podcast guest logos and service icons -> image URL or relative path, see eth_defi.vault_report.podcasts.render_podcast_episodes()

Methods summary

__init__(month_label, stats, tables, charts, ...)

month_label: str

E.g. September 2026

stats: list[str]

Summary statistics bullet points for the report content updates section, plain text

tables: dict[str, str]

Section key -> rendered HTML table, see eth_defi.vault_report.sections.render_section_table(), which escapes the vault data. Sections without vaults are absent.

charts: dict[str, str]

Chart key -> image URL or relative path. Charts that were not rendered are absent.

criteria_notes: dict[str, list[str]]

Section or chart key -> bullet points describing the selection criteria; only what the chart and table do not show

previous: Optional[eth_defi.vault_report.ghost.GhostPost]

Previous report post with its HTML body, from the Ghost Content API, if found. Source of the evergreen sections and of the “previous report” link.

podcasts: list[eth_defi.vault_report.podcasts.PodcastEpisode]

Latest podcast episodes, newest first; the section is left out when empty

podcast_images: dict[str, str]

Podcast guest logos and service icons -> image URL or relative path, see eth_defi.vault_report.podcasts.render_podcast_episodes()

__init__(month_label, stats, tables, charts, criteria_notes, previous=None, podcasts=<factory>, podcast_images=<factory>)
Parameters
Return type

None