Free Spaced Repetition Scheduler
Project description
About The Project
Py-fsrs is a Python Package implements Free Spaced Repetition Scheduler algorithm. It helps developers apply FSRS in their flashcard apps.
Getting Started
pip install fsrs
Usage
Create a card and review it at a given time:
from fsrs import *
f = FSRS()
card = Card()
now = datetime(2022, 11, 29, 12, 30, 0, 0)
scheduling_cards = f.repeat(card, now)
There are four ratings:
Rating.Again # forget; incorrect response
Rating.Hard # recall; correct response recalled with serious difficulty
Rating.Good # recall; correct response after a hesitation
Rating.Easy # recall; perfect response
Get the new state of card for each rating:
scheduling_cards[Rating.Again].card
scheduling_cards[Rating.Hard].card
scheduling_cards[Rating.Good].card
scheduling_cards[Rating.Easy].card
Get the scheduled days for each rating:
card_again.scheduled_days
card_hard.scheduled_days
card_good.scheduled_days
card_easy.scheduled_days
Update the card after rating Good:
card = scheduling_cards[Rating.Good].card
Get the review log after rating Good:
review_log = scheduling_cards[Rating.Good].review_log
Get the due date for card:
due = card.due
There are four states:
State.New # Never been studied
State.Learning # Been studied for the first time recently
State.Review # Graduate from learning state
State.Relearning # Forgotten in review state
License
Distributed under the MIT License. See LICENSE for more information.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file fsrs-1.2.0.tar.gz.
File metadata
- Download URL: fsrs-1.2.0.tar.gz
- Upload date:
- Size: 6.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.18
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c20be4ff885b421acfb5c588ec6d446385cfb3bc8c3d571724a2569212618f43
|
|
| MD5 |
bae1c2fc1bab2133ca0a41474b6e0d6a
|
|
| BLAKE2b-256 |
39ce3764e3ed9f7c8f04745b180b7e262d7e8fb4a96e0511c8dd710c4708c306
|
File details
Details for the file fsrs-1.2.0-py3-none-any.whl.
File metadata
- Download URL: fsrs-1.2.0-py3-none-any.whl
- Upload date:
- Size: 6.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.18
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
43b0c7c4beb495af8e9f99060476b05fd006437e70d2c9e84e2bd5dfaf4259a7
|
|
| MD5 |
be1a50f254a2140ff11cf0961986ee34
|
|
| BLAKE2b-256 |
09373c4598ab9c51007b38f1dc5440b30b5791ea4dba0083ec56be189ec93aee
|