get()
Returns the portfolio with the given ID, or None when no such portfolio exists.
The server API offers no job that reads exactly one portfolio. get() is therefore a
search() with portfolio_id and a single return value.
|
1. Signature
-
Sync
-
Async
ecm.portfolio.get(portfolio_id: int) -> ECMPortfolio | None
await ecm.portfolio.get(portfolio_id: int) -> ECMPortfolio | None
4. Example
portfolio = ecm.portfolio.get(42)
if portfolio is None:
print("portfolio does not exist")
else:
for obj in portfolio.objects:
print(obj.id, obj.type_id)
5. Related pages
-
search() — several portfolios by criteria