jupyter-process-manager


Namejupyter-process-manager JSON
Version 0.1.20 PyPI version JSON
download
home_pagehttps://github.com/stas-prokopiev/jupyter_process_manager
SummaryPython package with widget to simplify work with many processes in jupyter
upload_time2022-05-14 19:16:22
maintainer
docs_urlNone
authorStanislav Prokopyev
requires_python>=3.7,<4.0
licenseMIT
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI
coveralls test coverage
            =======================
jupyter_process_manager
=======================

.. image:: https://img.shields.io/github/last-commit/stas-prokopiev/jupyter_process_manager
   :target: https://img.shields.io/github/last-commit/stas-prokopiev/jupyter_process_manager
   :alt: GitHub last commit

.. image:: https://img.shields.io/github/license/stas-prokopiev/jupyter_process_manager
    :target: https://github.com/stas-prokopiev/jupyter_process_manager/blob/master/LICENSE.txt
    :alt: GitHub license<space><space>

.. image:: https://travis-ci.org/stas-prokopiev/jupyter_process_manager.svg?branch=master
    :target: https://travis-ci.org/stas-prokopiev/jupyter_process_manager

.. image:: https://img.shields.io/pypi/v/jupyter_process_manager
   :target: https://img.shields.io/pypi/v/jupyter_process_manager
   :alt: PyPI

.. image:: https://img.shields.io/pypi/pyversions/jupyter_process_manager
   :target: https://img.shields.io/pypi/pyversions/jupyter_process_manager
   :alt: PyPI - Python Version


.. contents:: **Table of Contents**

Overview.
=========================

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

Installation via pip:
======================

.. code-block:: bash

    pip install jupyter_process_manager

Usage examples
===================================================================

How to create create and start processes for **jupyter_process_manager**
-------------------------------------------------------------------------------------

.. code-block:: python

    from jupyter_process_manager import JupyterProcessManager
    process_manager = JupyterProcessManager(".")  # "." - path where to store outputs of the processes

    # And functions for processing
    process_manager.add_function_to_processing(
        func1, *func1_args,**func1_kwargs)
    process_manager.add_function_to_processing(
        func2, *func2_args,**func2_kwargs)

**WARNING: Please do NOT try to use functions defined inside jupyter notebook, they won't work.**

JupyterProcessManager arguments:
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

#. **str_dir_for_output**: Directory where to store processes outputs
#. **is_to_delete_previous_outputs=True**: Flag If you want to delete outputs for all previous processes in the directory

Usage in Jupyter Notebook
------------------------------------------------------------

After processes were added, you can check what is happening with them.

.. code-block:: python

    process_manager

Showing the JupyterProcessManager widget won't block execution so you can run the code in other cells

.. image:: images/2.PNG


How to check output for the processes
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

| Select the process for which you want to see the output.
| Select which output you want to see.
| The output will get updated every 2 seconds.

How to add more processes
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
| You can add as many processes as you want
| by running the code below in any other jupyter notebook cell

.. code-block:: python

    process_manager.add_function_to_processing(
        func_new, *func_new_args,**func_new_kwargs)

How to stop a process
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
To stop the process, select it and press the orange button to stop it

| When the button to stop the selected process is pushed.
| KeyboardInterrupt Exception is called for the process
| If within 5 seconds process is not finished then the process will be killed.

How to do a debug run without a new process creation
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

.. code-block:: python

    # arguments are the same as in **add_function_to_processing(...)**
    process_manager.debug_run_of_1_function(func_to_process, *args, **kwargs)


Other methods available within running processes for JPM
------------------------------------------------------------

Clear **stdout** output from the process
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

.. code-block:: python

    from jupyter_process_manager import clear_output
    clear_output()

Get **stdout** output for the process
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

.. code-block:: python

    from jupyter_process_manager import read_stdout
    stdout_content = read_stdout()

Usage in a console
============================

.. code-block:: python

    process_manager.wait_till_all_processes_are_over()

You will see the output like shown below

.. image:: images/1.PNG

