{ "info": { "author": "Benjamin M. Gyori", "author_email": "benjamin_gyori@hms.harvard.edu", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Environment :: Console", "Intended Audience :: Science/Research", "License :: OSI Approved :: BSD License", "Operating System :: OS Independent", "Programming Language :: Python :: 3" ], "description": "PyKQML\n======\n\nPyKQML is an implementation of KQML messaging in Python.\n\nInstallation\n============\n\nPyKQML can be installed as\n\n::\n\n pip install pykqml\n\nNote that releases of PyKQML up to 0.5 work in Python 2 only, whereas\nreleases above and including 1.0 work in Python 3 only.\n\nTo install for Python 2, use:\n\n::\n\n pip install pykqml==0.5\n\nTo install for Python 3 (or force an upgrade to a compatible version),\nuse\n\n::\n\n pip install \"pykqml>0.5\"\n\nUsage\n=====\n\nPyKQML implements the following KQML classes, which allow constructing\nand manipulating KQML messages programmatically:\n\n::\n\n KQMLToken\n KQMLString\n KQMLQuotation\n KQMLList\n KQMLPerformative\n KQMLReader\n KQMLDispatcher\n KQMLModule\n\nYou can import KQML classes as, for instance,\n\n.. code:: python\n\n from kqml import KQMLList\n\nYou can create a new KQML messaging agent in the context of the TRIPS\nsystem as\n\n.. code:: python\n\n from kqml import KQMLModule\n\n class MyAgent(KQMLModule):\n name = \"MyAgent\" # This is the name of the agent to register with\n\n def __init__(self, **kwargs):\n # Call the parent class' constructor which sends a registration\n # message, setting the agent's name to be recognized by the\n # Facilitator.\n super(MyAgent, self).__init__(name=self.name, **kwargs)\n\n # Subscribe to REQUESTs of interest. The list will change\n # depending on the role of the agent\n for req in ('what-next', 'commit', 'evaluate'):\n self.subscribe_request(req)\n\n # Subscribe to TELLs of interest if needed. This list will change\n # depending on the role of the agent\n for tell in ('log-speechact', ):\n self.subscribe_tell(tell)\n\n # Now signal that the agent is ready to receive messages\n self.ready()\n\n # Finally, start the listener for incoming messages\n self.start()\n\n\n def receive_request(self, msg, content):\n # First, figure out what kind of request this is\n task = content.head().upper()\n # Here you typically decide what to do based on the\n # type of request.\n\n # Construct reply message's content\n reply_content = KQMLList()\n # Set whatever needs to be set in the reply content\n\n # Finally, wrap the content in a message and reply\n reply_msg = KQMLPerformative('reply')\n reply_msg.set('content', reply_content)\n self.reply(msg, reply_msg)\n\nTesting\n=======\n\nYou can run all tests by running `nosetests` in the top level folder.\n\n\n", "description_content_type": "", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "http://github.com/bgyori/pykqml", "keywords": "kqml,agent,nlp,communication,dialogue", "license": "", "maintainer": "", "maintainer_email": "", "name": "pykqml", "package_url": "https://pypi.org/project/pykqml/", "platform": "", "project_url": "https://pypi.org/project/pykqml/", "project_urls": { "Homepage": "http://github.com/bgyori/pykqml" }, "release_url": "https://pypi.org/project/pykqml/1.1/", "requires_dist": null, "requires_python": "", "summary": "KQML messaging classes in Python.", "version": "1.1" }, "last_serial": 4962190, "releases": { "0.1": [ { "comment_text": "", "digests": { "md5": "77977fa9c9d153875b41e2393079c4f6", "sha256": "83a30b2b794cc9734832d71c8207faf9f5d02c8f992c6fe363355799cfc5523b" }, "downloads": -1, "filename": "pykqml-0.1.tar.gz", "has_sig": false, "md5_digest": "77977fa9c9d153875b41e2393079c4f6", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7289, "upload_time": "2016-12-07T22:41:14", "url": "https://files.pythonhosted.org/packages/05/23/5e72bab74116d7f03efc4cc48efc6baf9cc5385efc0c5f3d04dbf12aa396/pykqml-0.1.tar.gz" } ], "0.4": [ { "comment_text": "", "digests": { "md5": "0a2482e75460759a1fe62dfc50dd90b8", "sha256": "d0f7774daccb8710d91355ac483a4f9ae22783b764b3bb1d5b92a7216ac283ce" }, "downloads": -1, "filename": "pykqml-0.4.tar.gz", "has_sig": false, "md5_digest": "0a2482e75460759a1fe62dfc50dd90b8", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8980, "upload_time": "2017-09-17T06:16:45", "url": "https://files.pythonhosted.org/packages/46/8a/6821dda8d1f73f37f556b815d59253b52c3daeb30384e3d85eae06d4a4c5/pykqml-0.4.tar.gz" } ], "0.5": [ { "comment_text": "", "digests": { "md5": "1f41a561a91bcc05d4d54d3debbdbbef", "sha256": "8153024518c8cb38153eeccfbcb3c300b4096c34fe9316e890dfa440ae8c8eff" }, "downloads": -1, "filename": "pykqml-0.5.tar.gz", "has_sig": false, "md5_digest": "1f41a561a91bcc05d4d54d3debbdbbef", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9431, "upload_time": "2018-02-13T15:13:18", "url": "https://files.pythonhosted.org/packages/6b/b3/513119a9c40911132cd6f517975a69b54e23ebe1274298fc561384c3cb77/pykqml-0.5.tar.gz" } ], "1.0": [ { "comment_text": "", "digests": { "md5": "d0fa5a169b1569df788a181e7ce90ddb", "sha256": "e25625163446b866e5ffa4e16aa6368b964b8aa501f8b2548e14649206e00069" }, "downloads": -1, "filename": "pykqml-1.0.tar.gz", "has_sig": false, "md5_digest": "d0fa5a169b1569df788a181e7ce90ddb", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 10088, "upload_time": "2018-02-21T04:24:15", "url": "https://files.pythonhosted.org/packages/4f/f8/b4f1d83dc270de58272c554dda92e515c152195e27ce924689278ec82f15/pykqml-1.0.tar.gz" } ], "1.1": [ { "comment_text": "", "digests": { "md5": "b4403481a67ec7f1b6741b374950b605", "sha256": "6f7c1b241fd36d249c3a7d5ddbe0f2c0e54f1769ae9ff55892e7800ecf69a5c6" }, "downloads": -1, "filename": "pykqml-1.1-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "b4403481a67ec7f1b6741b374950b605", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 15071, "upload_time": "2019-03-20T06:09:09", "url": "https://files.pythonhosted.org/packages/b2/bd/6e1788cf8043ef921d6be7fbcc1db4f867fcfb0dcb020e47a02522623d58/pykqml-1.1-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "64222abf974fe3f336e9c05c3c064412", "sha256": "3df542f3ee6e43c261a5161d3016d1aef3367f98d5e6031e26591c841bd379d3" }, "downloads": -1, "filename": "pykqml-1.1.tar.gz", "has_sig": false, "md5_digest": "64222abf974fe3f336e9c05c3c064412", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 12337, "upload_time": "2019-03-20T06:09:11", "url": "https://files.pythonhosted.org/packages/c1/77/e17d52182b5208f33d9538217733779bea81b23436d5965f1aba9b0e2481/pykqml-1.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "b4403481a67ec7f1b6741b374950b605", "sha256": "6f7c1b241fd36d249c3a7d5ddbe0f2c0e54f1769ae9ff55892e7800ecf69a5c6" }, "downloads": -1, "filename": "pykqml-1.1-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "b4403481a67ec7f1b6741b374950b605", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 15071, "upload_time": "2019-03-20T06:09:09", "url": "https://files.pythonhosted.org/packages/b2/bd/6e1788cf8043ef921d6be7fbcc1db4f867fcfb0dcb020e47a02522623d58/pykqml-1.1-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "64222abf974fe3f336e9c05c3c064412", "sha256": "3df542f3ee6e43c261a5161d3016d1aef3367f98d5e6031e26591c841bd379d3" }, "downloads": -1, "filename": "pykqml-1.1.tar.gz", "has_sig": false, "md5_digest": "64222abf974fe3f336e9c05c3c064412", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 12337, "upload_time": "2019-03-20T06:09:11", "url": "https://files.pythonhosted.org/packages/c1/77/e17d52182b5208f33d9538217733779bea81b23436d5965f1aba9b0e2481/pykqml-1.1.tar.gz" } ] }