{ "info": { "author": "Tomasz Prus", "author_email": "tomasz.prus@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Environment :: Console", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", "Programming Language :: Python", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6" ], "description": "Wordbook\n========\n\nWordbook is a Python asynchronous library to query Dict servers. It implements the main parts of DICT protocol (`RFC 2229`).\n\nThe library consists two classes:\n\n* **DictBase**: which implements commands from RFC2229.\n* **Wordbook**: which exposes more abstract methods to find a definition within dictionaries.\n\nBoth classes are asynchronous and require Python 3.5+.\n\n\nInstallation\n------------\n\nTo install from pypi\n\n.. code-block:: bash\n\n $ sudo pip install wordbook\n\nor from source:\n\n.. code-block:: bash\n\n $ sudo python setup.py install\n\n\nExamples\n--------\n\nGetting information from a server using the *DictBase* class:\n\n.. code-block:: pycon\n\n import asyncio\n import wordbook\n\n\n async def main():\n dictb = wordbook.DictBase()\n await dictb.connect()\n await dictb.client('wordbook/server-status.py')\n info = await dictb.show_server()\n for line in info:\n print(line)\n\n\n if __name__ == \"__main__\":\n loop = asyncio.get_event_loop()\n loop.run_until_complete(main())\n loop.close()\n\nOutput:\n\n.. code-block::\n\n dictd 1.12.1/rf on Linux 4.10.0-30-generic\n On LT19758: up 07:55:45, 5 forks (0.6/hour)\n\n Database Headwords Index Data Uncompressed\n gcide 203645 3859 kB 12 MB 38 MB\n wn 147311 3002 kB 9247 kB 29 MB\n moby-thesaurus 30263 528 kB 10 MB 28 MB\n\n\nGetting definition of word *mock* using the *WordBookDatabase* class: \n\n.. code-block:: pycon\n\n import asyncio\n import wordbook\n\n async def main():\n wb = wordbook.WordBookDatabase('wn')\n await wb.connect()\n lines = await wb.define('mock')\n for line in lines:\n print(line)\n \n if __name__ == \"__main__\":\n loop = asyncio.get_event_loop()\n loop.run_until_complete(main())\n loop.close()\n\nOutput:\n\n.. code-block::\n\n [\"mock\" wn \"WordNet (r) 3.0 (2006)\"]\n mock\n adj 1: constituting a copy or imitation of something; \"boys in\n mock battle\"\n n 1: the act of mocking or ridiculing; \"they made a mock of him\"\n v 1: treat with contempt; \"The new constitution mocks all\n democratic principles\" [syn: {mock}, {bemock}]\n 2: imitate with mockery and derision; \"The children mocked their\n handicapped classmate\"\n\nYou can find more examples in directory *example/*.\n\n\nResources\n---------\n\n* The DICT Development Group - http://www.dict.org/\n* RFC 2229: https://tools.ietf.org/html/rfc2229\n", "description_content_type": null, "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "http://github.com/tomplus/wordbook", "keywords": "DICT", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "wordbook", "package_url": "https://pypi.org/project/wordbook/", "platform": "", "project_url": "https://pypi.org/project/wordbook/", "project_urls": { "Homepage": "http://github.com/tomplus/wordbook" }, "release_url": "https://pypi.org/project/wordbook/1.0.0/", "requires_dist": null, "requires_python": "", "summary": "Python client for DICT Servers", "version": "1.0.0" }, "last_serial": 3098788, "releases": { "1.0.0": [ { "comment_text": "", "digests": { "md5": "16a089193dcca1ee09d1ec65f4ba3891", "sha256": "384e866a7b8d29629912773fccce728228f28707a4ab6602112255e50e9048f5" }, "downloads": -1, "filename": "wordbook-1.0.0.tar.gz", "has_sig": false, "md5_digest": "16a089193dcca1ee09d1ec65f4ba3891", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4766, "upload_time": "2017-08-15T18:10:44", "url": "https://files.pythonhosted.org/packages/6d/c1/326a9f3ed69c4cf2250641fc07c5c9a205ed00af36f715152d16d57e7823/wordbook-1.0.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "16a089193dcca1ee09d1ec65f4ba3891", "sha256": "384e866a7b8d29629912773fccce728228f28707a4ab6602112255e50e9048f5" }, "downloads": -1, "filename": "wordbook-1.0.0.tar.gz", "has_sig": false, "md5_digest": "16a089193dcca1ee09d1ec65f4ba3891", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4766, "upload_time": "2017-08-15T18:10:44", "url": "https://files.pythonhosted.org/packages/6d/c1/326a9f3ed69c4cf2250641fc07c5c9a205ed00af36f715152d16d57e7823/wordbook-1.0.0.tar.gz" } ] }