Links
=====

    * `PYPI <https://pypi.org/project/jupyter_process_manager/>`_
    * `readthedocs <https://jupyter_process_manager.readthedocs.io/en/latest/>`_
    * `GitHub <https://github.com/stas-prokopiev/jupyter_process_manager>`_

Project local Links
===================

    * `CHANGELOG <https://github.com/stas-prokopiev/jupyter_process_manager/blob/master/CHANGELOG.rst>`_.

Contacts
========

    * Email: stas.prokopiev@gmail.com
    * `vk.com <https://vk.com/stas.prokopyev>`_
    * `Facebook <https://www.facebook.com/profile.php?id=100009380530321>`_

License
=======

This project is licensed under the MIT License.

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/stas-prokopiev/jupyter_process_manager",
    "name": "jupyter-process-manager",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.7,<4.0",
    "maintainer_email": "",
    "keywords": "",
    "author": "Stanislav Prokopyev",
    "author_email": "stas.prokopiev@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/6d/a9/8cfd71bf68d9f8c30ddeb19467ed6951c932e485c39fc2146c7f0e00cfab/jupyter_process_manager-0.1.20.tar.gz",
    "platform": null,
    "description": "=======================\njupyter_process_manager\n=======================\n\n.. image:: https://img.shields.io/github/last-commit/stas-prokopiev/jupyter_process_manager\n   :target: https://img.shields.io/github/last-commit/stas-prokopiev/jupyter_process_manager\n   :alt: GitHub last commit\n\n.. image:: https://img.shields.io/github/license/stas-prokopiev/jupyter_process_manager\n    :target: https://github.com/stas-prokopiev/jupyter_process_manager/blob/master/LICENSE.txt\n    :alt: GitHub license<space><space>\n\n.. image:: https://travis-ci.org/stas-prokopiev/jupyter_process_manager.svg?branch=master\n    :target: https://travis-ci.org/stas-prokopiev/jupyter_process_manager\n\n.. image:: https://img.shields.io/pypi/v/jupyter_process_manager\n   :target: https://img.shields.io/pypi/v/jupyter_process_manager\n   :alt: PyPI\n\n.. image:: https://img.shields.io/pypi/pyversions/jupyter_process_manager\n   :target: https://img.shields.io/pypi/pyversions/jupyter_process_manager\n   :alt: PyPI - Python Version\n\n\n.. contents:: **Table of Contents**\n\nOverview.\n=========================\n\nThis is a library which helps working with many processes in a jupyter notebook in a very simple way.\n\nInstallation via pip:\n======================\n\n.. code-block:: bash\n\n    pip install jupyter_process_manager\n\nUsage examples\n===================================================================\n\nHow to create create and start processes for **jupyter_process_manager**\n-------------------------------------------------------------------------------------\n\n.. code-block:: python\n\n    from jupyter_process_manager import JupyterProcessManager\n    process_manager = JupyterProcessManager(\".\")  # \".\" - path where to store outputs of the processes\n\n    # And functions for processing\n    process_manager.add_function_to_processing(\n        func1, *func1_args,**func1_kwargs)\n    process_manager.add_function_to_processing(\n        func2, *func2_args,**func2_kwargs)\n\n**WARNING: Please do NOT try to use functions defined inside jupyter notebook, they won't work.**\n\nJupyterProcessManager arguments:\n^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n\n#. **str_dir_for_output**: Directory where to store processes outputs\n#. **is_to_delete_previous_outputs=True**: Flag If you want to delete outputs for all previous processes in the directory\n\nUsage in Jupyter Notebook\n------------------------------------------------------------\n\nAfter processes were added, you can check what is happening with them.\n\n.. code-block:: python\n\n    process_manager\n\nShowing the JupyterProcessManager widget won't block execution so you can run the code in other cells\n\n.. image:: images/2.PNG\n\n\nHow to check output for the processes\n^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n\n| Select the process for which you want to see the output.\n| Select which output you want to see.\n| The output will get updated every 2 seconds.\n\nHow to add more processes\n^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n| You can add as many processes as you want\n| by running the code below in any other jupyter notebook cell\n\n.. code-block:: python\n\n    process_manager.add_function_to_processing(\n        func_new, *func_new_args,**func_new_kwargs)\n\nHow to stop a process\n^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\nTo stop the process, select it and press the orange button to stop it\n\n| When the button to stop the selected process is pushed.\n| KeyboardInterrupt Exception is called for the process\n| If within 5 seconds process is not finished then the process will be killed.\n\nHow to do a debug run without a new process creation\n^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n\n.. code-block:: python\n\n    # arguments are the same as in **add_function_to_processing(...)**\n    process_manager.debug_run_of_1_function(func_to_process, *args, **kwargs)\n\n\nOther methods available within running processes for JPM\n------------------------------------------------------------\n\nClear **stdout** output from the process\n^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n\n.. code-block:: python\n\n    from jupyter_process_manager import clear_output\n    clear_output()\n\nGet **stdout** output for the process\n^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n\n.. code-block:: python\n\n    from jupyter_process_manager import read_stdout\n    stdout_content = read_stdout()\n\nUsage in a console\n============================\n\n.. code-block:: python\n\n    process_manager.wait_till_all_processes_are_over()\n\nYou will see the output like shown below\n\n.. image:: images/1.PNG\n\nLinks\n=====\n\n    * `PYPI <https://pypi.org/project/jupyter_process_manager/>`_\n    * `readthedocs <https://jupyter_process_manager.readthedocs.io/en/latest/>`_\n    * `GitHub <https://github.com/stas-prokopiev/jupyter_process_manager>`_\n\nProject local Links\n===================\n\n    * `CHANGELOG <https://github.com/stas-prokopiev/jupyter_process_manager/blob/master/CHANGELOG.rst>`_.\n\nContacts\n========\n\n    * Email: stas.prokopiev@gmail.com\n    * `vk.com <https://vk.com/stas.prokopyev>`_\n    * `Facebook <https://www.facebook.com/profile.php?id=100009380530321>`_\n\nLicense\n=======\n\nThis project is licensed under the MIT License.\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Python package with widget to simplify work with many processes in jupyter",
    "version": "0.1.20",
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "md5": "dca910f7207358d622134d459197cdc4",
                "sha256": "5c60af17bb48e9172e23862e409225e054fa939c648f0c10d5ae464ea81445dd"
            },
            "downloads": -1,
            "filename": "jupyter_process_manager-0.1.20-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "dca910f7207358d622134d459197cdc4",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.7,<4.0",
            "size": 14605,
            "upload_time": "2022-05-14T19:16:20",
            "upload_time_iso_8601": "2022-05-14T19:16:20.176030Z",
            "url": "https://files.pythonhosted.org/packages/3f/df/7c8db5dcbb1e1893f5f8c5f5e95761576ae152718b1af83823c219b928a9/jupyter_process_manager-0.1.20-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "md5": "e70695f04d127af6d80e6e7e77297014",
                "sha256": "8c68eb6caa8932ccf36d7dc437b0daa10b3b6fa41faea0cbc7cfb33448b780dc"
            },
            "downloads": -1,
            "filename": "jupyter_process_manager-0.1.20.tar.gz",
            "has_sig": false,
            "md5_digest": "e70695f04d127af6d80e6e7e77297014",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.7,<4.0",
            "size": 13612,
            "upload_time": "2022-05-14T19:16:22",
            "upload_time_iso_8601": "2022-05-14T19:16:22.446584Z",
            "url": "https://files.pythonhosted.org/packages/6d/a9/8cfd71bf68d9f8c30ddeb19467ed6951c932e485c39fc2146c7f0e00cfab/jupyter_process_manager-0.1.20.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2022-05-14 19:16:22",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "github_user": "stas-prokopiev",
    "github_project": "jupyter_process_manager",
    "travis_ci": true,
    "coveralls": true,
    "github_actions": false,
    "requirements": [],
    "tox": true,
    "lcname": "jupyter-process-manager"
}
        
Elapsed time: 0.35645s