Skip to main content

python package with widget to simplify work with many processes in jupyter

Project description

GitHub last commit GitHub license<space><space> PyPI PyPI - Python Version

Overview.

This is a library which helps working with many processes in a jupyter notebook in a very simple way.

Installation via pip:

pip install jupyter_process_manager

Usage examples

Lets say that you want to run many processes with different arguments for the function below

def test_func(int_seconds):
    for int_num in range(int_seconds):
        print(int_num)
        sleep(1)

Then to run it you just need to do the following:

from jupyter_process_manager import JupyterProcessesManager
# Create an object which will be handling processes
process_manager = JupyterProcessesManager(".")

for wait_for_me in range(5, 50, 5):
    process_manager.add_function_to_processing(test_func, wait_for_me)

All the processes were started and now you can check what is happening with them

Usual print output

process_manager.wait_till_all_processes_are_over(int_seconds_step=2)
images/1.PNG

Show processes output as widget

process_manager.show_jupyter_widget(
    int_seconds_step=2,
    int_max_processes_to_show=20
)
images/2.PNG

JupyterProcessesManager arguments

  1. str_dir_for_output: Directory where to store processes output

  2. is_to_delete_previous_outputs=True: Flag If you want to delete outputs for all previous processes in the directory

Contacts

License

This project is licensed under the MIT License.

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

jupyter_process_manager-0.1.3.tar.gz (9.0 kB view hashes)

Uploaded Source

Built Distribution

jupyter_process_manager-0.1.3-py3-none-any.whl (10.2 kB view hashes)

Uploaded Python 3

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