extract_first_sentence

Documentation for eth_defi.erc_4626.vault_protocol.accountable.offchain_metadata.extract_first_sentence function.

extract_first_sentence(text)

Extract a listing-friendly first sentence from a vault strategy.

Accountable’s API provides only a full vault_strategy field. Its company_info field describes the manager, rather than the individual vault, so it must not be used for the vault listing summary.

Parameters

text (Optional[str]) – Full strategy description supplied by Accountable, or None.

Returns

The first sentence when a sentence boundary exists, otherwise the stripped complete text.

Return type

Optional[str]