Skip to main content

anilibria.py

О библиотеке


anilibria.py - это RESTful и Websocket обёртка для API anilibria.tv.

Вы можете ей пользоваться для получение уведомлений о выходе новой серии, получение информации о тайтлах и других вещей.

Установка


pip install --upgrade anilibria.py

С использование poetry: poetry add anilibria.py

Использование методов клиента


В библиотеке реализована поддержка RESTful API. Список всех возможных методов вы можете увидеть здесь <https://anilibriapy.readthedocs.io/ru/latest/client.html>__

.. code-block:: python

import asyncio

from anilibria import AniLibriaClient

async def main(): # Создание клиента client = AniLibriaClient(proxy="http://0.0.0.0:80") # proxy - необязательный аргумент

  # Получение тайтла по его коду
  title = await client.get_title(code="kimetsu-no-yaiba-yuukaku-hen")
  # Вывод описание тайтла
  print(title.description)  # Все атрибуты вы можете найти в документации моделей

asyncio.run(main())

Использование Websocket


АПИ Анилибрии имеет вебсокет, к которому можно подключиться.

.. code-block:: python

from anilibria import AniLibriaClient, Connect

client = AniLibriaClient()

@client.on(Connect) # Или client.listen(name="on_connect") async def connected(event: Connect): print("Подключено к АПИ")

client.start()

Все модели события вы можете найти здесь <https://anilibriapy.readthedocs.io/ru/latest/events.html>_

Использование с другими библиотеками ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Вы также можете использовать эту библиотеку вместе с:

  • discord.py и его форках
  • aiogram

и с другими.

Примеры использования представлены здесь <https://github.com/Damego/anilibria.py/tree/main/examples>__

Документация ^^^^^^^^^^^^ Официальная документация API <https://github.com/anilibria/docs/blob/master/api_v3.md>__

Документация библиотеки <https://anilibriapy.readthedocs.io/ru/latest/>__

Metadata

Release files for anilibria.py 1.0.4

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for anilibria.py 1.0.4
File Size Uploaded
anilibria.py-1.0.4.tar.gz 34.5 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for anilibria.py 1.0.4
File Interpreter ABI Platform
anilibria.py-1.0.4-py3-none-any.whl Python 3 none any Details

Total release size: 73.2 kB

Release files / anilibria.py-1.0.4.tar.gz

Download URL anilibria.py-1.0.4.tar.gz
Size 34.5 kB
Tags Source
SHA-256 checksum
How to use checksums
51a4fc0f12433e2bb70e5d066530a74301021d9c57c7a6b5c1a8d043db08a3eb
BLAKE2b-256 checksum
How to use checksums
ed35fdb8b92924e60a727a4dac355081ccd499bdf45118578d3ab23482330a1f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.9.18

Release files / anilibria.py-1.0.4-py3-none-any.whl

Download URL anilibria.py-1.0.4-py3-none-any.whl
Size 38.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
83f100978be27b6cffbae8494cd98f32c854c4c889477cf93c80003c8b0eed69
BLAKE2b-256 checksum
How to use checksums
fe31a6d18dde30624ebe04716552137fee4dba0555001d0eb589aa56f2769548
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.9.18

Release history Release notifications | RSS feed

This release

1.0.4 This release

2 release files

1.0.3

2 release files

1.0.2

2 release files

1.0.1

2 release files

1.0.0

2 release files

0.3.3

2 release files

0.3.2

2 release files

0.3.1

2 release files

0.3.0

2 release files

0.2.1

2 release files

0.2.0

2 release files

0.1.0

2 release files

0.0.6

2 release files

0.0.5

2 release files

0.0.4

2 release files

0.0.3

2 release files

0.0.2

2 release files

0.0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page