pyCHPP¶
pyCHPP is an object-oriented Python framework for the Hattrick CHPP API.
It provides:
- a
CHPPclient class with onexml_*()method per CHPP XML file (e.g.xml_arena_details()fetchesarenadetails.xml), - high-level custom models (
HTTeam,HTPlayer,HTMatch, ...) that allow navigating between objects (e.g.team.players()).
Quick start¶
from pychpp import CHPP
chpp = CHPP(consumer_key, consumer_secret, access_token_key, access_token_secret)
user = chpp.user() # the authenticated user
team = chpp.team() # the user's primary team
players = chpp.xml_players(team_id=team.team_id)