Skip to main content

class Projects

service_api: 'ServiceApi',
entity: 'str',
per_page: 'int' = 50

Description

An lazy iterator of Project objects. An iterable interface to access projects created and saved by the entity.

Args

  • service_api: The service API used to query W&B.
  • entity: The entity which owns the projects.
  • per_page: The number of projects to fetch per request to the API.

Examples

from wandb.apis.public.api import Api

# Find projects that belong to this entity
projects = Api().projects(entity="entity")

# Iterate over files
for project in projects:
    print(f"Project: {project.name}")
    print(f"- URL: {project.url}")
    print(f"- Created at: {project.created_at}")
    print(f"- Is benchmark: {project.is_benchmark}")

Methods

method convert_objects

self
Convert the last fetched response data into the iterated objects.

method next

self
Return the next item from the iterator. When exhausted, raise StopIteration

method update_variables

self
Update the query variables for the next page fetch.