{ "info": { "author": "Enioluwa Segun", "author_email": "enioluwasegun@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 3 - Alpha", "Intended Audience :: Developers", "Intended Audience :: Education", "Intended Audience :: End Users/Desktop", "License :: OSI Approved :: Apache Software License", "Operating System :: OS Independent", "Programming Language :: Python :: 2", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.2", "Programming Language :: Python :: 3.3", "Programming Language :: Python :: 3.4", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3.7" ], "description": "# Wordplay\r\n\r\n[![Build Status](https://travis-ci.org/enioluwa23/wordplay.svg?branch=master)](https://travis-ci.org/enioluwa23/wordplay) [![PyPI version](https://img.shields.io/pypi/v/wordplay.svg)](https://pypi.org/project/wordplay/) [![Supported versions](https://img.shields.io/pypi/wheel/wordplay.svg)](https://pypi.org/project/wordplay/) [![PyPI version](https://img.shields.io/pypi/pyversions/wordplay.svg)](https://pypi.org/project/wordplay/)\r\n\r\nPython package for word searching utilities.\r\n\r\nUsing a convenient API, you can filter a set of strings with detailed criteria. There are also more scrabble-like features such as getting all anagrams of a word.\r\n\r\n## Install\r\n\r\n```bash\r\npip install wordplay\r\n```\r\n\r\n## Background\r\n\r\nI initially built this as an algorithm solely to help my endeavors in word games such as Scrabble. It was useful for finding word combinations in every type of situation. However, I realized it could be used for many other purposes, such as filtering email addresses, phone numbers and any set of data really. So I decided to decouple the API from my personal use.\r\n\r\n## Usage\r\n\r\nWords are stored in a `Dictionary` object. Initialize the dictionary with a [`set`](https://docs.python.org/2/library/stdtypes.html#set) of strings (there are no restrictions on what the string can contain) or `Dictionary()` with no arguments to use the word set sourced from [here](https://github.com/dwyl/english-words). In the future, I will amass a couple of word lists and make them options for initializing the dictionary.\r\n\r\nIf you do want restrictions on the string, see the documentation for the [`Utils`](https://enioluwa23.github.io/wordplay/api/utils/) module. For complex query parameters, you can use a `Criteria` object. The class uses the builder pattern, making it easy to construct search parameters.\r\n\r\nHere is a an example file:\r\n\r\n```python\r\nfrom __future__ import print_function\r\nfrom wordplay.dictionary import Dictionary\r\nfrom wordplay.criteria import Criteria\r\n\r\n\r\ndef main():\r\n dictionary = Dictionary()\r\n\r\n result = dictionary.get_words_with_any_letters('diction', 6)\r\n print(result)\r\n # ['diotic', 'dition', 'indico', 'indict', 'nidiot', 'odinic']\r\n\r\n result = dictionary.get_words_with_any_letters('pox')\r\n print(result)\r\n # ['o', 'op', 'ox', 'p', 'po', 'pox', 'x']\r\n\r\n result = dictionary.get_anagrams('aekst')\r\n print(result)\r\n # ['keats', 'skate', 'skeat', 'stake', 'steak', 'takes', 'teaks']\r\n\r\n print('car' in dictionary) # Dictionary is directly iterable\r\n # True\r\n\r\n criteria = Criteria()\r\n criteria.begins_with('c').ends_with('s').contains('or')\r\n criteria.contains_at(('o', 2), ('r', 4)).size_is(10)\r\n result = dictionary.get_words(criteria)\r\n print(result)\r\n # ['corrosives', 'correlates', 'corrugates']\r\n\r\n\r\nif __name__ == '__main__':\r\n main()\r\n```\r\n\r\nFor further example usage see the [Documentation](https://enioluwa23.github.io/wordplay/).\r\n\r\nTo run tests, use `pytest`.\r\n\r\n## Documentation\r\n\r\n[API Reference](https://enioluwa23.github.io/wordplay/)\r\n\r\n## License\r\n\r\n[Apache Software License](https://github.com/enioluwa23/wordplay/blob/master/LICENSE)\r\n\r\n\r\n", "description_content_type": "", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/enioluwa23/wordplay", "keywords": "dictionary word scrabble lookup search criteria", "license": "", "maintainer": "", "maintainer_email": "", "name": "wordplay", "package_url": "https://pypi.org/project/wordplay/", "platform": "", "project_url": "https://pypi.org/project/wordplay/", "project_urls": { "Homepage": "https://github.com/enioluwa23/wordplay" }, "release_url": "https://pypi.org/project/wordplay/1.0.0a4/", "requires_dist": [ "enum34", "check-manifest; extra == 'dev'", "pytest; extra == 'test'", "tox; extra == 'test'" ], "requires_python": "", "summary": "Easy word filtering and searching from a custom set of words", "version": "1.0.0a4" }, "last_serial": 4267388, "releases": { "1.0.0a1": [ { "comment_text": "", "digests": { "md5": "14a2297ff47c7e6349c0dd8e1f632409", "sha256": "e45629b58754068d17bc2bb6d50f4bb89d180d2d5e5ec5972fde32f2a3493961" }, "downloads": -1, "filename": "wordplay-1.0.0a1-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "14a2297ff47c7e6349c0dd8e1f632409", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 1111230, "upload_time": "2018-08-03T20:16:49", "url": "https://files.pythonhosted.org/packages/a8/6b/be4445f564d86997421d9f8c3a93c4d15804d7b2608bfea4a6f1cfb18a2c/wordplay-1.0.0a1-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "cf042de2495d4d939065e76a8287df71", "sha256": "770e409eb8e39641dfd7d5292a6574b2f13d3cf2b6b141b87b93ac206d6f050f" }, "downloads": -1, "filename": "wordplay-1.0.0a1.tar.gz", "has_sig": false, "md5_digest": "cf042de2495d4d939065e76a8287df71", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 1114752, "upload_time": "2018-08-03T20:16:51", "url": "https://files.pythonhosted.org/packages/50/04/f60c1e3c91e1d21993ace14f77644d468905aef87f76dec019714291b32b/wordplay-1.0.0a1.tar.gz" } ], "1.0.0a2": [ { "comment_text": "", "digests": { "md5": "fc4a5f0d17875b0b08242f79da70f93e", "sha256": "75aa7b5ad24206282b59a04a8c85b1e8d8ae5d247dc32c3d273d8489cc868eb3" }, "downloads": -1, "filename": "wordplay-1.0.0a2-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "fc4a5f0d17875b0b08242f79da70f93e", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 2467208, "upload_time": "2018-09-08T13:40:26", "url": "https://files.pythonhosted.org/packages/f0/60/4e6e533da72c810f3ee4ac3527997c57205c17b3dba0d552f6f071602524/wordplay-1.0.0a2-py2.py3-none-any.whl" } ], "1.0.0a3": [ { "comment_text": "", "digests": { "md5": "5885eecc6ff01c0e3c131255a75a5fb1", "sha256": "aed16493606acc8d229d3f0935faa9d812eef77b3601918ade6b859e90356c6f" }, "downloads": -1, "filename": "wordplay-1.0.0a3-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "5885eecc6ff01c0e3c131255a75a5fb1", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 2467147, "upload_time": "2018-09-13T04:18:24", "url": "https://files.pythonhosted.org/packages/b5/24/b9565ab407c9e9c3d778d2c1ae7c5159b833b508bdc303435e3d164924e1/wordplay-1.0.0a3-py2.py3-none-any.whl" } ], "1.0.0a4": [ { "comment_text": "", "digests": { "md5": "0b6d5782551f22ab7c575fe2eca2e036", "sha256": "ffdf96d4c30f46e278238b1fa3b08cd92a1631f306985f13f4e1e31d0a7e1998" }, "downloads": -1, "filename": "wordplay-1.0.0a4-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "0b6d5782551f22ab7c575fe2eca2e036", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 2467150, "upload_time": "2018-09-13T04:23:22", "url": "https://files.pythonhosted.org/packages/43/f7/404a6cdf6bc13071fbf1f5af0063b23f5690ceedba9ab27c38ba795ea8e1/wordplay-1.0.0a4-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "3a49be1294c905d4c0378809425b215b", "sha256": "30895143461510e571c16bae44625000baf1715b1db3d04a16347909322032b6" }, "downloads": -1, "filename": "wordplay-1.0.0a4.tar.gz", "has_sig": false, "md5_digest": "3a49be1294c905d4c0378809425b215b", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2458577, "upload_time": "2018-09-13T04:23:25", "url": "https://files.pythonhosted.org/packages/30/a0/0a692aa8236fd8b3fb71fa77eda7e6d33148996622c5833c3437f5376f07/wordplay-1.0.0a4.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "0b6d5782551f22ab7c575fe2eca2e036", "sha256": "ffdf96d4c30f46e278238b1fa3b08cd92a1631f306985f13f4e1e31d0a7e1998" }, "downloads": -1, "filename": "wordplay-1.0.0a4-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "0b6d5782551f22ab7c575fe2eca2e036", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 2467150, "upload_time": "2018-09-13T04:23:22", "url": "https://files.pythonhosted.org/packages/43/f7/404a6cdf6bc13071fbf1f5af0063b23f5690ceedba9ab27c38ba795ea8e1/wordplay-1.0.0a4-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "3a49be1294c905d4c0378809425b215b", "sha256": "30895143461510e571c16bae44625000baf1715b1db3d04a16347909322032b6" }, "downloads": -1, "filename": "wordplay-1.0.0a4.tar.gz", "has_sig": false, "md5_digest": "3a49be1294c905d4c0378809425b215b", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2458577, "upload_time": "2018-09-13T04:23:25", "url": "https://files.pythonhosted.org/packages/30/a0/0a692aa8236fd8b3fb71fa77eda7e6d33148996622c5833c3437f5376f07/wordplay-1.0.0a4.tar.gz" } ] }