Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

RunnerBean

A simple tool for creating long-running Python workers listening for Beanstalk jobs.

Jobs can be posted as YAML or JSON objects, with keys mapping to the callable’s keyword arguments. Passing parse=False to the __init__ method will disable YAML parsing, and the callable will be provided a single string argument containing the job’s body.

Returning True from the callable will be seen as a success and will delete the job from the queue. Returning False or None will be seen as a failure, and the job will be buried for later inspection.

If listening on multiple tubes, add the argument __tubes__ to the method to receive the tube name when the callable is executed.

Usage:

import logging
from RunnerBean import Runner

def print_message(recipient, message, __tube__):
    # accepts a job with the following structure:
    """
    message: Hello world!
    recipient: joe bloggs
    """
    print recipient, message

    print __tube__ #= 'messages'

    return True # this deletes the job from the tube

if __name__ == '__main__':
    runner = Runner(print_message,
                    parse=True, # default; job body should be parsed as YAML
                    tubes="messages", # string or list of tubes to listen on
                    host='0.0.0.0', # beanstalkd host
                    port=11300, # beanstalkd port
                    loglevel=logging.DEBUG, # set log level, default: ERROR
                    logfile='runnerbean.log' # set the logfile
                    )
    runner.run()

Metadata

Release files for RunnerBean 0.4.4.dev0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for RunnerBean 0.4.4.dev0
File Size Uploaded Provenance Actions
RunnerBean-0.4.4.dev0.tar.gz 4.1 kB Without provenance Details for RunnerBean-0.4.4.dev0.tar.gz

Release files / RunnerBean-0.4.4.dev0.tar.gz

Download URL RunnerBean-0.4.4.dev0.tar.gz
Size 4.1 kB
Tags Source
SHA-256 checksum
How to use checksums
45c01986b947bdd978020fb0c3f0de7444ed083963944a74e3bd7932f8fb2845
BLAKE2b-256 checksum
How to use checksums
9898cf4f2da298240385787c8b64f69b2106fff8b63d5cdd1c7415217c8579b7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Security for RunnerBean 0.4.4.dev0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page