{ "info": { "author": "Tim Guite", "author_email": "magpieembedded@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 2 - Pre-Alpha", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Natural Language :: English", "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3.7" ], "description": "===========\npysimpleapp\n===========\n\n\n.. image:: https://img.shields.io/pypi/v/pysimpleapp.svg\n :target: https://pypi.python.org/pypi/pysimpleapp\n\n.. image:: https://img.shields.io/travis/MagpieEmbedded/pysimpleapp.svg\n :target: https://travis-ci.org/MagpieEmbedded/pysimpleapp\n\n.. image:: https://readthedocs.org/projects/pysimpleapp/badge/?version=latest\n :target: https://pysimpleapp.readthedocs.io/en/latest/?badge=latest\n :alt: Documentation Status\n\n\n\n\nSimple framework for applications in python\n\nAims\n----\n\nThis package is intended to provide the basic components for applications in Python.\nIt provides a white box implementation of multi threaded applications.\n\n**pysimpleapp** welcomes additional base classes and implementations of application methodologies.\n\nThere is often more than one way to do something and **pysimpleapp** tries to support\nthat by providing building blocks rather than solutions.\n\nIt is intended to be GUI framework agnostic, although some common frameworks have been included for demonstration and ease of use.\n\nThere should also be a relatively thorough set of tutorials alongside the main code.\nThis will teach how to use the software and explain why the software is this way.\n\n\n* Source code: https://github.com/MagpieEmbedded/pysimpleapp\n* Documentation: https://pysimpleapp.readthedocs.io.\n* Free software: MIT license\n\nInstallation\n------------\n\n**pysimpleapp** is hosted on `PyPi `_ so can be installed with:\n\n.. code-block bash\n\n pip install pysimpleapp\n\nSimple Examples\n---------------\n\nBelow are some simple examples which have been prepared.\n\nTo understand how they work and how to build more complex applications, please visit the **tutorials** section of the documentation.\n\nThreads\n^^^^^^^\n\nOpen a python session with **pysimpleapp** installed.\n\nImport libraries and classes:\n\n.. code-block:: python\n\n from pysimpleapp.message import Message\n from pysimpleapp.threads.examples import ExampleSingleRunThread, ExampleMultiRunThread\n from queue import Queue\n from threading import Thread\n\nThreads take a name as the first argument, owner name as the second argument and an input and\noutput queue for communication.\nTheir use will be demonstrated shortly but you can confirm that they inherit from the\n`threading.Thread `_ class.\n\nLet's create the input and output queues and an instance of the ExampleSingleRunThread class:\n\n.. code-block:: python\n\n in_queue = Queue()\n out_queue = Queue()\n single_run = ExampleSingleRunThread('Name', 'Owner', in_queue, out_queue)\n isinstance(single_run, Thread) # returns True\n\nNow, send the singe_run thread a start command.\nThreads in **pysimpleapp** often have some built in commands, but it is very easy to override these and add your own later.\n\nIt is also essential to define how you want a thread to behave through it's *main* function.\nThe ExampleSingleRunThread has been defined to print that it has run.\n\nPut a start message in the input queue:\n\n.. code-block:: python\n\n # Note the order of owner and name because we are sending from the owner\n in_queue.put(Message('Owner', 'Name', 'THREAD_START', None))\n\nThis should print: ::\n\n Running single run thread...\n\ndemonstrating that the thread has run!\n\nYou will also notice that if you send another start command, nothing happens.\nSingle Run Threads execute once and then stop.\n\nNext, make an instance of ExampleMultiRunThread:\n\n.. code-block:: python\n\n multi_run = ExampleMultiRunThread('Name2', 'Owner', in_queue, out_queue)\n\nMulti Run Threads will run until they are told to end.\nTest that functionality by providing several messages:\n\n.. code-block:: python\n\n in_queue.put(Message('Owner', 'Name2', 'THREAD_START', None))\n in_queue.put(Message('Owner', 'Name2', 'THREAD_START', None))\n in_queue.put(Message('Owner', 'Name2', 'THREAD_START', None))\n\nYou will see that the thread has been counting how many times you asked it to run!\n\nEnd the thread with another built in command:\n\n.. code-block:: python\n\n in_queue.put(Message('Owner', 'Name2', 'THREAD_END', None))\n\nAfter this, the thread has stopped and will no longer respond to messages.\n\nThis has been a very short introduction to some example threds but there is much more to come!\nContinue learning with the **tutorials** and soon you will be making your own threads for specific requirements.\n\nFeatures\n--------\n\n* TODO\n* Attempt to implement best practices\n* Documentation and tutorials\n\nCredits\n-------\n\nThis package was created with Cookiecutter_ and the `audreyr/cookiecutter-pypackage`_ project template.\n\n.. _Cookiecutter: https://github.com/audreyr/cookiecutter\n.. _`audreyr/cookiecutter-pypackage`: https://github.com/audreyr/cookiecutter-pypackage\n\n\n=======\nHistory\n=======\n\n0.1.0 (2019-07-06)\n------------------\n\n* First release on PyPI.\n\n\n", "description_content_type": "", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/MagpieEmbedded/pysimpleapp", "keywords": "pysimpleapp", "license": "MIT license", "maintainer": "", "maintainer_email": "", "name": "pysimpleapp", "package_url": "https://pypi.org/project/pysimpleapp/", "platform": "", "project_url": "https://pypi.org/project/pysimpleapp/", "project_urls": { "Homepage": "https://github.com/MagpieEmbedded/pysimpleapp" }, "release_url": "https://pypi.org/project/pysimpleapp/0.1.3/", "requires_dist": null, "requires_python": "", "summary": "Simple framework for applications in python", "version": "0.1.3" }, "last_serial": 5513451, "releases": { "0.1.2": [ { "comment_text": "", "digests": { "md5": "5f195e4aa9bb56697cc885b16ee70f75", "sha256": "c10945d79be179d70392fd1de08dbb76880898f15a15e07e58e4bd007292b854" }, "downloads": -1, "filename": "pysimpleapp-0.1.2-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "5f195e4aa9bb56697cc885b16ee70f75", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 7042, "upload_time": "2019-07-08T18:03:34", "url": "https://files.pythonhosted.org/packages/db/d2/6ccc238be24f03556fd904c6d7747f50665a5116fd5b79dd71c00d9a01bc/pysimpleapp-0.1.2-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "c87329e3754a4e931a74e59a9ca848bb", "sha256": "a46f9461aa7dfec40e24f7cb971dabae578a0924db0d56bd265184bac3589b08" }, "downloads": -1, "filename": "pysimpleapp-0.1.2.tar.gz", "has_sig": false, "md5_digest": "c87329e3754a4e931a74e59a9ca848bb", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 17137, "upload_time": "2019-07-08T18:03:37", "url": "https://files.pythonhosted.org/packages/8e/3a/44f7152596caf4a295f1c380ab191955cbc3c63ef9330f5d28b18391cd98/pysimpleapp-0.1.2.tar.gz" } ], "0.1.3": [ { "comment_text": "", "digests": { "md5": "1e161bae39c996b94939366cf7facf70", "sha256": "8b37139f070ed599bf97baca9a0b0296422889c1ef3e31482fd5af1630df6601" }, "downloads": -1, "filename": "pysimpleapp-0.1.3-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "1e161bae39c996b94939366cf7facf70", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 11624, "upload_time": "2019-07-10T18:32:41", "url": "https://files.pythonhosted.org/packages/89/54/1c41934062a7817f355102d2e9302630eee62c03a4dba2b7ffb56fb7589b/pysimpleapp-0.1.3-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "4902c54352e44fd2c8093dd3c3b2e191", "sha256": "77d35383bbf20fe972064094235cfc11abe8500cc163f98bf82afa451f19bf5d" }, "downloads": -1, "filename": "pysimpleapp-0.1.3.tar.gz", "has_sig": false, "md5_digest": "4902c54352e44fd2c8093dd3c3b2e191", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 22870, "upload_time": "2019-07-10T18:32:43", "url": "https://files.pythonhosted.org/packages/ba/65/6cc6c8985802dc8595c9456e107353b9a2eb53f91de301d39ea6da264a1a/pysimpleapp-0.1.3.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "1e161bae39c996b94939366cf7facf70", "sha256": "8b37139f070ed599bf97baca9a0b0296422889c1ef3e31482fd5af1630df6601" }, "downloads": -1, "filename": "pysimpleapp-0.1.3-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "1e161bae39c996b94939366cf7facf70", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 11624, "upload_time": "2019-07-10T18:32:41", "url": "https://files.pythonhosted.org/packages/89/54/1c41934062a7817f355102d2e9302630eee62c03a4dba2b7ffb56fb7589b/pysimpleapp-0.1.3-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "4902c54352e44fd2c8093dd3c3b2e191", "sha256": "77d35383bbf20fe972064094235cfc11abe8500cc163f98bf82afa451f19bf5d" }, "downloads": -1, "filename": "pysimpleapp-0.1.3.tar.gz", "has_sig": false, "md5_digest": "4902c54352e44fd2c8093dd3c3b2e191", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 22870, "upload_time": "2019-07-10T18:32:43", "url": "https://files.pythonhosted.org/packages/ba/65/6cc6c8985802dc8595c9456e107353b9a2eb53f91de301d39ea6da264a1a/pysimpleapp-0.1.3.tar.gz" } ] }