fsrs


Namefsrs JSON
Version 2.0.0 PyPI version JSON
download
home_pageNone
SummaryFree Spaced Repetition Scheduler
upload_time2024-04-30 02:42:58
maintainerNone
docs_urlNone
authorNone
requires_python>=3.9
licenseMIT 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 "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
keywords spaced-repetition flashcard
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            ## About The Project

[![PyPi](https://img.shields.io/pypi/v/fsrs)](https://pypi.org/project/fsrs/) [![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)

Py-fsrs is a Python Package implements [Free Spaced Repetition Scheduler algorithm](https://github.com/open-spaced-repetition/free-spaced-repetition-scheduler). 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:
```python
from datetime import datetime, UTC
from fsrs import *
f = FSRS()
card = Card()
# (py-fsrs cards use UTC)
now = datetime(2022, 11, 29, 12, 30, 0, 0, tzinfo=UTC) 
scheduling_cards = f.repeat(card, now)
```

There are four ratings:
```python
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:
```python
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:
```python
card_again.scheduled_days
card_hard.scheduled_days
card_good.scheduled_days
card_easy.scheduled_days
```

Update the card after rating `Good`:
```python
card = scheduling_cards[Rating.Good].card
```

Get the review log after rating `Good`:
```python
review_log = scheduling_cards[Rating.Good].review_log
```

Get the due date for card:
```python
due = card.due
```

There are four states:
```python
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.

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "fsrs",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.9",
    "maintainer_email": null,
    "keywords": "spaced-repetition, flashcard",
    "author": null,
    "author_email": "Jarrett Ye <jarrett.ye@outlook.com>",
    "download_url": "https://files.pythonhosted.org/packages/87/1f/eede6bcbcc47cd539412fc268e08afd13f088e184127018b63734f8edea3/fsrs-2.0.0.tar.gz",
    "platform": null,
    "description": "## About The Project\n\n[![PyPi](https://img.shields.io/pypi/v/fsrs)](https://pypi.org/project/fsrs/) [![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)\n\nPy-fsrs is a Python Package implements [Free Spaced Repetition Scheduler algorithm](https://github.com/open-spaced-repetition/free-spaced-repetition-scheduler). It helps developers apply FSRS in their flashcard apps.\n\n## Getting Started\n\n```\npip install fsrs\n```\n\n## Usage\n\nCreate a card and review it at a given time:\n```python\nfrom datetime import datetime, UTC\nfrom fsrs import *\nf = FSRS()\ncard = Card()\n# (py-fsrs cards use UTC)\nnow = datetime(2022, 11, 29, 12, 30, 0, 0, tzinfo=UTC) \nscheduling_cards = f.repeat(card, now)\n```\n\nThere are four ratings:\n```python\nRating.Again # forget; incorrect response\nRating.Hard # recall; correct response recalled with serious difficulty\nRating.Good # recall; correct response after a hesitation\nRating.Easy # recall; perfect response\n```\n\n\nGet the new state of card for each rating:\n```python\nscheduling_cards[Rating.Again].card\nscheduling_cards[Rating.Hard].card\nscheduling_cards[Rating.Good].card\nscheduling_cards[Rating.Easy].card\n```\n\nGet the scheduled days for each rating:\n```python\ncard_again.scheduled_days\ncard_hard.scheduled_days\ncard_good.scheduled_days\ncard_easy.scheduled_days\n```\n\nUpdate the card after rating `Good`:\n```python\ncard = scheduling_cards[Rating.Good].card\n```\n\nGet the review log after rating `Good`:\n```python\nreview_log = scheduling_cards[Rating.Good].review_log\n```\n\nGet the due date for card:\n```python\ndue = card.due\n```\n\nThere are four states:\n```python\nState.New # Never been studied\nState.Learning # Been studied for the first time recently\nState.Review # Graduate from learning state\nState.Relearning # Forgotten in review state\n```\n\n## License\n\nDistributed under the MIT License. See `LICENSE` for more information.\n",
    "bugtrack_url": null,
    "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 \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:  The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ",
    "summary": "Free Spaced Repetition Scheduler",
    "version": "2.0.0",
    "project_urls": {
        "Homepage": "https://github.com/open-spaced-repetition/py-fsrs"
    },
    "split_keywords": [
        "spaced-repetition",
        " flashcard"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "ac3c30d102451c02eb631f3ca129c261c90d641d29d84ba4d513574e280ef9a5",
                "md5": "39ed8116a59531f57b4d09fd9b67e06b",
                "sha256": "cf87f1b1b0a0d152c7213cd7d95d0c38c8efbba94fa8234c2d399ca7b613eb18"
            },
            "downloads": -1,
            "filename": "fsrs-2.0.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "39ed8116a59531f57b4d09fd9b67e06b",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.9",
            "size": 6313,
            "upload_time": "2024-04-30T02:42:57",
            "upload_time_iso_8601": "2024-04-30T02:42:57.118145Z",
            "url": "https://files.pythonhosted.org/packages/ac/3c/30d102451c02eb631f3ca129c261c90d641d29d84ba4d513574e280ef9a5/fsrs-2.0.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "871feede6bcbcc47cd539412fc268e08afd13f088e184127018b63734f8edea3",
                "md5": "af7c866f480052319beb3bdbbf689c74",
                "sha256": "3805cf2626c7c91a119fb89a9680e314b9dd37a65d2e0572cc49400883d2b13b"
            },
            "downloads": -1,
            "filename": "fsrs-2.0.0.tar.gz",
            "has_sig": false,
            "md5_digest": "af7c866f480052319beb3bdbbf689c74",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.9",
            "size": 7361,
            "upload_time": "2024-04-30T02:42:58",
            "upload_time_iso_8601": "2024-04-30T02:42:58.750248Z",
            "url": "https://files.pythonhosted.org/packages/87/1f/eede6bcbcc47cd539412fc268e08afd13f088e184127018b63734f8edea3/fsrs-2.0.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-04-30 02:42:58",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "open-spaced-repetition",
    "github_project": "py-fsrs",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "requirements": [],
    "lcname": "fsrs"
}
        
Elapsed time: 0.27713s