Lightweight multi-threaded job framework https://doc.olog.io/execlib
Go to file
Sam G. d60250eb8b minor package and README updates 2024-05-17 03:56:22 -07:00
docs minor package and README updates 2024-05-17 03:56:22 -07:00
execlib minor package and README updates 2024-05-17 03:56:22 -07:00
tests rename to execlib, update package details 2024-05-14 22:05:02 -07:00
.gitignore clean up repo files, README, auxiliary files (pre-BFG) 2024-05-14 15:49:23 -07:00
LICENSE update pyproject.toml 2024-05-14 20:01:06 -07:00
MANIFEST.in initial commit (public reset) 2024-04-19 18:43:52 -07:00
README.md minor package and README updates 2024-05-17 03:56:22 -07:00
pyproject.toml minor package and README updates 2024-05-17 03:56:22 -07:00

README.md

Overview

execlib is a lightweight multi-threaded job framework written in Python. It implements a simple event-based model over core Python utilities like ThreadPoolExecutor to facilitate reactivity and manage concurrent responses.

High-level execution flow diagram

There are a few top-level classes exposed by the package:

  • Router: Central event routing object. Routers facilitate route registration, allowing for pattern-based matching of events to arbitrary callback functions. For example, you could have a function that converts a PDF file to a collection images (callback), and want this function to be called for a new files (event) that match the glob *.pdf (pattern).
  • Listener: Connective event listening object, often created directly by router instances. Listeners pay attention to events arising along registered routes of an affiliated router, passing them through (after optional delays, debouncing, filtering, etc). In the above example, the associated Listener instance might wrap a tool like iNotify to dynamically respond to file events.
  • Server: Long-running process manager for listeners and optional live-reloading via HTTP. Interfaces with listener start() and shutdown() for graceful interruption.

Install

pip install execlib

Development

Documentation

pip install execlib[docs]

Testing

pip install execlib[tests]