Skip to content

Get teams

To list the teams that the user has access to use the get_teams method:

1
2
3
4
5
6
7
8
9
from pyholdsport import Holdsport, HoldsportTeam

with Holdsport(
    holdsport_username="username",
    holdsport_password="password",
) as holdsport:
    teams: list[HoldsportTeam] = holdsport.get_teams()
    for team in teams:
        print(team)

Learn more about the HoldsportTeam object.