Api client for Shikimori
Project description
Shiki4py
Клиент для api Shikimori.
Реализовано:
- Поддержка api v1 и v2
- Ограничения 5rps и 90rpm
- Логирование ошибок
- OAuth2 авторизация
- Сохранение токенов
- Автообновление токена доступа
- Функция безопасного создания комментариев
В планах:
- Debug логирование
- Вспомогательные функции
Мой профиль на шики https://shikimori.one/3104
Установка
pip install shiki4py
Использование
from shiki4py import Client
from pprint import pprint
APP_NAME = 'APP_NAME'
CLIENT_ID = 'CLIENT_ID'
CLIENT_SECRET = 'CLIENT_SECRET'
# Клиент без авторизации
client = Client(APP_NAME)
# Клиент с авторизацией
client = Client(APP_NAME).auth(CLIENT_ID, CLIENT_SECRET)
clubs = client.get('clubs', params={
'search': 'Детектив Конан'
})
pprint(clubs)
# [{'comment_policy': 'free',
# 'id': 3483,
# 'is_censored': False,
# 'join_policy': 'free',
# 'logo': {'main': '/system/clubs/main/3483.gif?1637694999',
# 'original': '/system/clubs/original/3483.gif?1637694999',
# 'x48': '/system/clubs/x48/3483.gif?1637694999',
# 'x73': '/system/clubs/x73/3483.gif?1637694999',
# 'x96': '/system/clubs/x96/3483.gif?1637694999'},
# 'name': 'Детектив Конан'}]
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
shiki4py-0.1.0.tar.gz
(4.7 kB
view details)
Built Distribution
File details
Details for the file shiki4py-0.1.0.tar.gz
.
File metadata
- Download URL: shiki4py-0.1.0.tar.gz
- Upload date:
- Size: 4.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.0 CPython/3.7.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 995ce8a3f127bf5c0c492562f7f590a2c9f58186c20b3e81809bddf3a6247b1f |
|
MD5 | ff1a566f42b2ac9f7f94e6bf6751a151 |
|
BLAKE2b-256 | 42170c24c093110d44f528be5c788e96528b9bc7d1a6bf71bba192a47c4becab |
Provenance
File details
Details for the file shiki4py-0.1.0-py3-none-any.whl
.
File metadata
- Download URL: shiki4py-0.1.0-py3-none-any.whl
- Upload date:
- Size: 5.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.0 CPython/3.7.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | b604a6f17cb55fd3f82bd2b5bd44fe82688b3d52879da406aeb0bd996ed29ba0 |
|
MD5 | b9f401667bfda769f0b64601e7b9949b |
|
BLAKE2b-256 | b5b7f5bccc48a24b0e71a36b059ce59328bc402356fc34e1773e5a529b47972b |