Page#

Page

Page representation

class mlflow_rest_client.page.Page(items=None, next_page_token=None)#

Page representation

Parameters
itemsIterable, optional

Page items

next_page_tokenstr, optional

Next page token

Examples

model = Page(items=[Model(name="some_model")])

model = Page(items=[Model(name="some_model")], next_page_token="some_token")
Attributes
itemsIterable

Page items

next_page_tokenstr

Next page token

property has_next_page#

Checks whether this page is last or not

Returns
has_next_page: bool

True if there is a next page, False if page is last one

classmethod make(inp, items_key='items', item_class=None, **kwargs)#

Generate objects from REST API response

Parameters
inplist or dict

Page items

items_keystr, optional

Key name for fetching items from dict input

item_classclass, optional

Item class to be called

Should implement from_list or make methods, otherwise constructor will be used

**kwargsdict, optional

Additional params for item constructor

Returns
pageobj:Page of item_class

Page of items

Examples

model = Page.make([Model(name="some_model")])

model = Page.make([ModelVersion(name="some_model", version=1)], name="another_model")