fsrs
Free Spaced Repetition Scheduler
What it is and what it does
Py-FSRS is a Python implementation of the Free Spaced Repetition Scheduler algorithm, which calculates when to review flashcards or study materials to maximize long-term retention. It models memory decay and uses a set of 21 tunable parameters to predict the optimal time to show each card again—balancing review frequency against forgetting probability. The package provides core classes (Scheduler, Card, Rating, ReviewLog) for building custom spaced repetition systems, with JSON serialization for persistence and network use.
The scheduler tracks three card states (Learning, Review, Relearning) and four rating levels (Again, Hard, Good, Easy), adjusting intervals based on your desired retention rate (default 90%). It supports customizable learning steps, relearning intervals for lapsed cards, and optional parameter optimization if you have historical review logs. All timestamps use UTC, and the package includes retrievability calculation to estimate the current probability of recalling a card.
Use it for:
- Build a custom flashcard app or study tool that automatically schedules reviews based on memory science rather than fixed intervals.
- Optimize FSRS parameters for your own review history to improve scheduling accuracy for future study sessions.
- Integrate spaced repetition scheduling into language learning, exam prep, or professional certification platforms.
- Reschedule existing cards after parameter optimization to apply improved scheduling to your current deck.
- Calculate and monitor card retrievability (recall probability) to decide when to prioritize urgent reviews.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Implements the Free Spaced Repetition Scheduler algorithm to calculate optimal review intervals for flashcards and study materials based on memory retention science.
Yes. The package is actively maintained, has low install friction, carries a permissive MIT license, and solves a well-defined problem (spaced repetition scheduling) with a proven algorithm. It's suitable for anyone building a study or flashcard system. Install it if you need scheduling logic; skip it if you're using a pre-built flashcard app.
Install
fsrs on PyPI
pip
pip install fsrsuv
uv add fsrspoetry
poetry add fsrsInstalling fsrs
Before you install
Low friction install with a single lightweight runtime dependency (typing-extensions). Active maintenance with a recent release (5 days old) and steady repository activity.
License in practice
MIT License permits free use, modification, and distribution with minimal restrictions—suitable for commercial and open-source projects alike.
Quickstart
pip install fsrs
from fsrs import Scheduler, Card, Rating
scheduler = Scheduler()
card = Card()
card, review_log = scheduler.review_card(card, Rating.Good)
print(f"Next review due: {card.due}")
Requires Python 3.10 or later.
Verify before relying
- Whether the optimizer extra (fsrs[optimizer]) adds significant dependencies or install friction beyond the base package.
- Performance characteristics when scheduling large numbers of cards or handling high-frequency review operations.
- How closely the computed optimal parameters match real-world study outcomes compared to other SRS implementations.
Package facts
| License | MIT License Copyright (c) 2022 Open Spaced Repetition Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the… (full text in the JSON record) (permissive) |
| Python support | supports the current Python release (>=3.10) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 1 — typing-extensions |
| Maintenance | actively maintained — 5 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 129,257/month — #11,677 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: fsrs-6.3.2-py3-none-any.whl
Keywords: spaced-repetition, flashcard
Tags
More Scientific/Engineering packages
NumPy provides an N-dimensional array object…
permissive · top 100 on PyPI
pandaspandas provides fast, flexible data structures…
permissive · top 100 on PyPI
scipyscipy provides numerical algorithms for…
permissive · top 100 on PyPI
scikit-learnscikit-learn provides a comprehensive Python…
permissive · top 1,000 on PyPI
dilldill extends Python's pickle module to…
permissive · top 1,000 on PyPI
multiprocessMultiprocess is an enhanced fork of Python's…
permissive · top 1,000 on PyPI
ankiProvides Python access to Anki's core…
agpl · top 15,000 on PyPI
rq-schedulerAdds job scheduling capabilities to RQ (Redis…
permissive · top 15,000 on PyPI
genankiGenerates Anki flashcard decks programmatically…
permissive · top 15,000 on PyPI
schedulerAn in-process job scheduler for Python that…
copyleft · top 15,000 on PyPI
schedulefreeProvides schedule-free optimizers for PyTorch…
permissive · top 15,000 on PyPI
scheduleSchedule provides a human-friendly API for…
permissive · top 5,000 on PyPI
APSchedulerAPScheduler lets you schedule Python code to…
permissive · top 1,000 on PyPI
Flask-APSchedulerFlask-APScheduler integrates APScheduler with…
permissive · top 15,000 on PyPI
aqtaqt is the Qt-based desktop GUI for Anki, the…
agpl · top 15,000 on PyPI
cron-validatorValidates Unix cron expressions, matches them…
permissive · top 5,000 on PyPI