eisenmp


Nameeisenmp JSON
Version 1.0 PyPI version JSON
download
home_page
SummaryMultiprocess Framework for Server and Mobiles; run your generator output and server on every CPU core,
upload_time2023-04-28 19:33:41
maintainer
docs_urlNone
authorRené Horn
requires_python>=3.7
licenseBSD 3-Clause License Copyright (c) 2023, René Horn Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. 3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
keywords multiprocess framework python multiprocessor framework
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            Introduction
############

.. image:: https://github.com/44xtc44/eisenmp/actions/workflows/tests.yml/badge.svg
   :target: https://github.com/44xtc44/eisenmp/actions/workflows/tests.yml


Python 3.7

`Multiprocessor <https://en.wikipedia.org/wiki/Multiprocessing>`_
`Framework <https://en.wikipedia.org/wiki/Software_framework>`_ for single Server

Kwargs To Go

Features:

* **Uniform** foundation to create multiprocess project modules
* **Workload Chunks** with header to control output and speed up a specific task
* Chunks get a serial number (ID), findings can be checked in a result dictionary, which ID is missing
* **module_loader** decouples your Worker imports from Main()
* **Categories of Queues**, assign Names to Queues and groups of Queues
* **Queue list** helps to debug your setup and reveals the name, object id and object reference of every Queue
* **Print Queue** allows formatted print to screen for your processes (blocks)
* No libraries, (Linux, Windows)

| Visit the features above in the `Examples gitHub repository <https://github.com/44xtc44/eisenmp_examples>`_
| or

download the all inclusive `PyPi Examples package <https://pypi.org/project/eisenmp-examples/>`_ and
execute **eisenmp_url** in Terminal to start the simpleHTTP Ajax server

| All scenarios run on **Template Style Modules**. Enjoy the descriptions.

How it works
~~~~~~~~~~~~
You write two functions and two modules.
Let's name them **Manager.py** and **Worker.py**.

1. Manager.py defines custom objects and starts a new process, target is **module_loader.py** (loader)
2. loader imports your (independent) Worker.py module from file system without side effects
3. loader sits in a loop and calls your Worker.py entry function until queue is empty
4. **q_feeder** iterator sends a STOP message. Your Worker reads STOP, return False and exit.
5. **module_loader** module then puts a STOP Worker message in all other input queues.
6. **Next** Worker reads STOP, exit ...
7. Loader runs idle and awaits the internal STOP Process message.

.. image:: ./docs/source/_static/eisenmp_pic_loader.svg
  :width: 640
  :alt: Worker module loader, loads independent, no imports of parent

Generators
~~~~~~~~~~~

.. image:: ./docs/source/_static/eisenmp_pic_generator.svg
  :width: 640
  :alt: Generator, iterator, lists with name and ID header

Variables transfer to worker
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
The worker should be more flexible. Thus, it needs more structured information.

* Information collector is the ``ModuleConfiguration`` class instance. The class can carry any name.
* All instance attributes are stored in a dictionary __dict__. (self.foo will be kwargs.foo)
* The instance dictionary is argument (`kwargs`) to call the eisenmp start method.
* `Kwargs` is updated further with queue information and the START_SEQUENCE_NUM of the process, before process start.

.. image:: ./docs/source/_static/eisenmp_pic_kwargs.svg
  :width: 640
  :alt: Generator, Iterator makes lists, result in dictionary


Default Queues

- ``Input`` worker lists, ``Output`` result and stop lists
- ``Tools``, ``Print``, ``Info``

How to run the examples?
~~~~~~~~~~~~~~~~~~~~~~~~~
Fast `PyPi package <https://pypi.org/project/eisenmp-examples/>`_. **eisenmp** will be installed also.

In depth. Clone both repos.

`eisenmp <https://github.com/44xtc44/eisenmp>`_ and
`eisenmp_examples <https://github.com/44xtc44/eisenmp_examples>`_

Install in editable pip mode.

::

    cd eisenmp
    pip3 install -e .  # uninstall (linux pip3) with: pip3 uninstall eisenmp

    cd eisenmp_examples
    pip3 install -e .  # uninstall with: pip3 uninstall eisenmp_examples

