Skip to content

A Python wrapper for Wanikani API V2.

License

Notifications You must be signed in to change notification settings

hrubiak/wanikani_api

 
 

Repository files navigation

wk_logo wanikani_api

Documentation Status Updates

An API wrapper for Wanikani (V2)

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.

About

A Python wrapper for Wanikani API V2.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Python 97.4%
  • Makefile 2.6%