python-datamuse


Namepython-datamuse JSON
Version 2.0.1 PyPI version JSON
download
home_pagehttps://github.com/gmarmstrong/python-datamuse
SummaryPython wrapper for the Datamuse API
upload_time2022-12-29 20:30:18
maintainerGuthrie McAfee Armstrong
docs_urlNone
authorGuthrie McAfee Armstrong
requires_python>=3.7,<4.0
licenseMIT
keywords datamuse linguistics language wrapper
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # python-datamuse

[![PyPI](https://img.shields.io/pypi/v/python-datamuse)](https://pypi.org/project/python-datamuse/)
[![PyPI - License](https://img.shields.io/pypi/l/python-datamuse)](https://github.com/gmarmstrong/python-datamuse/blob/main/LICENSE)
[![CodeQL](https://github.com/gmarmstrong/python-datamuse/actions/workflows/codeql-analysis.yml/badge.svg?branch=main)](https://github.com/gmarmstrong/python-datamuse/actions/workflows/codeql-analysis.yml)

Python wrapper and scripts for the [Datamuse API](http://datamuse.com/api/).
Available on PyPI at <https://pypi.python.org/pypi/python-datamuse>. You can
install this library with `pip3 install python-datamuse`.

## Changelog

### Version 2.0.* (2022-10-22)

- require Python 3.7
- add @margaret to authors
- upgrade trove classifier "Development Status" from "3 - Alpha" to "5 - Production/Stable"
- specify all dependency version requirements
- rename default branch `main`
- build tool changes, see <https://github.com/gmarmstrong/python-datamuse/releases/tag/v2.0.0>
- **(2.0.1) (2022-12-29):** fix CI workflows

### Version 1.3.* (2019-09-20)

- Add optional arguments to `suggest` method
- Document and test suggestion method
- **(1.3.1):** Update README example
- **(1.3.1):** Remove WORD_PARAMS
- **(1.3.1):** Document `words` method
- **(1.3.2) (2022-04-04):** Fix test_set_max bug 

### Version 1.2.* (2018-10-23)

- Raise Python version to 3.6
- Mock the Datamuse API for tests
- Restructure project files
- Set README as PyPI long description
- **(1.2.1):** Fix README formatting on PyPI

### Version 1.1.0 (2018-02-18)

- Changed to Python 3
- Uploaded to PyPI, added instructions for PyPI installation
- Changed README example to reflect PyPI packaging
- Set up Travis CI
- Temporarily removed pandas
- Changed mode of scripts to executable

## Example

```
>>> from datamuse import Datamuse
>>> api = Datamuse()
>>> api.words(rel_rhy='ninth', max=5)  # words that rhyme with "ninth"
[]
>>> api.words(rel_rhy='orange', max=5)  # words that rhyme with "orange"
[{'word': 'door hinge', 'score': 74, 'numSyllables': 2}]
>>> api.words(rel_jja='yellow', max=5)  # things often described as "yellow"
[{'word': 'fever', 'score': 1001}, {'word': 'color', 'score': 1000}, {'word': 'flowers', 'score': 999}, {'word': 'light', 'score': 998}, {'word': 'colour', 'score': 997}]
>>> api.suggest(s='foo', max_results=10)  # completion suggestions for "foo"
[{'word': 'food', 'score': 3888}, {'word': 'foot', 'score': 3041}, {'word': 'fool', 'score': 1836}, {'word': 'football', 'score': 1424}, {'word': 'footage', 'score': 1328}, {'word': 'footprint', 'score': 1082}, {'word': 'foolish', 'score': 967}, {'word': 'foof', 'score': 930}, {'word': 'footing', 'score': 786}, {'word': 'foolproof', 'score': 697}]
```

Note that the default number of results is set to 100. You can set the default
`max` to something else using the `set_max_default` method, e.g.
`api.set_max_default(300)`. Datamuse only returns 1000 results max.


            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/gmarmstrong/python-datamuse",
    "name": "python-datamuse",
    "maintainer": "Guthrie McAfee Armstrong",
    "docs_url": null,
    "requires_python": ">=3.7,<4.0",
    "maintainer_email": "git@gmarmstrong.dev",
    "keywords": "datamuse,linguistics,language,wrapper",
    "author": "Guthrie McAfee Armstrong",
    "author_email": "git@gmarmstrong.dev",
    "download_url": "https://files.pythonhosted.org/packages/4c/7c/2e03bd07e8262f6dfecba545e7b4577272021ab6263fdcb27aeecb1519a7/python_datamuse-2.0.1.tar.gz",
    "platform": null,
    "description": "# python-datamuse\n\n[![PyPI](https://img.shields.io/pypi/v/python-datamuse)](https://pypi.org/project/python-datamuse/)\n[![PyPI - License](https://img.shields.io/pypi/l/python-datamuse)](https://github.com/gmarmstrong/python-datamuse/blob/main/LICENSE)\n[![CodeQL](https://github.com/gmarmstrong/python-datamuse/actions/workflows/codeql-analysis.yml/badge.svg?branch=main)](https://github.com/gmarmstrong/python-datamuse/actions/workflows/codeql-analysis.yml)\n\nPython wrapper and scripts for the [Datamuse API](http://datamuse.com/api/).\nAvailable on PyPI at <https://pypi.python.org/pypi/python-datamuse>. You can\ninstall this library with `pip3 install python-datamuse`.\n\n## Changelog\n\n### Version 2.0.* (2022-10-22)\n\n- require Python 3.7\n- add @margaret to authors\n- upgrade trove classifier \"Development Status\" from \"3 - Alpha\" to \"5 - Production/Stable\"\n- specify all dependency version requirements\n- rename default branch `main`\n- build tool changes, see <https://github.com/gmarmstrong/python-datamuse/releases/tag/v2.0.0>\n- **(2.0.1) (2022-12-29):** fix CI workflows\n\n### Version 1.3.* (2019-09-20)\n\n- Add optional arguments to `suggest` method\n- Document and test suggestion method\n- **(1.3.1):** Update README example\n- **(1.3.1):** Remove WORD_PARAMS\n- **(1.3.1):** Document `words` method\n- **(1.3.2) (2022-04-04):** Fix test_set_max bug \n\n### Version 1.2.* (2018-10-23)\n\n- Raise Python version to 3.6\n- Mock the Datamuse API for tests\n- Restructure project files\n- Set README as PyPI long description\n- **(1.2.1):** Fix README formatting on PyPI\n\n### Version 1.1.0 (2018-02-18)\n\n- Changed to Python 3\n- Uploaded to PyPI, added instructions for PyPI installation\n- Changed README example to reflect PyPI packaging\n- Set up Travis CI\n- Temporarily removed pandas\n- Changed mode of scripts to executable\n\n## Example\n\n```\n>>> from datamuse import Datamuse\n>>> api = Datamuse()\n>>> api.words(rel_rhy='ninth', max=5)  # words that rhyme with \"ninth\"\n[]\n>>> api.words(rel_rhy='orange', max=5)  # words that rhyme with \"orange\"\n[{'word': 'door hinge', 'score': 74, 'numSyllables': 2}]\n>>> api.words(rel_jja='yellow', max=5)  # things often described as \"yellow\"\n[{'word': 'fever', 'score': 1001}, {'word': 'color', 'score': 1000}, {'word': 'flowers', 'score': 999}, {'word': 'light', 'score': 998}, {'word': 'colour', 'score': 997}]\n>>> api.suggest(s='foo', max_results=10)  # completion suggestions for \"foo\"\n[{'word': 'food', 'score': 3888}, {'word': 'foot', 'score': 3041}, {'word': 'fool', 'score': 1836}, {'word': 'football', 'score': 1424}, {'word': 'footage', 'score': 1328}, {'word': 'footprint', 'score': 1082}, {'word': 'foolish', 'score': 967}, {'word': 'foof', 'score': 930}, {'word': 'footing', 'score': 786}, {'word': 'foolproof', 'score': 697}]\n```\n\nNote that the default number of results is set to 100. You can set the default\n`max` to something else using the `set_max_default` method, e.g.\n`api.set_max_default(300)`. Datamuse only returns 1000 results max.\n\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Python wrapper for the Datamuse API",
    "version": "2.0.1",
    "split_keywords": [
        "datamuse",
        "linguistics",
        "language",
        "wrapper"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "md5": "7a7c142a3d1c3b76b65e3b2ea3d3a668",
                "sha256": "af67d2791577f66d1e262490a855dcba7f0774223db2a799a9629c327e4377e3"
            },
            "downloads": -1,
            "filename": "python_datamuse-2.0.1-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "7a7c142a3d1c3b76b65e3b2ea3d3a668",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.7,<4.0",
            "size": 4606,
            "upload_time": "2022-12-29T20:30:17",
            "upload_time_iso_8601": "2022-12-29T20:30:17.352609Z",
            "url": "https://files.pythonhosted.org/packages/1b/e2/f7bc3bdfc36c20d067df1e05b35d6c27cff9ee07bde3c4b9994a96350f13/python_datamuse-2.0.1-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "md5": "7771731b0327c6676440e7cd6269ad02",
                "sha256": "7a5a3b0395b96999ccbbf2f1a71c9a33e42ec9b26bd363901bd3a62e513aa731"
            },
            "downloads": -1,
            "filename": "python_datamuse-2.0.1.tar.gz",
            "has_sig": false,
            "md5_digest": "7771731b0327c6676440e7cd6269ad02",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.7,<4.0",
            "size": 4670,
            "upload_time": "2022-12-29T20:30:18",
            "upload_time_iso_8601": "2022-12-29T20:30:18.606147Z",
            "url": "https://files.pythonhosted.org/packages/4c/7c/2e03bd07e8262f6dfecba545e7b4577272021ab6263fdcb27aeecb1519a7/python_datamuse-2.0.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2022-12-29 20:30:18",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "github_user": "gmarmstrong",
    "github_project": "python-datamuse",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "python-datamuse"
}
        
Elapsed time: 0.03367s