python-datamuse
Python wrapper and scripts for the Datamuse 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
suggestmethod - Document and test suggestion method
- (1.3.1): Update README example
- (1.3.1): Remove WORD_PARAMS
- (1.3.1): Document
wordsmethod - (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.
Metadata
Release files for python-datamuse 2.0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| python_datamuse-2.0.1.tar.gz | 4.7 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| python_datamuse-2.0.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 9.3 kB
Release files / python_datamuse-2.0.1.tar.gz
| Download URL | python_datamuse-2.0.1.tar.gz |
|---|---|
| Size | 4.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
7a5a3b0395b96999ccbbf2f1a71c9a33e42ec9b26bd363901bd3a62e513aa731
|
|
BLAKE2b-256 checksum How to use checksums |
4c7c2e03bd07e8262f6dfecba545e7b4577272021ab6263fdcb27aeecb1519a7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.9.16
|
Release files / python_datamuse-2.0.1-py3-none-any.whl
| Download URL | python_datamuse-2.0.1-py3-none-any.whl |
|---|---|
| Size | 4.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
af67d2791577f66d1e262490a855dcba7f0774223db2a799a9629c327e4377e3
|
|
BLAKE2b-256 checksum How to use checksums |
1be2f7bc3bdfc36c20d067df1e05b35d6c27cff9ee07bde3c4b9994a96350f13
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.9.16
|
Security for python-datamuse 2.0.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.