Room specific classes API

Pokerstars player notes

class poker.room.pokerstars.Notes(notes: str)[source]

Class for parsing pokerstars XML notes.

get_note(player)[source]

Return _Note tuple for the player.

Raises:poker.room.pokerstars.NoteNotFoundError
add_note(player, text, label=None, update=None)[source]

Add a note to the xml. If update param is None, it will be the current time.

Raises:poker.room.pokerstars.LabelNotFoundError – if there is no such label name
del_note(player)[source]

Delete a note by player name.

Raises:poker.room.pokerstars.NoteNotFoundError
add_label(name, color)[source]

Add a new label. It’s id will automatically be calculated.

append_note(player, text)[source]

Append text to an already existing note.

del_label(name)[source]

Delete a label by name.

classmethod from_file(filename)[source]

Make an instance from a XML file.

get_label(name)[source]

Find the label by name.

get_note_text(player)[source]

Return note text for the player.

label_names

Tuple of label names.

labels

Tuple of labels.

notes

Tuple of notes..

players

Tuple of player names.

prepend_note(player, text)[source]

Prepend text to an already existing note.

replace_note(player, text)[source]

Replace note text with text. (Overwrites previous note!)

save(filename)[source]

Save the note XML to a file.

class poker.room.pokerstars._Label(id, color, name)[source]

Labels in Player notes.

Variables:
  • id (str) – numeric id for the label. None when no label (‘-1’ in XML)
  • color (str) – color code for note
  • name (str) – name of the note
class poker.room.pokerstars._Note(player, label, update, text)[source]

Player note.

Variables:
  • player (str) – player name
  • label (str) – Label name of note
  • update (datetime.datetime) – when was the note last updated
  • text (str) – Note text
exception poker.room.pokerstars.NoteNotFoundError[source]

Note not found for player.

exception poker.room.pokerstars.LabelNotFoundError[source]

Label not found in the player notes.