kitsu-wrapper
A simple python async wrapper for the Kitsu.io API.
Supports searches for Animes, Mangas and Streaming Links.
Installation
NOTE: Python 3.6 or higher is required.
# Windows
py -3.6 -m pip install kitsu-wrapper
# Linux
python3.6 -m pip install kitsu-wrapper
Example
import asyncio
import kitsu
client = kitsu.Client()
async def anime_search(query):
entries = await client.search('anime', query, limit=5)
if not entries:
print(f'No entries found for "{query}"')
return
for i, anime in enumerate(entries, 1):
print(f'\n{i}. {anime.title}:')
print('---> Sub-Type:', anime.subtype)
print('---> Status:', anime.status)
print('---> Synopsis:\n' + anime.synopsis)
print('---> Episodes:', anime.episode_count)
print('---> Age Rating:', anime.age_rating_guide)
print('---> Ranking:')
print('-> Popularity:', anime.popularity_rank)
print('-> Rating:', anime.rating_rank)
if anime.started_at:
print('---> Started At:', anime.started_at.strftime('%Y-%m-%d'))
if anime.ended_at:
print('---> Ended At:', anime.ended_at.strftime('%Y-%m-%d'))
streaming_links = await client.fetch_anime_streaming_links(anime)
if streaming_links:
print('---> Streaming Links:')
for link in streaming_links:
print(f'-> {link.title}: {link.url}')
print('---> Kitsu Page:', anime.url)
async def manga_search(query):
entries = await client.search('manga', query, limit=5)
if not entries:
print(f'No entries found for "{query}"')
return
for i, manga in enumerate(entries, 1):
print(f'\n{i}. {manga.title}:')
print('---> Sub-Type:', manga.subtype)
print('---> Status:', manga.status)
print('---> Volumes:', manga.volume_count)
print('---> Chapters:', manga.chapter_count)
print('---> Synopsis:\n' + manga.synopsis)
print('---> Age Rating:', manga.age_rating_guide)
print('---> Ranking:')
print('-> Popularity:', manga.popularity_rank)
print('-> Rating:', manga.rating_rank)
if manga.started_at:
print('---> Started At:', manga.started_at.strftime('%Y-%m-%d'))
if manga.ended_at:
print('---> Ended At:', manga.ended_at.strftime('%Y-%m-%d'))
print('---> Kitsu Page:', manga.url)
loop = asyncio.get_event_loop()
loop.run_until_complete(anime_search(input('Insert an anime name: ')))
loop.run_until_complete(manga_search(input('Insert a manga name: ')))
Release files for kitsu-wrapper 1.0.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| kitsu-wrapper-1.0.0.tar.gz | 4.9 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| kitsu_wrapper-1.0.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 10.9 kB
Release files / kitsu-wrapper-1.0.0.tar.gz
| Download URL | kitsu-wrapper-1.0.0.tar.gz |
|---|---|
| Size | 4.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
26cc95d62c6d54d232820b8ae4ef1e7dcfa19520d13921d636a4342eb715c7e3
|
|
BLAKE2b-256 checksum How to use checksums |
28326ec40a89df1c09b177ceb3f97788ee3379f75730aede6ec2a60b21ebfe8f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.45.0 CPython/3.8.2
|
Release files / kitsu_wrapper-1.0.0-py3-none-any.whl
| Download URL | kitsu_wrapper-1.0.0-py3-none-any.whl |
|---|---|
| Size | 6.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
c42127693ceb6dc880e08a441f53e463a70546150d714e1af37523e64c7537c1
|
|
BLAKE2b-256 checksum How to use checksums |
eeeaadbf2aa66f99f90828eb537a1877474536472cd27a0ee74ce5e880d1b2e9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.45.0 CPython/3.8.2
|