Skip to main content

Multithreading & processing worker that executes functions and prints the result

Project description

BotBoy

Multithreading & processing worker that executes functions and prints the result

Installation

pip install botboy

Usage

Create a new BotBoy object with a pre-defined function object and a name

from botboy import BotBoy

bot = BotBoy('Adder', lambda x, y: x + y)

Display the information

bot.display_information()

Adder

<function at 0x10e6e8040>

Execute function object on separate thread

bot.execute(1, 2)

Adder is executing task: <function at 0x10e6e8040>

Retrieved result from Adder: 3

Execute function object on separate process

bot.set_processing() # Can be turned back to thread by running same method

bot.execute(3, 4)

Adder is executing task: <function at 0x10e6e8040>

Retrieved result from Adder: 7

Test

Runs the tests on the core module

make test

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

botboy-1.tar.gz (3.4 kB view details)

Uploaded Source

Built Distribution

botboy-1-py2.py3-none-any.whl (2.7 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file botboy-1.tar.gz.

File metadata

  • Download URL: botboy-1.tar.gz
  • Upload date:
  • Size: 3.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: python-requests/2.28.1

File hashes

Hashes for botboy-1.tar.gz
Algorithm Hash digest
SHA256 f933bd852f2258271c76030d9e5692619e375b3bd600fb62dd968adba8c09bfd
MD5 ce1e7c70e24a17d6412d1e8a5c461039
BLAKE2b-256 21e0092e616b9d76727448fcac34c242b0c36714277c6fed381cefea4d89044c

See more details on using hashes here.

File details

Details for the file botboy-1-py2.py3-none-any.whl.

File metadata

  • Download URL: botboy-1-py2.py3-none-any.whl
  • Upload date:
  • Size: 2.7 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: python-requests/2.28.1

File hashes

Hashes for botboy-1-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 bf173ea2d86316f1d4e68defbd94ccb2f81460792c2f7ebc5a547a0e991f68b4
MD5 1d014546ddf1a13c807c10dc45f7686a
BLAKE2b-256 7e85b0793c2faea5146cc52e131b59bd958976bdc0cae22e866b50a2d66eee7a

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page