Skip to main content

Valkey connectors for Bytewax

Project description

PyPI

Bytewax Valkey

Valkey connectors for Bytewax.

This connector offers 3 sources and 2 sinks:

Installation

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

Usage

Pub/Sub Source

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 Pattern Source

import os

from bytewax_valkey import PubSubPatternSource
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, PubSubPatternSource.from_url(VALKEY_URL, "example*"))
op.output("output", flow_input, StdOutSink())

Pub/Sub Sink

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

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

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.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

bytewax_valkey-0.3.0.tar.gz (13.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

bytewax_valkey-0.3.0-py3-none-any.whl (7.4 kB view details)

Uploaded Python 3

File details

Details for the file bytewax_valkey-0.3.0.tar.gz.

File metadata

  • Download URL: bytewax_valkey-0.3.0.tar.gz
  • Upload date:
  • Size: 13.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.5.18

File hashes

Hashes for bytewax_valkey-0.3.0.tar.gz
Algorithm Hash digest
SHA256 5c6f47b126e2c09590e6ad4e4cd8d3150e8422c785322009f45cc0c39859c821
MD5 786282aedd0c55c82f24bbd45fd4ee2a
BLAKE2b-256 ab081610347d4071e36be58d84db0244de68827c688fb607689fff22a48bc9fb

See more details on using hashes here.

File details

Details for the file bytewax_valkey-0.3.0-py3-none-any.whl.

File metadata

File hashes

Hashes for bytewax_valkey-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 352f30fb3da844ad05ba0d53a5c5b6ce1bddfa7d8f64a63c2346feb1b1e14dd2
MD5 617c3dae0456db4418d71aae3f34cfa7
BLAKE2b-256 e6af31056ef83736c03c2147eee2aa07ba35f604f70f97b3a71b3cbb579edc2b

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page