Skip to main content

WaterGrid-Python

WaterGrid Tests Maintainability Test Coverage PyPI License

Watergrid is a lightweight, distributed framework for data stream processing.

Why Watergrid

  • Watergrid lets developers write their ETL pipelines as applications, not scripts or jobs. This lets you re-use your existing CI/CD infrastructure and deployment practices.
  • Watergrid encourages you to write your ETL operations as modular "steps", making it easy to isolate and test atomic parts of your pipelines.
  • Watergrid lets you scale up to multi-node clusters by changing only a few lines of Python code.
  • Watergrid is minimalistic, and easy to use.
  • Watergrid does not depend on complicated software setups that execute jobs. Everything is self-contained in the library itself.
  • Watergrid lets you use your existing Redis infrastructure for distributed jobs instead of a proprietary data storage/transmission solution.
  • Watergrid includes an API for interfacing with an APM of your choice out of the box.

Getting Started

Creating an ETL pipeline with Watergrid is very easy.

  1. Install Python 3.6 or later (other versions may be supported, but are not tested regularly).
  2. Run pip install watergrid
  3. Paste the following code into a file named main.py:
from watergrid.pipelines.standalone_pipeline import StandalonePipeline
from watergrid.steps import Step
from watergrid.context import DataContext

class SampleStep(Step):
    def __init__(self):
        super().__init__(self.__class__.__name__)

    def run(self, context: DataContext):
        print("Hello World!")

def main():
   pipeline = StandalonePipeline('hello_world_pipeline')
   pipeline.add_step(SampleStep())
   while True:
    pipeline.run()

if __name__ == '__main__':
   main()

Then run python main.py to run the pipeline. You should see Hello World! printed to the console.

Check out the getting started section of the documentation site to build more advanced pipelines with multiple steps and high-availability.

Getting Help

There are plenty of places to get help with Watergrid.

  • Check the in-line documentation in the Python source.
  • Read the online documentation on GitHub Pages.
  • Make a post in the Discussions Tab.
  • Open an issue if you think the problem is with Watergrid, or if you have a feature to suggest.

Example Projects

  • RSSMQ - Forwards RSS feed items to various HTTP APIs.
  • atc-metrics-streamer - Streams metrics from Apache Traffic Control to Kafka.

Metadata

Release files for watergrid 1.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for watergrid 1.1.1
File Size Uploaded
watergrid-1.1.1.tar.gz 43.7 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for watergrid 1.1.1
File Interpreter ABI Platform
watergrid-1.1.1-py3-none-any.whl Python 3 none any Details

Total release size: 78.2 kB

Release files / watergrid-1.1.1.tar.gz

Download URL watergrid-1.1.1.tar.gz
Size 43.7 kB
Tags Source
SHA-256 checksum
How to use checksums
91f46d0bca650986fef5204f1aeb6247ccbbb8506ef7f9332cdffa2a29f69835
BLAKE2b-256 checksum
How to use checksums
5992100db8e58bd67c17006715ec827c649fb7f55d931ed183cdddaa3703cc72
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.0 CPython/3.9.12

Release files / watergrid-1.1.1-py3-none-any.whl

Download URL watergrid-1.1.1-py3-none-any.whl
Size 34.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
65182b826781644dbb1ad86e75e5576aa81a28d8e9fca24c20259323f0d59df8
BLAKE2b-256 checksum
How to use checksums
23882275b665d4c1f984a4e61c859ee25bb79b07787caf0f50c78dbb3c37b7b4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.0 CPython/3.9.12

Release history Release notifications | RSS feed

This release

1.1.1 This release

2 release files

1.1.0

2 release files

1.0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page