Study API

class flashcards_core.study.Study(session: sqlalchemy.orm.session.Session, deck: flashcards_core.database.models.decks.Deck)

Bases: object

Creates a study session by initializing a scheduler to provide the cards to study and process them once studied.

This is more of a convenience class than an API, as all schedulers should be stateless.

next(studied_card: Optional[flashcards_core.database.models.cards.Card] = None, result: Optional[Any] = None) flashcards_core.database.models.cards.Card

Saves the results of a test and returns the next card to be studied.

Parameters
  • studied_card – Card reviewed. Cano be None if the session just started.

  • result – the result of the review. Type depends on the algorithm.

Returns

the next Card to study