An API wrapper for Wanikani (V2)
Project description
wanikani_api
An API wrapper for Wanikani (V2)
- Free software: BSD license
- Documentation: https://wanikani-api.readthedocs.io.
Features
- Easy access to Wanikani resources associated to your account.
- Automatic handling of pagination.
- Automatic fetching of related Subjects
Quickstart
>>> from wanikani_api.client import Client >>> v2_api_key = "drop_your_v2_api_key_in_here" # You can get it here: https://www.wanikani.com/settings/account >>> client = Client(v2_api_key) >>> user_information = client.user_information() >>> print(user_information) UserInformation{ username:Tadgh11, level:8, max_level_granted_by_subscription:60, profile_url:https://www.wanikani.com/users/Tadgh11 started_at:2013-07-09 12:02:54.952786+00:00, subscribed:True, current_vacation_started_at:None } >>> all_vocabulary = client.subjects(types="vocabulary") >>> for vocab in all_vocabulary: >>> print(vocab.meanings[0].meaning) #Vocabulary may have multiple meanings, we just grab the first in the list. One One Thing Seven Seven Things Nine Nine Things Two ...
TODO
- Make use of ETags for caching
- simplify API
- Improve automatic prefetching of subjects when relevant.
Credits
This package was created with Cookiecutter and the audreyr/cookiecutter-pypackage project template.
History
0.5.0 (2020-08-18)
- Remove mock responses that included stage names.
0.5.0 (2020-08-18)
- Remove passed from resource.
- Remove srs_stage_name from assignments and reviews
0.4.0 (2020-04-30)
- Add Preferences to User Information
- Add Subscription to User Information
0.3.0 (2019-11-09)
- Add auxiliary_meanings to Subject
0.2.1 (2019-11-05)
- Fix crash caused by WK removing a field from their API.
0.1.1 (2018-06-26)
- Change Assignment endpoint to reflect the newly dropped fields from the api (level specifically).
- Add some proper String representation
- Work on the Etag cache, bringing it closer to completion.
0.1.0 (2018-06-26)
- First release on PyPI.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Filename, size | File type | Python version | Upload date | Hashes |
---|---|---|---|---|
Filename, size wanikani_api-0.5.1-py2.py3-none-any.whl (13.6 kB) | File type Wheel | Python version py2.py3 | Upload date | Hashes View |
Filename, size wanikani_api-0.5.1.tar.gz (27.1 kB) | File type Source | Python version None | Upload date | Hashes View |
Close
Hashes for wanikani_api-0.5.1-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | eece1ac9d510e8f146a58933816bb6a788fb15541bb74dc07ade098df6403f50 |
|
MD5 | 61aba3f9080ddbc55c72a53fed5a835e |
|
BLAKE2-256 | 1408a36a1f43cade868696f5c22dc8c8d121620bd416e8c9b8e3d42193bcc0f3 |