{ "info": { "author": "Tony Walker", "author_email": "walkr.walkr@gmail.com", "bugtrack_url": null, "classifiers": [ "License :: OSI Approved :: MIT License", "Programming Language :: Python" ], "description": "oi\n==\n\npython library for writing long running processes with a cli interface\n\n|Build Status|\n\n.. figure:: http://i.imgur.com/iH08GNq.png\n :alt: oi image\n\n oi image\n\nInstall\n~~~~~~~\n\nNote: You need `nanomsg `__\ninstalled on your system:\n\n.. code:: shell\n\n $ git clone git@github.com:nanomsg/nanomsg.git\n $ cd nanomsg\n $ ./configure\n $ make\n $ make check\n $ sudo make install\n\nThen install oi\n\n.. code:: shell\n\n $ pip install oi\n\nUsage\n~~~~~\n\n1. Write your long running program\n^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n\n.. code:: python\n\n # programd.py\n\n import oi\n\n program = oi.Program('my program', 'ipc:///tmp/program.sock')\n program.add_command('ping', lambda: 'pong')\n program.add_command('state', lambda: program.state)\n program.run() # program will run forever\n\n2. Add a ctl interface\n^^^^^^^^^^^^^^^^^^^^^^\n\n.. code:: python\n\n # programctl.py\n\n import oi\n\n ctl = oi.CtlProgram('ctl program', address='ipc:///tmp/program.sock')\n ctl.run()\n\n3. Run program, then connect to it via ctl\n^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n\n.. code:: shell\n\n # Run process\n $ python programd\n\n # OR with a configuration file\n $ python programd --config /etc/program.conf\n\n $ python programctl # enter ctl loop\n programctl > ping\n pong\n\n # OR ping end exit\n $ python programctl ping\n\nQuickly get started with a new project\n^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n\n.. code:: shell\n\n $ mkdir xprogram\n $ cd xprogram\n\n $ oi init\n $ make install\n\n # Start your program\n $ xprogramd\n\n # Start ctl program\n $ xprogramctl\n ctl > ping\n pong\n\n # Upload to pypi (Edit setup.py before distributing)\n $ make distribute\n\nNow the interesting bit. Are you ready?\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\nRun your program on one computer, then control it from another with a\nsingle line change (actually two).\n\nJust change the address ``ipc:///tmp/program.sock`` to a tcp address,\nsuch as ``tcp://192.168.1.100:5000`` in both your ``programd.py`` and\n``programctl.py``. That's it! (:\n\nTODO\n^^^^\n\n- [ ] Add more testing\n\nLicense\n^^^^^^^\n\nMIT License\n\n.. |Build Status| image:: https://travis-ci.org/walkr/oi.svg?branch=master\n :target: https://travis-ci.org/walkr/oi", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/walkr/oi", "keywords": null, "license": "MIT", "maintainer": null, "maintainer_email": null, "name": "oi", "package_url": "https://pypi.org/project/oi/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/oi/", "project_urls": { "Download": "UNKNOWN", "Homepage": "https://github.com/walkr/oi" }, "release_url": "https://pypi.org/project/oi/0.4.2/", "requires_dist": null, "requires_python": null, "summary": "A library for writing long running processes with a cli interface", "version": "0.4.2" }, "last_serial": 2002297, "releases": { "0.1.0": [ { "comment_text": "", "digests": { "md5": "9d2b8a8a6142b48a23c815dae3b257cc", "sha256": "695a11274a53400edcb81566dbc7150369f4ea96d61154122c5eabf4b3c67908" }, "downloads": -1, "filename": "oi-0.1.0.tar.gz", "has_sig": false, "md5_digest": "9d2b8a8a6142b48a23c815dae3b257cc", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4982, "upload_time": "2015-05-15T06:11:29", "url": "https://files.pythonhosted.org/packages/39/c1/b0afee3617a4aa4dd0c0f2cae53d9d1b8b0353121a027032725108620ba8/oi-0.1.0.tar.gz" } ], "0.2.0": [ { "comment_text": "", "digests": { "md5": "16e59b46dce761ff2ad01c0a785b9d3d", "sha256": "58c2cca50773c77ba7951afca93150150b30054664032a301cb196252723a5ce" }, "downloads": -1, "filename": "oi-0.2.0.tar.gz", "has_sig": false, "md5_digest": "16e59b46dce761ff2ad01c0a785b9d3d", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5457, "upload_time": "2015-05-15T23:48:55", "url": "https://files.pythonhosted.org/packages/75/0e/d833767a1cf17cba4b8878261685e22bb5b4381eac0e33161201fd284455/oi-0.2.0.tar.gz" } ], "0.2.1": [ { "comment_text": "", "digests": { "md5": "329806aa3cae7ef3220f404ad6dad083", "sha256": "5f3b1cd3b6d4c58e36aac5bf7856861c5f1e5293d67f574e5a4698652b299ecf" }, "downloads": -1, "filename": "oi-0.2.1.tar.gz", "has_sig": false, "md5_digest": "329806aa3cae7ef3220f404ad6dad083", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5477, "upload_time": "2015-05-15T23:56:46", "url": "https://files.pythonhosted.org/packages/95/54/3bc1e26621d920240f4a973d2e419c2c78f078057a7d15937ff3b4824e61/oi-0.2.1.tar.gz" } ], "0.3.0": [ { "comment_text": "", "digests": { "md5": "8c78e85e020535d962291813373b2900", "sha256": "58e3d98d13f6ddad1de78ed111b3325e864a1e6836848cea891a70cedefa4544" }, "downloads": -1, "filename": "oi-0.3.0.tar.gz", "has_sig": false, "md5_digest": "8c78e85e020535d962291813373b2900", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5807, "upload_time": "2015-05-16T01:27:31", "url": "https://files.pythonhosted.org/packages/a8/52/0bf127e28eea89f40cc7468aa9bdf73ea7e931fa2aeee35ffac2059a4329/oi-0.3.0.tar.gz" } ], "0.3.1": [], "0.3.2": [ { "comment_text": "", "digests": { "md5": "32e0bb3ed18221573973b1d8c71d5b32", "sha256": "e8bc223cc39e8655ac68a9f649a173801b53c68c783a724943f12daed11bec7b" }, "downloads": -1, "filename": "oi-0.3.2.tar.gz", "has_sig": false, "md5_digest": "32e0bb3ed18221573973b1d8c71d5b32", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5857, "upload_time": "2015-05-18T01:22:05", "url": "https://files.pythonhosted.org/packages/1a/06/a5dcf00a234680fbcfe379382c8617f849ed4743a5a632d2cc2602a2ec55/oi-0.3.2.tar.gz" } ], "0.3.5": [ { "comment_text": "", "digests": { "md5": "c1dd02dae28d2603b4255097202f981e", "sha256": "3fed97a1cd80c58b74bfa10eb78ca0d037bbee9768e27da22c78502c5fd380a4" }, "downloads": -1, "filename": "oi-0.3.5.tar.gz", "has_sig": false, "md5_digest": "c1dd02dae28d2603b4255097202f981e", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6600, "upload_time": "2015-05-19T03:22:40", "url": "https://files.pythonhosted.org/packages/aa/65/8beb95a377f83a6afc0d8f08da1f3d14b170e99b9a9eddbc22db7fdeda87/oi-0.3.5.tar.gz" } ], "0.3.6": [ { "comment_text": "", "digests": { "md5": "771b4d987f7f50125e698991722e8cc3", "sha256": "e1ad3559196da54f732cee6e5dd26a86d4342774250762953cdeb5a70aa888c0" }, "downloads": -1, "filename": "oi-0.3.6.tar.gz", "has_sig": false, "md5_digest": "771b4d987f7f50125e698991722e8cc3", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7844, "upload_time": "2015-05-20T04:52:49", "url": "https://files.pythonhosted.org/packages/c0/fe/011eafad1cd110d25edeb2f1ff47037ddaa17ce0af18e83fac4ebe997e49/oi-0.3.6.tar.gz" } ], "0.4.1": [ { "comment_text": "", "digests": { "md5": "6cbee60bd910fb988847ae5c28801345", "sha256": "976bc1867cb442e50bcfeb4a7c5c84d03b1d933471e927c49ee72b5280fac683" }, "downloads": -1, "filename": "oi-0.4.1.tar.gz", "has_sig": false, "md5_digest": "6cbee60bd910fb988847ae5c28801345", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8656, "upload_time": "2015-05-21T21:00:18", "url": "https://files.pythonhosted.org/packages/b7/00/14e1b453317adc950018594e254ad9887606de449258e1922bc9435f264c/oi-0.4.1.tar.gz" } ], "0.4.2": [ { "comment_text": "", "digests": { "md5": "7350837c87c8817278822c4cdffa22ce", "sha256": "c24f222c347d38b4f3a4c1e8048615c3dac08280a67e4ccbac9f41be46b12b71" }, "downloads": -1, "filename": "oi-0.4.2.tar.gz", "has_sig": false, "md5_digest": "7350837c87c8817278822c4cdffa22ce", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8829, "upload_time": "2016-03-11T23:20:21", "url": "https://files.pythonhosted.org/packages/27/6c/ff41ede99380c6f0f88f986b74c043fde3308d4b6b0068c6bf811880b01d/oi-0.4.2.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "7350837c87c8817278822c4cdffa22ce", "sha256": "c24f222c347d38b4f3a4c1e8048615c3dac08280a67e4ccbac9f41be46b12b71" }, "downloads": -1, "filename": "oi-0.4.2.tar.gz", "has_sig": false, "md5_digest": "7350837c87c8817278822c4cdffa22ce", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8829, "upload_time": "2016-03-11T23:20:21", "url": "https://files.pythonhosted.org/packages/27/6c/ff41ede99380c6f0f88f986b74c043fde3308d4b6b0068c6bf811880b01d/oi-0.4.2.tar.gz" } ] }