Next: , Previous: , Up: Top   [Contents]


6 The python library

Chess Arbiter Tools offers a python library which programmers can use in other programs. It provides the class “Tournament”, with the following properties and methods:

6.1 Creating an instance of the class

You can create an instance of the class Tournament easily: mytournament = arbitools.Tournament()

6.2 Properties

info This dictionary encapsulates important information about the tournament:

  1. TOURNAMENT_NAME
  2. CITY
  3. FED
  4. BEGIN_DATE
  5. END_DATE
  6. ARBITER
  7. DEPUTY
  8. NUMBER_OF_ROUNDS
  9. CURRENT_ROUND
  10. NUMBER_OR_PLAYERS

players data List of dictionaries with the data of the players.

  1. NAME: Surname, Name
  2. G: Sex: “m” or “f”
  3. IDFIDE
  4. ELOFIDE
  5. COUNTRY
  6. TITLE
  7. ELONAT
  8. KFIDE
  9. CLUB
  10. BIRTHDAY
  11. KNAT
  12. IDNAT

6.3 Methods

output_to_file(inputfile) It takes one argument, the name of the file to output the information.

export_to_file(inputfile) This method creates a file with the official Krause FIDE format and fill it with the tournament info and the players data.

applyARPO(inputfile) It applies the tiebreaks created by Julio Gonzalez and Jose Carlos Diaz. It outputs the results to a file with the “_ARPO.csv” suffix.