bayesline.api.equity.PortfolioOrganizerSettingsMenu#
- pydantic model bayesline.api.equity.PortfolioOrganizerSettingsMenu#
Menu for portfolio organizer settings.
This class provides a menu interface for managing portfolio organizer settings and available portfolio sources.
Show JSON schema
{ "title": "PortfolioOrganizerSettingsMenu", "description": "Menu for portfolio organizer settings.\n\nThis class provides a menu interface for managing portfolio organizer settings\nand available portfolio sources.", "type": "object", "properties": { "sources": { "additionalProperties": { "items": { "type": "string" }, "type": "array" }, "description": "Mapping of sources to the available portfolio IDs for that source.", "title": "Sources", "type": "object" } }, "additionalProperties": false, "required": [ "sources" ] }
- Config:
frozen: bool = True
extra: str = forbid
- Fields:
sources (dict[str, list[str]])
-
field sources:
dict[str,list[str]] [Required]# Mapping of sources to the available portfolio IDs for that source.
- map_references(fn: Callable[[str | int], str | int]) → Self#
Return a copy with every reference-list entry rewritten by
fn.The menu-side counterpart of
Settings.map_references(). A menu enumerates the settings/datasets/sources a user may reference; this appliesfnto those enumerated references (leaving plain system-data fields untouched) so a caller can translate a menu between reference namespaces. The base implementation has no reference fields and returnsselfunchanged; menus that carry reference lists override it.Parameters#
- fnCallable[[str | int], str | int]
Applied to each enumerated reference. Must preserve a reference’s kind (a name stays a name, an id stays an id).
Returns#
- Self
A copy with reference-list entries rewritten.