beanstalkm is a client library for beanstalkd, a fast, distributed, in‑memory work queue service.
beanstalkm supports Python 2.7 and Python 3.6+.
Here is a short example, to illustrate the flavor of beanstalkm:
from beanstalkm import Client, DEFAULT_TUBE
beanstalk = Client()
message = beanstalk({"say": "hey!"})
message.send()
beanstalk.queue.watch(DEFAULT_TUBE)
message = beanstalk.reserve(timeout=0, drop=False)
print(message.body)
message.delete()or:
import beanstalkm
beanstalk = beanstalkm.Client(host="127.0.0.1", port=11300)
message = beanstalk.put({"say": "hey!"})
beanstalk.queue.watch(beanstalkm.DEFAULT_TUBE)
message = beanstalk.reserve(timeout=0, drop=True)
print(message.body)For more information, see the tutorial, which explains most everything.
Copyright (C) 2017 MCode GmbH, Licensed under the GNU AFFERO GENERAL PUBLIC LICENSE.