https://github.com/hazarddede/pnp
Pull 'n' Push - Pulls data from sources and pushes it to sinks
https://github.com/hazarddede/pnp
asyncio data home-automation mqtt pipeline python3 workflow
Last synced: 10 months ago
JSON representation
Pull 'n' Push - Pulls data from sources and pushes it to sinks
- Host: GitHub
- URL: https://github.com/hazarddede/pnp
- Owner: HazardDede
- License: mit
- Created: 2018-05-10T21:42:20.000Z (over 7 years ago)
- Default Branch: develop
- Last Pushed: 2023-02-15T17:57:59.000Z (almost 3 years ago)
- Last Synced: 2025-04-12T09:47:51.558Z (10 months ago)
- Topics: asyncio, data, home-automation, mqtt, pipeline, python3, workflow
- Language: Python
- Size: 1.96 MB
- Stars: 4
- Watchers: 1
- Forks: 1
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Pull 'n' Push
[](https://www.python.org/)
[](https://badge.fury.io/py/pnp)
[](https://pnp.readthedocs.io/en/stable/?badge=stable)
[](https://github.com/HazardDede/pnp/commits/master)
[](https://travis-ci.org/HazardDede/pnp)
[](https://coveralls.io/github/HazardDede/pnp?branch=master)
[](https://cloud.docker.com/u/hazard/repository/docker/hazard/pnp)
[](https://opensource.org/licenses/MIT)

> Pulls data from sources and pushes it to sinks with optional transformations in between.
## Installation
pip install pnp
Installation with extras:
pip install pnp[fswatcher,faceR]
Please consult the [component documentation](https://pnp.readthedocs.io/en/stable/plugins/index.html) to see if a
component requires an extra or not.
## Getting started
Define `pulls` to fetch / pull data from source systems.
Define one `push` or multiple `pushes` per pull to transfer the pulled data anywhere else (you only need a plugin that
knows how to handle the target). You configure your pipeline in `yaml`:
```yaml
tasks:
- name: hello-world
pull:
plugin: pnp.plugins.pull.simple.Repeat
args:
interval: 1s
repeat: "Hello World"
push:
- plugin: pnp.plugins.push.simple.Echo
```
Copy this configuration and create the file `helloworld.yaml`. Run it:
pnp helloworld.yaml
This example yields the string `Hello World` every second.
**Hint**: You can validate your config without actually executing it with
```bash
pnp --check helloworld.yaml
```
If you want to learn more please see the documentation at [Read the Docs](https://pnp.readthedocs.io/en/stable/).