Skip to content

V0.0.1

Compare
Choose a tag to compare
@Wason1797 Wason1797 released this 31 Dec 01:39
· 2 commits to dist since this release
3d0419a

This is the first release of queue-automator

Features:

  • Create multiprocessing pipelines of any length easily
  • A simple to use decorator API that registers your working functions
from queue_automator import QueueAutomator

# Create an instance of QueueAutomator()
automator = QueueAutomator()

@automator.register_as_worker_function(process_count=2)
def do_work(item: int) -> int:
    sleep(2)
    result = item*2
    return result

if __name__ == '__main__':
    input_data = range(30)

    # Always set your input data before calling .run()
    automator.set_input_data(input_data)
    results = automator.run()
    print(results)