Skip to main content

A tool for monitoring and managing asynchronous function execution.

Project description

functionmonitor

Demo

Python's standard function calls are synchronous and blocking, executing each function sequentially and waiting for each to complete before moving on. This design can be a limitation, especially with I/O-bound or long-running operations.

functionmonitor is designed specifically for use in Jupyter notebooks to enable easy, asynchronous function execution. By running functions in separate threads, you can manage multiple tasks concurrently within the interactive Jupyter environment, allowing for:

  • Concurrent function execution, freeing up the main thread to continue processing other tasks.
  • Real-time monitoring of each function's progress.
  • Automatic result assignment to variables in the global namespace for easy access as soon as functions complete.

Key Features

  • Execute Functions Concurrently: Run functions in separate threads, improving efficiency by enabling asynchronous execution.
  • Easy Result Access: Results are assigned to global variables with the same name as the task key if the create_variables parameter is enabled.
  • Supports Any Callable: Works with any callable (function, lambda, etc.), allowing for flexible function management.

Usage Overview

  1. Basic Structure
    functionmonitor behaves similarly to a dictionary, where each task is stored with a task name as the key and the result as the value. Once a task completes, its result is directly accessible.

  2. Using Callables
    Any callable can be assigned to functionmonitor, allowing functions, lambda expressions, and more to run asynchronously. Prefixing the callable with lambda prevents immediate execution, enabling background processing.


This setup lets you add tasks asynchronously with minimal effort, simplifying concurrent execution and real-time progress tracking in Python projects.

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

functionmonitor-0.1.4.tar.gz (16.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

functionmonitor-0.1.4-py3-none-any.whl (16.8 kB view details)

Uploaded Python 3

File details

Details for the file functionmonitor-0.1.4.tar.gz.

File metadata

  • Download URL: functionmonitor-0.1.4.tar.gz
  • Upload date:
  • Size: 16.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.10.9

File hashes

Hashes for functionmonitor-0.1.4.tar.gz
Algorithm Hash digest
SHA256 7217ccf8d95158eb8df1735025acd8a6e2f59365bb68c1205f2af7ada7440bb0
MD5 194eff5cfdebbcbd4e0c5bb5fb3dc904
BLAKE2b-256 922feff92308fdbc897ad288581587b14ee485c3b19ecfab4dc6ec47cb41fe0a

See more details on using hashes here.

File details

Details for the file functionmonitor-0.1.4-py3-none-any.whl.

File metadata

File hashes

Hashes for functionmonitor-0.1.4-py3-none-any.whl
Algorithm Hash digest
SHA256 4a64c236e315401c55cb610384a9703d269a3f5cb4d66e31d0276cea3088f47a
MD5 6d6a677545f526b051516da350b599ba
BLAKE2b-256 849c8fa5ff5e0a81a6e3ac0f18d557573af41d47c2322b041464e7ed65d825b1

See more details on using hashes here.

Supported by

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