bytewax-valkey


Namebytewax-valkey JSON
Version 0.2.0 PyPI version JSON
download
home_pageNone
SummaryValkey connectors for Bytewax
upload_time2024-12-03 05:05:00
maintainerNone
docs_urlNone
authorNone
requires_python>=3.12
licenseMIT License Copyright (c) 2024 James Ward 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 bytewax valkey
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            [![PyPI](https://img.shields.io/pypi/v/bytewax-valkey.svg?style=flat-square)][pypi-package]

# Bytewax Valkey

[Valkey][valkey] connectors for [Bytewax][bytewax].

This connector offers 2 sources and 2 sinks:

* `StreamSink` - writes [Valkey streams][valkey-streams] using `xadd`
* `StreamSource` - reads [Valkey streams][valkey-streams] using `xread`
* `PubSubSink` - writes [Valkey pubsub][valkey-pubsub] using `publish`
* `PubSubSource` - reads [Valkey pubsub][valkey-pubsub] using `subscribe`

## Installation

This package is available via [PyPi][pypi-package] as
`bytewax-valkey` and can be installed via your package manager of choice.

## Usage

### Pub/Sub Source

```python
import os

from bytewax_valkey import PubSubSource
from bytewax.connectors.stdio import StdOutSink

import bytewax.operators as op
from bytewax.dataflow import Dataflow

VALKEY_URL = os.environ["VALKEY_URL"]

flow = Dataflow("valkey_example")
flow_input = op.input("input", flow, PubSubSource.from_url(VALKEY_URL, "example"))
op.output("output", flow_input, StdOutSink())
```

### Pub/Sub Sink

```python
import os

from bytewax_valkey import PubSubSink
from bytewax.testing import TestingSource

import bytewax.operators as op
from bytewax.dataflow import Dataflow

VALKEY_URL = os.environ["VALKEY_URL"]

flow = Dataflow("valkey_example")
flow_input = op.input("input", flow, TestingSource([b"example message"]))
op.output("output", flow_input, PubSubSink.from_url(VALKEY_URL, "example"))
```

### Stream Source

```python
import os

from bytewax_valkey import StreamSource
from bytewax.connectors.stdio import StdOutSink

import bytewax.operators as op
from bytewax.dataflow import Dataflow

VALKEY_URL = os.environ["VALKEY_URL"]

flow = Dataflow("valkey_example")
flow_input = op.input("input", flow, StreamSource.from_url(VALKEY_URL, "example"))
op.output("output", flow_input, StdOutSink())
```

### Stream Sink

```python
import os

from bytewax_valkey import StreamSink
from bytewax.testing import TestingSource

import bytewax.operators as op
from bytewax.dataflow import Dataflow

VALKEY_URL = os.environ["VALKEY_URL"]

flow = Dataflow("valkey_example")
flow_input = op.input("input", flow, TestingSource([{"key": "value"}]))
op.output("output", flow_input, StreamSink.from_url(VALKEY_URL, "example"))
```

## License

Licensed under the [MIT License](./LICENSE).

[valkey]: https://valkey.io
[bytewax]: https://bytewax.io
[valkey-streams]: https://valkey.io/topics/streams-intro/
[valkey-pubsub]: https://valkey.io/topics/pubsub/
[pypi-package]: https://pypi.org/project/bytewax-valkey
            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "bytewax-valkey",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.12",
    "maintainer_email": null,
    "keywords": "bytewax, valkey",
    "author": null,
    "author_email": "James Ward <james@notjam.es>",
    "download_url": "https://files.pythonhosted.org/packages/4c/be/a39ad503e1edf0e0f33cd0d3b76bbcc89a0caa13a42750b1036d895d312a/bytewax_valkey-0.2.0.tar.gz",
    "platform": null,
    "description": "[![PyPI](https://img.shields.io/pypi/v/bytewax-valkey.svg?style=flat-square)][pypi-package]\n\n# Bytewax Valkey\n\n[Valkey][valkey] connectors for [Bytewax][bytewax].\n\nThis connector offers 2 sources and 2 sinks:\n\n* `StreamSink` - writes [Valkey streams][valkey-streams] using `xadd`\n* `StreamSource` - reads [Valkey streams][valkey-streams] using `xread`\n* `PubSubSink` - writes [Valkey pubsub][valkey-pubsub] using `publish`\n* `PubSubSource` - reads [Valkey pubsub][valkey-pubsub] using `subscribe`\n\n## Installation\n\nThis package is available via [PyPi][pypi-package] as\n`bytewax-valkey` and can be installed via your package manager of choice.\n\n## Usage\n\n### Pub/Sub Source\n\n```python\nimport os\n\nfrom bytewax_valkey import PubSubSource\nfrom bytewax.connectors.stdio import StdOutSink\n\nimport bytewax.operators as op\nfrom bytewax.dataflow import Dataflow\n\nVALKEY_URL = os.environ[\"VALKEY_URL\"]\n\nflow = Dataflow(\"valkey_example\")\nflow_input = op.input(\"input\", flow, PubSubSource.from_url(VALKEY_URL, \"example\"))\nop.output(\"output\", flow_input, StdOutSink())\n```\n\n### Pub/Sub Sink\n\n```python\nimport os\n\nfrom bytewax_valkey import PubSubSink\nfrom bytewax.testing import TestingSource\n\nimport bytewax.operators as op\nfrom bytewax.dataflow import Dataflow\n\nVALKEY_URL = os.environ[\"VALKEY_URL\"]\n\nflow = Dataflow(\"valkey_example\")\nflow_input = op.input(\"input\", flow, TestingSource([b\"example message\"]))\nop.output(\"output\", flow_input, PubSubSink.from_url(VALKEY_URL, \"example\"))\n```\n\n### Stream Source\n\n```python\nimport os\n\nfrom bytewax_valkey import StreamSource\nfrom bytewax.connectors.stdio import StdOutSink\n\nimport bytewax.operators as op\nfrom bytewax.dataflow import Dataflow\n\nVALKEY_URL = os.environ[\"VALKEY_URL\"]\n\nflow = Dataflow(\"valkey_example\")\nflow_input = op.input(\"input\", flow, StreamSource.from_url(VALKEY_URL, \"example\"))\nop.output(\"output\", flow_input, StdOutSink())\n```\n\n### Stream Sink\n\n```python\nimport os\n\nfrom bytewax_valkey import StreamSink\nfrom bytewax.testing import TestingSource\n\nimport bytewax.operators as op\nfrom bytewax.dataflow import Dataflow\n\nVALKEY_URL = os.environ[\"VALKEY_URL\"]\n\nflow = Dataflow(\"valkey_example\")\nflow_input = op.input(\"input\", flow, TestingSource([{\"key\": \"value\"}]))\nop.output(\"output\", flow_input, StreamSink.from_url(VALKEY_URL, \"example\"))\n```\n\n## License\n\nLicensed under the [MIT License](./LICENSE).\n\n[valkey]: https://valkey.io\n[bytewax]: https://bytewax.io\n[valkey-streams]: https://valkey.io/topics/streams-intro/\n[valkey-pubsub]: https://valkey.io/topics/pubsub/\n[pypi-package]: https://pypi.org/project/bytewax-valkey",
    "bugtrack_url": null,
    "license": "MIT License  Copyright (c) 2024 James Ward  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": "Valkey connectors for Bytewax",
    "version": "0.2.0",
    "project_urls": {
        "Issues": "https://github.com/imnotjames/bytewax-valkey/issues",
        "Repository": "https://github.com/imnotjames/bytewax-valkey.git"
    },
    "split_keywords": [
        "bytewax",
        " valkey"
    ],
    "urls": [
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "456f5de6eeaa3d0115167bccf9f25723f45c2909eeaa42783df1cbad7c0afaf1",
                "md5": "f9525cd57411d82ca6f03012483d8620",
                "sha256": "fef9deb3209b29062d568eab1ac81f370e5ee603ecc3bd9fe260f1413b056fc1"
            },
            "downloads": -1,
            "filename": "bytewax_valkey-0.2.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "f9525cd57411d82ca6f03012483d8620",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.12",
            "size": 7375,
            "upload_time": "2024-12-03T05:04:59",
            "upload_time_iso_8601": "2024-12-03T05:04:59.116098Z",
            "url": "https://files.pythonhosted.org/packages/45/6f/5de6eeaa3d0115167bccf9f25723f45c2909eeaa42783df1cbad7c0afaf1/bytewax_valkey-0.2.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "4cbea39ad503e1edf0e0f33cd0d3b76bbcc89a0caa13a42750b1036d895d312a",
                "md5": "9bc551caa6b518012d91f17ec7a12f40",
                "sha256": "8201786feaaa74ccad148e457f9d3408c77d287d07637d0cafa3203f7d2e82b4"
            },
            "downloads": -1,
            "filename": "bytewax_valkey-0.2.0.tar.gz",
            "has_sig": false,
            "md5_digest": "9bc551caa6b518012d91f17ec7a12f40",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.12",
            "size": 8699,
            "upload_time": "2024-12-03T05:05:00",
            "upload_time_iso_8601": "2024-12-03T05:05:00.070158Z",
            "url": "https://files.pythonhosted.org/packages/4c/be/a39ad503e1edf0e0f33cd0d3b76bbcc89a0caa13a42750b1036d895d312a/bytewax_valkey-0.2.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-12-03 05:05:00",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "imnotjames",
    "github_project": "bytewax-valkey",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "bytewax-valkey"
}
        
Elapsed time: 0.48689s