# A FSM Storage for aiogram 3.0+
It's a very simple FSM Storage for the aiogram 3.0+. It uses local SQLite database for storing states and data. It's possible to chose method of serializing data in the database. A 'pickle' or a 'json' are available. A 'pickle' is used as default.
## Installation:
```bash
pip install aiogram-sqlite-storage
```
## Usage:
```python
from aiogram import Dispatcher
# Import SQLStorage class
from aiogram_sqlite_storage.sqlitestore import SQLStorage
# Initialise a storage
# Path to a database is optional. 'fsm_starage.db' will be created for default.
# 'serializing_method' is optional. 'pickle' is a default value. Also a 'json' is possible.
my_storage = SQLStorage('my_db_path.db', serializing_method = 'pickle')
# Initialize dispetcher with the storage
dp = Dispatcher(storage = my_storage)
# Use your FSM states and data as usual
```
Raw data
{
"_id": null,
"home_page": "",
"name": "aiogram-sqlite-storage",
"maintainer": "",
"docs_url": null,
"requires_python": ">=3.8",
"maintainer_email": "",
"keywords": "aiogram,asyncio,fsm,json,pickle,storage,telegram",
"author": "",
"author_email": "Aleksandr Zheleznov <sasha.ferrum@gmail.com>",
"download_url": "https://files.pythonhosted.org/packages/b0/dc/4b2a73ce53f54a0c9284d3f849efa2e56d46954291da17a9bf1f60fb732b/aiogram_sqlite_storage-1.0.0.tar.gz",
"platform": null,
"description": "# A FSM Storage for aiogram 3.0+\n\nIt's a very simple FSM Storage for the aiogram 3.0+. It uses local SQLite database for storing states and data. It's possible to chose method of serializing data in the database. A 'pickle' or a 'json' are available. A 'pickle' is used as default. \n\n## Installation:\n```bash\npip install aiogram-sqlite-storage\n```\n\n## Usage:\n```python\nfrom aiogram import Dispatcher\n\n# Import SQLStorage class\nfrom aiogram_sqlite_storage.sqlitestore import SQLStorage\n\n# Initialise a storage\n# Path to a database is optional. 'fsm_starage.db' will be created for default.\n# 'serializing_method' is optional. 'pickle' is a default value. Also a 'json' is possible.\nmy_storage = SQLStorage('my_db_path.db', serializing_method = 'pickle')\n\n# Initialize dispetcher with the storage\ndp = Dispatcher(storage = my_storage)\n\n# Use your FSM states and data as usual\n```",
"bugtrack_url": null,
"license": "",
"summary": "A FSM Storage for aiogram 3.0+, based on SQLite.",
"version": "1.0.0",
"project_urls": {
"Homepage": "https://github.com/sashaferrum/aiogram_sqlite_storage"
},
"split_keywords": [
"aiogram",
"asyncio",
"fsm",
"json",
"pickle",
"storage",
"telegram"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "3f9f38bf87896936435f2097cbd24f164de1180b432f9bb3aa249de2db4bcbec",
"md5": "fcb28f3b5ed2143ddc06fb58be848b38",
"sha256": "24b3a969dd8aa4146f4305fb2998da897e732ab98c867625d577fee1d7df7394"
},
"downloads": -1,
"filename": "aiogram_sqlite_storage-1.0.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "fcb28f3b5ed2143ddc06fb58be848b38",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.8",
"size": 16020,
"upload_time": "2023-10-02T23:10:40",
"upload_time_iso_8601": "2023-10-02T23:10:40.902949Z",
"url": "https://files.pythonhosted.org/packages/3f/9f/38bf87896936435f2097cbd24f164de1180b432f9bb3aa249de2db4bcbec/aiogram_sqlite_storage-1.0.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "b0dc4b2a73ce53f54a0c9284d3f849efa2e56d46954291da17a9bf1f60fb732b",
"md5": "8163db848f66b5bd1b4e703b4c4b6ae7",
"sha256": "006d9b5f706d052e0a4736b7e128e7acf3752e4799b446732b6b95229490de2f"
},
"downloads": -1,
"filename": "aiogram_sqlite_storage-1.0.0.tar.gz",
"has_sig": false,
"md5_digest": "8163db848f66b5bd1b4e703b4c4b6ae7",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.8",
"size": 17183,
"upload_time": "2023-10-02T23:12:00",
"upload_time_iso_8601": "2023-10-02T23:12:00.460128Z",
"url": "https://files.pythonhosted.org/packages/b0/dc/4b2a73ce53f54a0c9284d3f849efa2e56d46954291da17a9bf1f60fb732b/aiogram_sqlite_storage-1.0.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2023-10-02 23:12:00",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "sashaferrum",
"github_project": "aiogram_sqlite_storage",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"lcname": "aiogram-sqlite-storage"
}