Run the examples. Either local Ajax Web server or terminal menu.

::

    eisenmp_url
    # or
    eisenmp_menu

Get the documentation on readthedocs https://eisenmp.readthedocs.io/


            

Raw data

            {
    "_id": null,
    "home_page": "",
    "name": "eisenmp",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.7",
    "maintainer_email": "",
    "keywords": "multiprocess framework,python multiprocessor framework",
    "author": "Ren\u00e9 Horn",
    "author_email": "Ren\u00e9 Horn <rene_horn@gmx.net>",
    "download_url": "https://files.pythonhosted.org/packages/7e/a0/42972aa575624687736cae5f7a3970b61786074f53af49cf679f73ff4fb7/eisenmp-1.0.tar.gz",
    "platform": null,
    "description": "Introduction\r\n############\r\n\r\n.. image:: https://github.com/44xtc44/eisenmp/actions/workflows/tests.yml/badge.svg\r\n   :target: https://github.com/44xtc44/eisenmp/actions/workflows/tests.yml\r\n\r\n\r\nPython 3.7\r\n\r\n`Multiprocessor <https://en.wikipedia.org/wiki/Multiprocessing>`_\r\n`Framework <https://en.wikipedia.org/wiki/Software_framework>`_ for single Server\r\n\r\nKwargs To Go\r\n\r\nFeatures:\r\n\r\n* **Uniform** foundation to create multiprocess project modules\r\n* **Workload Chunks** with header to control output and speed up a specific task\r\n* Chunks get a serial number (ID), findings can be checked in a result dictionary, which ID is missing\r\n* **module_loader** decouples your Worker imports from Main()\r\n* **Categories of Queues**, assign Names to Queues and groups of Queues\r\n* **Queue list** helps to debug your setup and reveals the name, object id and object reference of every Queue\r\n* **Print Queue** allows formatted print to screen for your processes (blocks)\r\n* No libraries, (Linux, Windows)\r\n\r\n| Visit the features above in the `Examples gitHub repository <https://github.com/44xtc44/eisenmp_examples>`_\r\n| or\r\n\r\ndownload the all inclusive `PyPi Examples package <https://pypi.org/project/eisenmp-examples/>`_ and\r\nexecute **eisenmp_url** in Terminal to start the simpleHTTP Ajax server\r\n\r\n| All scenarios run on **Template Style Modules**. Enjoy the descriptions.\r\n\r\nHow it works\r\n~~~~~~~~~~~~\r\nYou write two functions and two modules.\r\nLet's name them **Manager.py** and **Worker.py**.\r\n\r\n1. Manager.py defines custom objects and starts a new process, target is **module_loader.py** (loader)\r\n2. loader imports your (independent) Worker.py module from file system without side effects\r\n3. loader sits in a loop and calls your Worker.py entry function until queue is empty\r\n4. **q_feeder** iterator sends a STOP message. Your Worker reads STOP, return False and exit.\r\n5. **module_loader** module then puts a STOP Worker message in all other input queues.\r\n6. **Next** Worker reads STOP, exit ...\r\n7. Loader runs idle and awaits the internal STOP Process message.\r\n\r\n.. image:: ./docs/source/_static/eisenmp_pic_loader.svg\r\n  :width: 640\r\n  :alt: Worker module loader, loads independent, no imports of parent\r\n\r\nGenerators\r\n~~~~~~~~~~~\r\n\r\n.. image:: ./docs/source/_static/eisenmp_pic_generator.svg\r\n  :width: 640\r\n  :alt: Generator, iterator, lists with name and ID header\r\n\r\nVariables transfer to worker\r\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\r\nThe worker should be more flexible. Thus, it needs more structured information.\r\n\r\n* Information collector is the ``ModuleConfiguration`` class instance. The class can carry any name.\r\n* All instance attributes are stored in a dictionary __dict__. (self.foo will be kwargs.foo)\r\n* The instance dictionary is argument (`kwargs`) to call the eisenmp start method.\r\n* `Kwargs` is updated further with queue information and the START_SEQUENCE_NUM of the process, before process start.\r\n\r\n.. image:: ./docs/source/_static/eisenmp_pic_kwargs.svg\r\n  :width: 640\r\n  :alt: Generator, Iterator makes lists, result in dictionary\r\n\r\n\r\nDefault Queues\r\n\r\n- ``Input`` worker lists, ``Output`` result and stop lists\r\n- ``Tools``, ``Print``, ``Info``\r\n\r\nHow to run the examples?\r\n~~~~~~~~~~~~~~~~~~~~~~~~~\r\nFast `PyPi package <https://pypi.org/project/eisenmp-examples/>`_. **eisenmp** will be installed also.\r\n\r\nIn depth. Clone both repos.\r\n\r\n`eisenmp <https://github.com/44xtc44/eisenmp>`_ and\r\n`eisenmp_examples <https://github.com/44xtc44/eisenmp_examples>`_\r\n\r\nInstall in editable pip mode.\r\n\r\n::\r\n\r\n    cd eisenmp\r\n    pip3 install -e .  # uninstall (linux pip3) with: pip3 uninstall eisenmp\r\n\r\n    cd eisenmp_examples\r\n    pip3 install -e .  # uninstall with: pip3 uninstall eisenmp_examples\r\n\r\nRun the examples. Either local Ajax Web server or terminal menu.\r\n\r\n::\r\n\r\n    eisenmp_url\r\n    # or\r\n    eisenmp_menu\r\n\r\nGet the documentation on readthedocs https://eisenmp.readthedocs.io/\r\n\r\n",
    "bugtrack_url": null,
    "license": "BSD 3-Clause License  Copyright (c) 2023, Ren\u00e9 Horn  Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:  1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.  2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.  3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ",
    "summary": "Multiprocess Framework for Server and Mobiles; run your generator output and server on every CPU core,",
    "version": "1.0",
    "project_urls": {
        "documentation": "https://eisenmp.readthedocs.io/",
        "homepage": "https://github.com/44xtc44",
        "repository": "https://github.com/44xtc44/eisenmp"
    },
    "split_keywords": [
        "multiprocess framework",
        "python multiprocessor framework"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "8d37fec4bb07dd013cdb22e137aabd2b853bdbb94917d50ec868934cb4e6daf7",
                "md5": "2b7c8cee66edbc30d7af7d99809dbf8a",
                "sha256": "6ac2f9939af14be51bea6f333a90ebd6630e814212f2a7ea3163484ae58ee521"
            },
            "downloads": -1,
            "filename": "eisenmp-1.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "2b7c8cee66edbc30d7af7d99809dbf8a",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.7",
            "size": 20292,
            "upload_time": "2023-04-28T19:33:36",
            "upload_time_iso_8601": "2023-04-28T19:33:36.960157Z",
            "url": "https://files.pythonhosted.org/packages/8d/37/fec4bb07dd013cdb22e137aabd2b853bdbb94917d50ec868934cb4e6daf7/eisenmp-1.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "7ea042972aa575624687736cae5f7a3970b61786074f53af49cf679f73ff4fb7",
                "md5": "526a3f7a6835bdf282c431013284d5de",
                "sha256": "31958d317c1181c71c5ca1dc9941e1eee7f36bcccec58864dec2794a3d459ad9"
            },
            "downloads": -1,
            "filename": "eisenmp-1.0.tar.gz",
            "has_sig": false,
            "md5_digest": "526a3f7a6835bdf282c431013284d5de",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.7",
            "size": 70488,
            "upload_time": "2023-04-28T19:33:41",
            "upload_time_iso_8601": "2023-04-28T19:33:41.849896Z",
            "url": "https://files.pythonhosted.org/packages/7e/a0/42972aa575624687736cae5f7a3970b61786074f53af49cf679f73ff4fb7/eisenmp-1.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-04-28 19:33:41",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "github_user": "44xtc44",
    "github_project": "eisenmp",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "tox": true,
    "lcname": "eisenmp"
}
        
Elapsed time: 0.15803s