Client

class alliancepy.client.Client(api_key: str, application_name: str = None)

Bases: object

This is the main client class used for accessing the TOA API. Currently, it only serves up Team objects but it will expand over time.

Parameters
  • api_key (str) – Your TOA API key. This is required, otherwise you will not be able to access the database.

  • application_name (str) – The name of your application. It can just be the name of your script. Defaults to sys.argv[0]

team(team_number: int)

Create a Team object.

Parameters

team_number (int) – A valid First Tech Challenge team number.

Returns

The Team object.

Return type

Team

property api_version

The version of the API that is currently in use.

Return type

int

clear_cache()

Clears the cache. This is useful for long-running applications when the cache gets too big.