{"id":15167101,"url":"https://github.com/vlopezferrando/simple-spaced-repetition","last_synced_at":"2025-06-12T11:04:47.359Z","repository":{"id":216147089,"uuid":"740582571","full_name":"vlopezferrando/simple-spaced-repetition","owner":"vlopezferrando","description":"Simple spaced repetition scheduler based on the classic Anki algorithm.","archived":false,"fork":false,"pushed_at":"2024-10-02T07:28:31.000Z","size":19,"stargazers_count":46,"open_issues_count":1,"forks_count":5,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-06-07T03:18:37.836Z","etag":null,"topics":["anki","python","spaced-repetition","spaced-repetition-algorithm"],"latest_commit_sha":null,"homepage":"https://python.cards","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/vlopezferrando.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-01-08T16:31:35.000Z","updated_at":"2025-05-10T10:19:07.000Z","dependencies_parsed_at":"2025-02-18T06:00:36.290Z","dependency_job_id":"076aece4-962d-4c2e-b219-eb781824de20","html_url":"https://github.com/vlopezferrando/simple-spaced-repetition","commit_stats":null,"previous_names":["vlopezferrando/simple-spaced-repetition"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/vlopezferrando/simple-spaced-repetition","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vlopezferrando%2Fsimple-spaced-repetition","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vlopezferrando%2Fsimple-spaced-repetition/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vlopezferrando%2Fsimple-spaced-repetition/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vlopezferrando%2Fsimple-spaced-repetition/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/vlopezferrando","download_url":"https://codeload.github.com/vlopezferrando/simple-spaced-repetition/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vlopezferrando%2Fsimple-spaced-repetition/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":259453489,"owners_count":22860085,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["anki","python","spaced-repetition","spaced-repetition-algorithm"],"created_at":"2024-09-27T05:24:39.345Z","updated_at":"2025-06-12T11:04:47.325Z","avatar_url":"https://github.com/vlopezferrando.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# simple-spaced-repetition\n\nSimple spaced repetition scheduler, based on the [classic Anki algorithm](https://faqs.ankiweb.net/what-spaced-repetition-algorithm.html) and implemented in under 40 lines of code.\n\nThis scheduler is used at [Python.cards](https://python.cards).\n\n![Tests](https://github.com/vlopezferrando/simple-spaced-repetition/actions/workflows/python-package.yml/badge.svg)\n[![Supported Versions](https://img.shields.io/pypi/pyversions/simple_spaced_repetition.svg)](https://pypi.org/project/simple_spaced_repetition)\n\n## Installation\n\nInstall with pip:\n\n    pip install simple_spaced_repetition\n\n## Example usage\n\nThe `Card` class is what you should use:\n\n```python\n\u003e\u003e\u003e from simple_spaced_repetition import Card\n\u003e\u003e\u003e Card()\nCard(status=learning, step=0, interval=None, ease=2.5)\n```\n\n`Card` has a single method `options()` which returns the 4 possible choices for answering a card:\n\n```python\n\u003e\u003e\u003e from simple_spaced_repetition import Card\n\u003e\u003e\u003e card = Card()\n\u003e\u003e\u003e card.options()\n[('again', Card(status=learning, step=0, interval=0:01:00, ease=2.5)),\n ('hard', Card(status=learning, step=1, interval=0:06:00, ease=2.5)),\n ('good', Card(status=learning, step=1, interval=0:10:00, ease=2.5)),\n ('easy', Card(status=reviewing, step=0, interval=4 days, 0:00:00, ease=2.5))]\n```\n\nNext to each answer is a new `Card` object that represents the card after answering with that option.\n\nThe attribute `interval` holds the time that must pass before the card is due again:\n\n```python\n\u003e\u003e\u003e from simple_spaced_repetition import Card\n\u003e\u003e\u003e card = Card()\n\u003e\u003e\u003e for answer, new_card in card.options():\n...     print(answer, new_card.interval)\nagain 0:01:00\nhard 0:06:00\ngood 0:10:00\neasy 4 days, 0:00:00\n```\n\n## Run tests\n\nSimply run:\n\n    python test_simple_spaced_repetition.py\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvlopezferrando%2Fsimple-spaced-repetition","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvlopezferrando%2Fsimple-spaced-repetition","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvlopezferrando%2Fsimple-spaced-repetition/lists"}