A package that helps with querying the Korean Learners' Dictionary API.
Project description
A package that helps to query the API of the Korean Learners' Dictionary, provided by the National Institute of Korean Language.
Installation
To install the package via pip, run:
pip install krdict.py
You can also install from one of the GitHub releases.
Usage
To use most of the functionality provided by this package, you'll need to generate an API key via the portal (requires login).
A minimal example query that assumes the KRDICT_KEY environment variable is set:
import os
import json
import krdict
krdict.set_key(os.getenv('KRDICT_KEY'))
response = krdict.search(query='나무', raise_api_errors=True)
print(json.dumps(response.asdict(), indent=2, ensure_ascii=False))
Assuming an error does not occur, the output will be similar to:
{
"data": {
...
"results": [
{
"target_code": 32750,
"word": "나무",
"pronunciation": "나무",
...
"definitions": [
{
"order": 1,
"definition": "단단한 줄기에 가지와 잎이 달린, 여러 해 동안 자라는 식물."
},
...
]
},
...
]
},
"request_params": {
"q": "나무",
"key": "YOUR_API_KEY"
}
}
For more information and usage examples, please check the documentation.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file krdict.py-3.0.2.tar.gz.
File metadata
- Download URL: krdict.py-3.0.2.tar.gz
- Upload date:
- Size: 51.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.10.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0e12d0992c4c2a689075a494f4047f205b6760100b53057a0d924681bcf8759c
|
|
| MD5 |
281e0279d057d96580050b03d34c4d88
|
|
| BLAKE2b-256 |
1dbfababd57bd7d5d16e669ce7c8a3349ca2871d9e43e72e760ad7f335922c0a
|
File details
Details for the file krdict.py-3.0.2-py3-none-any.whl.
File metadata
- Download URL: krdict.py-3.0.2-py3-none-any.whl
- Upload date:
- Size: 57.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.10.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5b1bf7c45c8e8f876c3311ccd425fea96344b4beb0c9856ef25bbad489afd989
|
|
| MD5 |
dfa9edc2ec393267e677c9c9f18eb131
|
|
| BLAKE2b-256 |
c8ea575a9054dd990b59aa09ad830072e42d260c56cd54ad14b40a9db1343cd7
|