Metadata-Version: 2.1
Name: worker-bunch
Version: 1.0.5
Summary: Task/job/rule engine, primarily intended for use in a smarthome environment.
Home-page: https://github.com/rosenloecher-it/worker-bunch
Author: Rosenloecher-IT (Raul Rosenlöcher)
Author-email: <github@rosenloecher-it.de>
License: UNKNOWN
Keywords: smarthome,mqtt,rule-engine,task-engine
Platform: UNKNOWN
Classifier: Development Status :: 5 - Production/Stable
Classifier: Environment :: Console
Classifier: Intended Audience :: Developers
Classifier: Operating System :: POSIX :: Linux
Classifier: Programming Language :: Python :: 3
Classifier: License :: OSI Approved :: MIT License
Description-Content-Type: text/markdown
License-File: LICENSE.txt
Requires-Dist: astral ==2.2
Requires-Dist: attrs ==23.1.0
Requires-Dist: click ==8.1.7
Requires-Dist: jsonschema ==4.19.0
Requires-Dist: paho-mqtt ==1.6.1
Requires-Dist: psycopg ==3.1.10
Requires-Dist: pycron ==3.0.0
Requires-Dist: pyyaml ==6.0.1
Requires-Dist: rx ==3.2.0
Requires-Dist: schedule ==1.2.0
Requires-Dist: tzlocal ==5.0.1


# Worker-Bunch

... is a tasks/jobs/rules engine, primarily intended for use in a smarthome environment.

*Worker-Bunch* provides a programming infrastructure for creating tasks/jobs/rules with proprietary functionality.
These tasks/jobs/rules are called "workers" here. Each worker runs as a separate thread.

The worker base class is supposed to get overwritten. The most functionality goes into 2 functions with limited scope:
`subscribe_notifications` and `_work`. See
[dummy_worker.py](https://github.com/rosenloecher-it/worker-bunch/blob/master/app/dummy_worker.py) and
[main.py](https://github.com/rosenloecher-it/worker-bunch/blob/master/app/main.py).

The following infrastructure parts are already implemented:
- Starting and stopping the workers
- Logging
- Configuration and validation of configuration file (extendable for your job configuration; JSON schema based)
- Subscriptions to timer and cron events.
- Subscriptions to MQTT topics and publish MQTT messages. MQTT messages get debounced (configurable time span).
- Command line arguments

Other characteristics:
- Runs as Linux service.
- Additional prepacked is a Postgres and MQTT client.
  This is a quite opinionated decision due to the special lifecycle of the MQTT client (among others).
- Ready to use is a database worker, which is fully configurable (cron, sql statements, sql scripts, text replacements).
  See [database_worker](https://github.com/rosenloecher-it/worker-bunch/blob/master/worker_bunch/database/database_worker.py).


## Usage

Have a look at  [Worker-Bunch-Sample](https://github.com/rosenloecher-it/worker-bunch-sample)


## Maintainer & License

MIT © [Raul Rosenlöcher](https://github.com/rosenloecher-it)

The code is available at [GitHub][home].

[home]: https://github.com/rosenloecher-it/worker-bunch


