aiogram-sqlite-storage


Nameaiogram-sqlite-storage JSON
Version 1.0.1 PyPI version JSON
download
home_pageNone
SummaryA FSM Storage for aiogram 3.0+, based on SQLite.
upload_time2024-09-04 13:54:25
maintainerNone
docs_urlNone
authorNone
requires_python>=3.8
licenseNone
keywords aiogram asyncio fsm json pickle storage telegram
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # 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": null,
    "name": "aiogram-sqlite-storage",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.8",
    "maintainer_email": null,
    "keywords": "aiogram, asyncio, fsm, json, pickle, storage, telegram",
    "author": null,
    "author_email": "Aleksandr Zheleznov <sasha.ferrum@gmail.com>",
    "download_url": "https://files.pythonhosted.org/packages/32/72/4aa859d65a436a0563c72695d466b8e55b64351219cfdc910f991f021b9f/aiogram_sqlite_storage-1.0.1.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": null,
    "summary": "A FSM Storage for aiogram 3.0+, based on SQLite.",
    "version": "1.0.1",
    "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": "32724aa859d65a436a0563c72695d466b8e55b64351219cfdc910f991f021b9f",
                "md5": "8a5bae5c92d8f3c118b0b67665b13ee5",
                "sha256": "fe571d51702d366fc82627de2326f609b47211785a9c054b49f761487b1053a6"
            },
            "downloads": -1,
            "filename": "aiogram_sqlite_storage-1.0.1.tar.gz",
            "has_sig": false,
            "md5_digest": "8a5bae5c92d8f3c118b0b67665b13ee5",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8",
            "size": 17175,
            "upload_time": "2024-09-04T13:54:25",
            "upload_time_iso_8601": "2024-09-04T13:54:25.453336Z",
            "url": "https://files.pythonhosted.org/packages/32/72/4aa859d65a436a0563c72695d466b8e55b64351219cfdc910f991f021b9f/aiogram_sqlite_storage-1.0.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-09-04 13:54:25",
    "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"
}
        
Elapsed time: 4.66799s