{ "info": { "author": "Arewa Olakunle", "author_email": "arewa.olakunle@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Environment :: Console", "Intended Audience :: Developers", "License :: OSI Approved :: BSD License", "Operating System :: POSIX", "Operating System :: Unix", "Programming Language :: Python", "Programming Language :: Python :: 2", "Programming Language :: Python :: 3", "Topic :: Software Development :: Libraries :: Python Modules" ], "description": "# inet\n\n**v0.2.4 has bug so you'll have to clone the head**\n\nA simple library built on top of zeromq to enable different python\nprograms talk over sockets. It works using three components\n*server*, *name service* and *client*. The main feature(or use) of this\nlibrary is its persistent name service\n\n\n### Name Service\nStart the inet server on command line\n```shell\n$ inetserver\n```\n\n### Server\nThe server is a function to respond to requests\n\n```python\nfrom inet.inetclient import InetClient\nfrom inet.server import RoutableServer\n\n# talks with the inet server\nproxy = InetClient('tcp://127.0.0.1:3014')\n\n# frontend address is what clients connect to while backend address(unix socket)\n# is what workers connect to\nserver = RoutableServer('testservice', proxy, 'tcp://127.0.0.1:4001',\n 'ipc:///tmp/inet.testservice.sock')\n\n\n@server.route('hello/world')\ndef hello(req, resp):\n resp.data['greeting'] = 'World'\n return resp\n\nserver.setup(localproxy=False)\n# spawn default(3) number of workers\nserver.spawnworkers()\nserver.loopforever()\n```\n\n### Client\n\n```python\nfrom inet.inetclient import InetClient\nfrom inet.client import Client\n\nproxy = InetClient('tcp://127.0.0.1:3014')\nclient = Client(proxy)\n\n# service name acts as protocol\nresp = client.get('testservice://hello/world')\nprint(resp.meta['status']) # 200\nprint(resp.data['greeting']) # 'World'\n```\n\n\n*N.B*: Notes that it uses gevent for managing workers", "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/danceasarxx/inet", "keywords": null, "license": "BSD", "maintainer": null, "maintainer_email": null, "name": "gakp-inet", "package_url": "https://pypi.org/project/gakp-inet/", "platform": "any", "project_url": "https://pypi.org/project/gakp-inet/", "project_urls": { "Download": "UNKNOWN", "Homepage": "https://github.com/danceasarxx/inet" }, "release_url": "https://pypi.org/project/gakp-inet/0.2.9/", "requires_dist": null, "requires_python": null, "summary": "Stable old version of inet", "version": "0.2.9" }, "last_serial": 2226509, "releases": { "0.2.7": [], "0.2.9": [ { "comment_text": "", "digests": { "md5": "e9fe37e359abf773d26f2fafd87bea76", "sha256": "b9821e975620a59cba0ab34abeb6c4b560db35d570e737e1953778a55b5b7e22" }, "downloads": -1, "filename": "gakp_inet-0.2.9-py3-none-any.whl", "has_sig": false, "md5_digest": "e9fe37e359abf773d26f2fafd87bea76", "packagetype": "bdist_wheel", "python_version": "3.4", "requires_python": null, "size": 11754, "upload_time": "2016-07-17T04:41:09", "url": "https://files.pythonhosted.org/packages/0c/9e/05bff4143692bf9b24f2a1ab019bfea3fee05cb259e5c957d926602f01c8/gakp_inet-0.2.9-py3-none-any.whl" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "e9fe37e359abf773d26f2fafd87bea76", "sha256": "b9821e975620a59cba0ab34abeb6c4b560db35d570e737e1953778a55b5b7e22" }, "downloads": -1, "filename": "gakp_inet-0.2.9-py3-none-any.whl", "has_sig": false, "md5_digest": "e9fe37e359abf773d26f2fafd87bea76", "packagetype": "bdist_wheel", "python_version": "3.4", "requires_python": null, "size": 11754, "upload_time": "2016-07-17T04:41:09", "url": "https://files.pythonhosted.org/packages/0c/9e/05bff4143692bf9b24f2a1ab019bfea3fee05cb259e5c957d926602f01c8/gakp_inet-0.2.9-py3-none-any.whl" } ] }