Skip to main content

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


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.2.tar.gz (4.6 kB view details)

Uploaded Source

Built Distribution

shiki4py-0.1.2-py3-none-any.whl (5.7 kB view details)

Uploaded Python 3

File details

Details for the file shiki4py-0.1.2.tar.gz.

File metadata

  • Download URL: shiki4py-0.1.2.tar.gz
  • Upload date:
  • Size: 4.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.0 CPython/3.7.4

File hashes

Hashes for shiki4py-0.1.2.tar.gz
Algorithm Hash digest
SHA256 fb6cc732f297b65b766fae54f6eaf7affe7f5e8717f04271d85cded21a2b5a64
MD5 d3825c8319ef2718672d0b9f085f1401
BLAKE2b-256 3e6cb4781abf4356464ce92c02c6f41d3426b0a95f7e94b891baab5ba4b02bc6

See more details on using hashes here.

Provenance

File details

Details for the file shiki4py-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: shiki4py-0.1.2-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

Hashes for shiki4py-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 38226b928f067543da158c0b8d8803cdcb38703a226ce7c1c14dd35db75c974c
MD5 3d5cbe268e8959e87e0b57d3091dc987
BLAKE2b-256 12349ae6f5386ddf5f5078306cd49b8a712410221f589029d67139ebd25a10a6

See more details on using hashes here.

Provenance

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page