NOTE: Currently I have only implemented fetching words from English, not other languages. This is because the actual API's implementation of languages other than english is different. Support for different languages coming soon though.
Requirements
- Python 3.6+
- aiohttp
Features
- Asynchronous
- Typed
- Easy to use
Installation
Available through PyPi (pip)
$ pip install asyncdictionary
Or through git.
$ pip install git+https://github.com/Ay-355/asyncdictionary
You might have to do
python3 -m pip
Documentation
You can find a markdown file here.
Issues
Any issues directly with the API should be reported at the API's repository page.
If there is anything wrong with this package, feel free to open up an issue and explain what happened.
Examples
An example to print out some information about a word
import asyncdictionary
import asyncio
# create an instance of the client
dictionary = asyncdictionary.Client()
async def word_info(word):
word = await dictionary.get_word(word) # get a Word object
print(f"Word: {word.word}")
print(f"Phonetic text: {word.phonetics[0].text}")
print(f"Part of Speech: {word.meanings[0].part_of_speech}")
print(f"Definition: {word.meanings[0].definitions[0].definition}")
print(f"Synonyms: {', '.join(word.meanings[0].definitions[0].synonyms)}")
print(f"Example: {word.meanings[0].definitions[0].example}")
asyncio.run(word_info("hello"))
Links
License
Metadata
Release files for asyncdictionary 1.2.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 | |
|---|---|---|---|
| asyncdictionary-1.2.4.tar.gz | 5.2 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| asyncdictionary-1.2.4-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 12.0 kB
Release files / asyncdictionary-1.2.4.tar.gz
| Download URL | asyncdictionary-1.2.4.tar.gz |
|---|---|
| Size | 5.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
07eba2d60dfb7182c6a467fdc33197e0ba380f0500cfd62fb27b180bdb40ddb7
|
|
BLAKE2b-256 checksum How to use checksums |
23c326273c7195f9d521e0a73ac40cc43391011f12512a73803d87cce93b8754
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.7
|
Release files / asyncdictionary-1.2.4-py3-none-any.whl
| Download URL | asyncdictionary-1.2.4-py3-none-any.whl |
|---|---|
| Size | 6.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
875a6e9808676b0c46f751202f11bd748f28e7bf91dbbb6df493e7d6713df002
|
|
BLAKE2b-256 checksum How to use checksums |
772ee79adbf447eaa7455dda980557a439e334a879cd3ce3ca591c161cafe668
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.7
|