ReportSection

Documentation for eth_defi.vault_report.sections.ReportSection Python class.

class ReportSection

Bases: object

One ranked vault table in the report.

Built by eth_defi.vault_report.report.build_report_sections(), rendered to HTML by render_section_table() and written to the bundle’s tables/*.csv.

Attributes summary

vaults_df

Vaults in display order, rows from eth_defi.vault_report.data.VaultReportData.vaults_df, already truncated to the table length

columns

Table columns, see VAULT_TABLE_COLUMNS

numbered

Show a 1, 2, 3.

sparkline_ids

Vault ids with a published sparkline image, see eth_defi.vault_report.data.fetch_available_sparklines().

Methods summary

__init__(vaults_df[, columns, numbered, ...])

vaults_df: pandas.DataFrame

Vaults in display order, rows from eth_defi.vault_report.data.VaultReportData.vaults_df, already truncated to the table length

columns: list[str]

Table columns, see VAULT_TABLE_COLUMNS

numbered: bool

Show a 1, 2, 3… rank column

sparkline_ids: frozenset[str]

Vault ids with a published sparkline image, see eth_defi.vault_report.data.fetch_available_sparklines(). Filled in after the tables are selected, so only their vaults are probed; other vaults get an empty “3M history” cell instead of a broken image.

__init__(vaults_df, columns=<factory>, numbered=True, sparkline_ids=frozenset({}))
Parameters
Return type

None