Skip to content

agabel/bytewax-elasticsearch

Repository files navigation

Bytewax Connector Template

Bytewax

This project is a template for creating input connectors for Bytewax.

How to use this template

To create a new connector, click "Use this template" and create a new repository. Start creating your connector by customizing pyproject.toml to include any dependencies your connector requires, along with any development dependencies.

For a completed example that uses this template, see https://github.com/bytewax/bytewax-kafka.

Development

This template includes an optional set of development dependencies which can be installed with pip install .[dev]. If you get an error using zsh you may need to quote the path like this - pip install '.[dev]'

This template also contains a configuration for using pre-commit hooks. You can install the pre-commit hooks after running pip install .[dev] with pre-commit install.

Testing

This project comes with an example test directory that uses pytest.

Publishing

Included in this project are GitHub actions that will build and publish your package to PyPI.

Publishing to PyPI using the GitHub Action configured here uses their Trusted Publishing framework. See the docs for configuring your project on PyPI.

This action is triggered when creating a GitHub release from a tagged version.

Documentation

This project contains a GitHub action for building and publishing documentation to GitHub Pages using Sphinx.

To view the documentation locally, run make html from the docs/ folder.

This action is triggered when creating a GitHub release from a tagged version.

Building a connector for Bytewax

Included in this project is a skeleton implementation of PartitionedInput and DynamicInput.

For more information about how to create custom connectors, see our API Docs and the blog post that details building a custom connector for Bytewax.

Important things to keep in mind when building input connectors

Don't call Python's time.sleep

It is important to yield control from your input connector to Bytewax when processing input. Bytewax's runtime is based on a cooperative multitasking model. Unless your code yields execution to Bytewax, no progress will be made in processing items in your dataflow, and important work like storing state for recovery will not take place.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages