py-dictionary
returns meaning, synonyms, antonyms for a word (scraping dictionary.com) limit the no of results also get meaning, synonyms and antonyms in different color
This module uses requests, bs4 and string-color modules and scraps dictionary.com
How to use it
Install it
pip install Py-Dictionary
to update it
pip install Py-Dictionary --upgrade
Use
from pydictionary import Dictionary
dict = Dictionary("fix")
enter the word you want to search here e.g. I used the word "fix"
To get the result as list do following (you can use them in your programs)
meanings_list = dict.meanings()
synonyms_list = dict.synonyms()
antonyms_list = dict.antonyms()
To print the results do following:
dict.print_meanings()
dict.print_synonyms()
dict.print_antonyms()
This will print maximum 5 results with text having white color
If you want to increase or decrease maximum results do this
dict = Dictionary("fix",10)
now maximum 10 results will be shown
To change the color of text
dict.print_meanings("red")
dict.print_synonyms("green")
dict.print_antonyms("blue")
#To get more color look up string-color module or type string-color in your terminal
Metadata
Release files for Py-Dictionary 4.1.4
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| Py-Dictionary-4.1.4.tar.gz | 2.8 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| Py_Dictionary-4.1.4-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 6.0 kB
Release files / Py-Dictionary-4.1.4.tar.gz
| Download URL | Py-Dictionary-4.1.4.tar.gz |
|---|---|
| Size | 2.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
c050ea1da48dba298f2df2acd1261de14891a9dfd3ed912c55e35fc9f506897c
|
|
BLAKE2b-256 checksum How to use checksums |
59b53d1abf737245a7c40f35965ad38ba9b698e7e6d7d5ca87404f37f22adfec
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.55.1 CPython/3.9.6
|
Release files / Py_Dictionary-4.1.4-py3-none-any.whl
| Download URL | Py_Dictionary-4.1.4-py3-none-any.whl |
|---|---|
| Size | 3.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
a77f933740fa27fda321707e9a0833a4c5b013f9bcff3eabd9bfaaf9bff8b3c4
|
|
BLAKE2b-256 checksum How to use checksums |
050543c4c40d77b323ea5721029d6111a5fbd766efbfebc0b40b385f3533676f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.55.1 CPython/3.9.6
|