aiogram-fsm-sqlitestorage


Nameaiogram-fsm-sqlitestorage JSON
Version 1.0.0 PyPI version JSON
download
home_pageNone
Summaryaiogram FSM storage, stores all data in SQLite database.
upload_time2025-02-15 17:58:16
maintainerKatulos
docs_urlNone
authorAlex
requires_python>=3.8
licenseMIT
keywords aiogram storage sqlite fsm
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # Yet Another FSM SQLite Storage

![PyPI - Wheel](https://img.shields.io/pypi/wheel/aiogram-fsm-sqlitestorage?logo=pypi)
![PyPI - Version](https://img.shields.io/pypi/v/aiogram-fsm-sqlitestorage?logo=pypi)
![PyPI - Python Version](https://img.shields.io/pypi/pyversions/aiogram-fsm-sqlitestorage?logo=pypi)
![PyPI - License](https://img.shields.io/pypi/l/aiogram-fsm-sqlitestorage?logo=pypi)
![release](https://github.com/Katulos/aiogram-fsm-sqlitestorage/actions/workflows/release.yml/badge.svg)
![develop](https://github.com/Katulos/aiogram-fsm-sqlitestorage/actions/workflows/develop.yml/badge.svg?branch=develop)

> [!NOTE]
> When it was necessary for my project, I did not find such projects as [osf4/sqlitestorage](https://github.com/osf4/sqlitestorage) or [sashaferrum/aiogram_sqlite_storage](https://github.com/sashaferrum/aiogram_sqlite_storage) :sob: and adapted [this fork](https://github.com/LehaSex/SQLiteStorage) to my needs.
> More forks to the God of forks! :laughing:

Simple aiogram FSM storage, stores all FSM data in SQLite database

Intended to replace `MemoryStorage` for simple cases where you want to keep states between bot restarts.

Implements just [basic BaseStorage methods](https://docs.aiogram.dev/en/dev-3.x/dispatcher/finite_state_machine/storages.html#aiogram.fsm.storage.base.BaseStorage) such as:

- set_state()
- get_state()
- set_data()
- get_data()
- close()

Tests are based on [original aiogram tests v3.13.1](https://github.com/aiogram/aiogram/blob/v3.13.1/tests/test_contrib/test_fsm_storage/test_storage.py).

## Installation

```bash
pip install aiogram-fsm-sqlitestorage
```

## Usage

Include the following in your script:

```python
# import aiogram and the rest
from aiogram_fsm_sqlitestorage import SQLiteStorage

dp = Dispatcher(bot, storage=SQLiteStorage())
```

Using `SQLiteStorage()` instead of `MemoryStorage()` makes your FSM data persistent between bot restarts.


            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "aiogram-fsm-sqlitestorage",
    "maintainer": "Katulos",
    "docs_url": null,
    "requires_python": ">=3.8",
    "maintainer_email": "katulos@protonmail.com>",
    "keywords": "aiogram, storage, sqlite, fsm",
    "author": "Alex",
    "author_email": "alex.blednov@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/ef/4f/cd2377595f7a6343ff9c488978f3a7d071d57483135c8ed2f9af4b9d8c64/aiogram_fsm_sqlitestorage-1.0.0.tar.gz",
    "platform": null,
    "description": "# Yet Another FSM SQLite Storage\n\n![PyPI - Wheel](https://img.shields.io/pypi/wheel/aiogram-fsm-sqlitestorage?logo=pypi)\n![PyPI - Version](https://img.shields.io/pypi/v/aiogram-fsm-sqlitestorage?logo=pypi)\n![PyPI - Python Version](https://img.shields.io/pypi/pyversions/aiogram-fsm-sqlitestorage?logo=pypi)\n![PyPI - License](https://img.shields.io/pypi/l/aiogram-fsm-sqlitestorage?logo=pypi)\n![release](https://github.com/Katulos/aiogram-fsm-sqlitestorage/actions/workflows/release.yml/badge.svg)\n![develop](https://github.com/Katulos/aiogram-fsm-sqlitestorage/actions/workflows/develop.yml/badge.svg?branch=develop)\n\n> [!NOTE]\n> When it was necessary for my project, I did not find such projects as [osf4/sqlitestorage](https://github.com/osf4/sqlitestorage) or [sashaferrum/aiogram_sqlite_storage](https://github.com/sashaferrum/aiogram_sqlite_storage) :sob: and adapted [this fork](https://github.com/LehaSex/SQLiteStorage) to my needs.\n> More forks to the God of forks! :laughing:\n\nSimple aiogram FSM storage, stores all FSM data in SQLite database\n\nIntended to replace `MemoryStorage` for simple cases where you want to keep states between bot restarts.\n\nImplements just [basic BaseStorage methods](https://docs.aiogram.dev/en/dev-3.x/dispatcher/finite_state_machine/storages.html#aiogram.fsm.storage.base.BaseStorage) such as:\n\n- set_state()\n- get_state()\n- set_data()\n- get_data()\n- close()\n\nTests are based on [original aiogram tests v3.13.1](https://github.com/aiogram/aiogram/blob/v3.13.1/tests/test_contrib/test_fsm_storage/test_storage.py).\n\n## Installation\n\n```bash\npip install aiogram-fsm-sqlitestorage\n```\n\n## Usage\n\nInclude the following in your script:\n\n```python\n# import aiogram and the rest\nfrom aiogram_fsm_sqlitestorage import SQLiteStorage\n\ndp = Dispatcher(bot, storage=SQLiteStorage())\n```\n\nUsing `SQLiteStorage()` instead of `MemoryStorage()` makes your FSM data persistent between bot restarts.\n\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "aiogram FSM storage, stores all data in SQLite database.",
    "version": "1.0.0",
    "project_urls": null,
    "split_keywords": [
        "aiogram",
        " storage",
        " sqlite",
        " fsm"
    ],
    "urls": [
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "8d50b8719d66a34c93098392fcbcc66432fd50ba924cb770bc7433fb52c6fbf0",
                "md5": "e71cf749c65c6097e5f5425fa2438b6b",
                "sha256": "4178fe9e6e8b8d6dae4c06f6c10156e64171e3cb73fe8c255b3741193b73c7f4"
            },
            "downloads": -1,
            "filename": "aiogram_fsm_sqlitestorage-1.0.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "e71cf749c65c6097e5f5425fa2438b6b",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8",
            "size": 4657,
            "upload_time": "2025-02-15T17:58:15",
            "upload_time_iso_8601": "2025-02-15T17:58:15.191465Z",
            "url": "https://files.pythonhosted.org/packages/8d/50/b8719d66a34c93098392fcbcc66432fd50ba924cb770bc7433fb52c6fbf0/aiogram_fsm_sqlitestorage-1.0.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "ef4fcd2377595f7a6343ff9c488978f3a7d071d57483135c8ed2f9af4b9d8c64",
                "md5": "66c35c04dcf15219023af32f0f95f895",
                "sha256": "db3e24e99b29869814350c4b550c3e3097624d88c2fe276a684066c4bf2e44b1"
            },
            "downloads": -1,
            "filename": "aiogram_fsm_sqlitestorage-1.0.0.tar.gz",
            "has_sig": false,
            "md5_digest": "66c35c04dcf15219023af32f0f95f895",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8",
            "size": 5115,
            "upload_time": "2025-02-15T17:58:16",
            "upload_time_iso_8601": "2025-02-15T17:58:16.066368Z",
            "url": "https://files.pythonhosted.org/packages/ef/4f/cd2377595f7a6343ff9c488978f3a7d071d57483135c8ed2f9af4b9d8c64/aiogram_fsm_sqlitestorage-1.0.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-02-15 17:58:16",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "lcname": "aiogram-fsm-sqlitestorage"
}
        
Elapsed time: 0.41925s