{ "info": { "author": "Jorge Sequeira", "author_email": "jsequeira03@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", "Programming Language :: Python", "Topic :: Software Development :: Libraries :: Python Modules" ], "description": "pyrhyme\n========\n\n``pyrhyme`` is a wrapper around the RhymeBrain_ api. It aims to provide a pythonic way for interacting with the RhymeBrain_ api.\n\n\nRequirements, Installing, and Compatibility\n-------------------------------------------\n\nThe only requirement, included in ``requirements.txt`` is for requests_. If you\nare using pip, you can install ``pyrhyme``:\n\n.. code-block:: bash\n\n $ pip install requests pyrhyme\n\nAlternatively:\n\n.. code-block:: bash\n\n $ pip install requests\n $ pip install -e git+https://github.com/GSejas/pyrhyme.git#egg=pyrhyme\n\nThen you should be off and running. ``pyrhyme`` has been tested against python\nversion 3.6.\n\n\nGetting Started\n---------------\n\nUsing ``pyrhyme`` is straightforward and aims provide interaction with\nthe api without any JSON interaction.\n\nThe entry point for interacting with Giphy_ api is the ``pyrhyme.RhymeBrain``\nclass. This class optionally accepts two arguments: ``api_key`` and ``strict``.\nThe ``api_key`` agument, when not preset, will default to the public key\n(see above). The ``strict`` argument controls how you expect the api to\nreact when no results are returned. If enabled, an exception is raised,\notherwise, ``None`` is returned.\n\n\n.. code-block:: python\n\n >>> import pyrhyme\n >>> g = pyrhyme.RhymeBrain()\n\nNow you're ready to get started. There are a few key methods of the\n``pyrhyme.RhymeBrain`` object that you'll want to know about\n\nrhymimg\n++++++\nSearch for rhymes with a given word. \n\nNote that this method is a RhymeWord generator. Optionally accepts a maximum number of results.\n\n- **word**: Word to search a rhyme for\n- **lang**: ISO639-1 language code (optional). Eg. en, de, es, fr, ru\n- **maxResults**: (optional) The number of results to return. If you do not include this parameter, RhymeBrain will choose how many words toshow based on how many good sounding rhymes there are for the word.\n\n\nrhyme_list\n+++++++++++\nSuppose you expect the `rhyming` method to just give you a list rather\nthan a generator. This method will have that effect. Equivalent to:\n\n.. code-block:: python\n\n >>> g = pyrhyme.RhymeBrain()\n >>> results = [x for x in g.rhymimg('foo')]\n\n\n\n------------------------------------------------------------------------------\n\n.. note::\n The above methods of ``pyrhyme.RhymeBrain`` are also exposed at the module\n level for your convenience. For example:\n\n .. code-block:: python\n\n >>> from pyrhyme import rhyming\n >>> img = rhyming('foo', lang='en')\n\n------------------------------------------------------------------------------\n\n\nHandling Results\n----------------\n\nAll results that represent a single image are wrapped in a\n``pyrhyme.RhymeWord`` object. This object acts like a dictionary, but\nalso exposes keys as attributes. Note, that these are **not** a direct\nmirror of api response objects; their goal is to be simpler. Structure\nfollows this layout::\n\n \n - word: The rhyming word\n - score: The RhymeRankTM score for the word.\n Scores of 300 and above are perfect rhymes.\n Scores between 0 and 300 are near rhymes without similar sounding consonents.\n Words with the same score are listed with the most matching sounds first. If you later sort by score again, it is best to preserve this ordering before showing the results to the user.\n - flags: A list of letters giving more information about the word.\n a: The word is offensive.\n b: The word might be found in most dictionaries.\n c: The pronunciation is known with confidence. It was not automatically generated.\n - syllables: An estimate of the number of syllables in the rhyming word.\n - freq: A number that tells you how common the word is. The number is a logarithm of the frequency of usage in common texts. Currently, the highest possible value is 34.\n\n\n - pron: The result is a string containing the phonetic transcription of the word. \n The arpabet format used is described here. The flags indicate whether the pronunciation is \n automatically generated or not. An automatically generated pronunciation might not be accurate.\n - ipa: The phonetic transcription using the International Phonetic Alphabet.\n This transcription might contain unicode characters. Since the response is in JSON format, \n the unicode characters are encoded using the \\\\u syntax.\n\n - combined: nOne or two possible spellings of the portmanteau. When there is more \n than one possibility, they are separated by a comma.\n - source: The two words contained in the the portmanteau, separated by a comma.\n\nFor example:\n\n.. code-block:: python\n\n >>> from pyrhyme import rhyme\n >>> r = rhyme('foo')\n >>> r.word\n\n\nChangelog\n---------\n\n0.1\n+++\n\n- Initial Version\n\n\nContribution and License\n------------------------\n\nDeveloped by `Jorge Sequeira`_ and is licensed under the terms of a MIT license.\nContributions are welcomed and appreciated!\n\n\n.. _RhymeBrain: https://rhymebrain.com\n.. _requests: https://pypi.python.org/pypi/requests/1.2.3\n.. _`api docs`: https://rhymebrain.com/api.html\n.. _`Jorge Sequeira`: jsequeira03@gmail.com\n\n\n", "description_content_type": "", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/GSejas/pyrhyme/", "keywords": "python rhyme words api", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "pyrhyme", "package_url": "https://pypi.org/project/pyrhyme/", "platform": "", "project_url": "https://pypi.org/project/pyrhyme/", "project_urls": { "Homepage": "https://github.com/GSejas/pyrhyme/" }, "release_url": "https://pypi.org/project/pyrhyme/0.1/", "requires_dist": [ "requests" ], "requires_python": "", "summary": "Python wrapper for RhymeBrain API", "version": "0.1" }, "last_serial": 4902227, "releases": { "0.1": [ { "comment_text": "", "digests": { "md5": "6cbd2d0e8e614e33fa277fc0372f0818", "sha256": "7543468aa117f9baed9b9a14c374c0ea975436e241d7c34752d6be09eda16af6" }, "downloads": -1, "filename": "pyrhyme-0.1-py3-none-any.whl", "has_sig": false, "md5_digest": "6cbd2d0e8e614e33fa277fc0372f0818", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 5841, "upload_time": "2019-03-05T22:21:59", "url": "https://files.pythonhosted.org/packages/59/33/d483de00ae999ef9651017dc944224d2e65228469f3af59237de42520002/pyrhyme-0.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "86faef28db869b334b448a34b9386fd4", "sha256": "26c903a44ff59f4b7047a350ff63caba9c625c6cad93d3266ec903ff519a5dd0" }, "downloads": -1, "filename": "pyrhyme-0.1.tar.gz", "has_sig": false, "md5_digest": "86faef28db869b334b448a34b9386fd4", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5157, "upload_time": "2019-03-05T22:22:01", "url": "https://files.pythonhosted.org/packages/42/0d/9a959c007443d85d1f7b0963ed8f808e6ac26d49c1f19a23fed34475e4ae/pyrhyme-0.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "6cbd2d0e8e614e33fa277fc0372f0818", "sha256": "7543468aa117f9baed9b9a14c374c0ea975436e241d7c34752d6be09eda16af6" }, "downloads": -1, "filename": "pyrhyme-0.1-py3-none-any.whl", "has_sig": false, "md5_digest": "6cbd2d0e8e614e33fa277fc0372f0818", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 5841, "upload_time": "2019-03-05T22:21:59", "url": "https://files.pythonhosted.org/packages/59/33/d483de00ae999ef9651017dc944224d2e65228469f3af59237de42520002/pyrhyme-0.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "86faef28db869b334b448a34b9386fd4", "sha256": "26c903a44ff59f4b7047a350ff63caba9c625c6cad93d3266ec903ff519a5dd0" }, "downloads": -1, "filename": "pyrhyme-0.1.tar.gz", "has_sig": false, "md5_digest": "86faef28db869b334b448a34b9386fd4", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5157, "upload_time": "2019-03-05T22:22:01", "url": "https://files.pythonhosted.org/packages/42/0d/9a959c007443d85d1f7b0963ed8f808e6ac26d49c1f19a23fed34475e4ae/pyrhyme-0.1.tar.gz" } ] }