litestar-saq


Namelitestar-saq JSON
Version 0.1.20 PyPI version JSON
download
home_pageNone
SummaryLitestar integration for SAQ
upload_time2024-04-05 21:10:52
maintainerNone
docs_urlNone
authorNone
requires_python>=3.8
licenseMIT
keywords litestar saq
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # Litestar SAQ

> [!IMPORTANT]
> This plugin currently contains minimal features and is a work-in-progress

## Installation

```shell
pip install litestar-saq
```

## Usage

Here is a basic application that demonstrates how to use the plugin.

```python
from __future__ import annotations

from litestar import Litestar

from litestar_saq import QueueConfig, SAQConfig, SAQPlugin

saq = SAQPlugin(config=SAQConfig(redis_url="redis://localhost:6397/0", queue_configs=[QueueConfig(name="samples")]))
app = Litestar(plugins=[saq])


```

You can start a background worker with the following command now:

```shell
litestar --app-dir=examples/ --app basic:app workers run
Using Litestar app from env: 'basic:app'
Starting SAQ Workers ──────────────────────────────────────────────────────────────────
INFO - 2023-10-04 17:39:03,255 - saq - worker - Worker starting: Queue<redis=Redis<ConnectionPool<Connection<host=localhost,port=6397,db=0>>>, name='samples'>
INFO - 2023-10-04 17:39:06,545 - saq - worker - Worker shutting down
```

You can also start the process for only specific queues. This is helpful if you want separated processes working on different queues instead of combining them.

```shell
litestar --app-dir=examples/ --app basic:app workers run --queues sample
Using Litestar app from env: 'basic:app'
Starting SAQ Workers ──────────────────────────────────────────────────────────────────
INFO - 2023-10-04 17:39:03,255 - saq - worker - Worker starting: Queue<redis=Redis<ConnectionPool<Connection<host=localhost,port=6397,db=0>>>, name='samples'>
INFO - 2023-10-04 17:39:06,545 - saq - worker - Worker shutting down
```

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "litestar-saq",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.8",
    "maintainer_email": null,
    "keywords": "litestar, saq",
    "author": null,
    "author_email": "Cody Fincher <cody.fincher@gmail.com>",
    "download_url": "https://files.pythonhosted.org/packages/74/f9/cc00601480d145ff73eda0bb817b4647cabcc8c8d6c5d114d3a09bacbc68/litestar_saq-0.1.20.tar.gz",
    "platform": null,
    "description": "# Litestar SAQ\n\n> [!IMPORTANT]\n> This plugin currently contains minimal features and is a work-in-progress\n\n## Installation\n\n```shell\npip install litestar-saq\n```\n\n## Usage\n\nHere is a basic application that demonstrates how to use the plugin.\n\n```python\nfrom __future__ import annotations\n\nfrom litestar import Litestar\n\nfrom litestar_saq import QueueConfig, SAQConfig, SAQPlugin\n\nsaq = SAQPlugin(config=SAQConfig(redis_url=\"redis://localhost:6397/0\", queue_configs=[QueueConfig(name=\"samples\")]))\napp = Litestar(plugins=[saq])\n\n\n```\n\nYou can start a background worker with the following command now:\n\n```shell\nlitestar --app-dir=examples/ --app basic:app workers run\nUsing Litestar app from env: 'basic:app'\nStarting SAQ Workers \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\nINFO - 2023-10-04 17:39:03,255 - saq - worker - Worker starting: Queue<redis=Redis<ConnectionPool<Connection<host=localhost,port=6397,db=0>>>, name='samples'>\nINFO - 2023-10-04 17:39:06,545 - saq - worker - Worker shutting down\n```\n\nYou can also start the process for only specific queues. This is helpful if you want separated processes working on different queues instead of combining them.\n\n```shell\nlitestar --app-dir=examples/ --app basic:app workers run --queues sample\nUsing Litestar app from env: 'basic:app'\nStarting SAQ Workers \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\nINFO - 2023-10-04 17:39:03,255 - saq - worker - Worker starting: Queue<redis=Redis<ConnectionPool<Connection<host=localhost,port=6397,db=0>>>, name='samples'>\nINFO - 2023-10-04 17:39:06,545 - saq - worker - Worker shutting down\n```\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Litestar integration for SAQ",
    "version": "0.1.20",
    "project_urls": {
        "Changelog": "https://cofin.github.io/litesatr-saq/latest/changelog",
        "Discord": "https://discord.gg/X3FJqy8d2j",
        "Documentation": "https://cofin.github.io/litesatr-saq/latest/",
        "Homepage": "https://cofin.github.io/litesatr-saq/latest/",
        "Issue": "https://github.com/cofin/litestar-saq/issues/",
        "Source": "https://github.com/cofin/litestar-saq"
    },
    "split_keywords": [
        "litestar",
        " saq"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "dd8f9ba04cf6ebf5baf4d29714fecab99570f301231047552b3cd7584c308dd9",
                "md5": "a7bca2c866a00ad5e2a27ab940f26d6c",
                "sha256": "2ff3c187849f495c8089db064bcaaf1729735010d2998911ecb28af07ad681d4"
            },
            "downloads": -1,
            "filename": "litestar_saq-0.1.20-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "a7bca2c866a00ad5e2a27ab940f26d6c",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8",
            "size": 14126,
            "upload_time": "2024-04-05T21:10:50",
            "upload_time_iso_8601": "2024-04-05T21:10:50.763813Z",
            "url": "https://files.pythonhosted.org/packages/dd/8f/9ba04cf6ebf5baf4d29714fecab99570f301231047552b3cd7584c308dd9/litestar_saq-0.1.20-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "74f9cc00601480d145ff73eda0bb817b4647cabcc8c8d6c5d114d3a09bacbc68",
                "md5": "b17349b021bfd2636f839d2a38cc02a5",
                "sha256": "e46cb187af3f95e2de919511c4d1ff9ebf82410e739f56b2756ea3baf9a72d75"
            },
            "downloads": -1,
            "filename": "litestar_saq-0.1.20.tar.gz",
            "has_sig": false,
            "md5_digest": "b17349b021bfd2636f839d2a38cc02a5",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8",
            "size": 70098,
            "upload_time": "2024-04-05T21:10:52",
            "upload_time_iso_8601": "2024-04-05T21:10:52.224544Z",
            "url": "https://files.pythonhosted.org/packages/74/f9/cc00601480d145ff73eda0bb817b4647cabcc8c8d6c5d114d3a09bacbc68/litestar_saq-0.1.20.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-04-05 21:10:52",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "cofin",
    "github_project": "litestar-saq",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "litestar-saq"
}
        
Elapsed time: 0.26479s