Skip to main content

aliceio

AliceIO

License Status PyPI Downloads GitHub Repo stars Supported python versions Tests Coverage

Асинхронный фреймворк для разработки навыков Алисы из Яндекс.Диалогов

Based on aiogram v3

Особенности

Важно!

Рекомендуется иметь опыт работы с asyncio перед использованием aliceio

Быстрый старт

Как получить skill_id и подключить навык к Алисе можно прочитать тут.

Yandex Cloud Functions:

from aliceio import Dispatcher, Skill
from aliceio.types import Message
from aliceio.webhook.yandex_functions import OneSkillYandexFunctionsRequestHandler

dp = Dispatcher()
skill = Skill(skill_id="...")
requests_handler = OneSkillYandexFunctionsRequestHandler(dispatcher=dp, skill=skill)

@dp.message()
async def hello(message: Message) -> str:
    return f"Привет, {message.session.application.application_id}!"

async def main(event, context):
    return await requests_handler(event, context)

Вебхук:

from aiohttp import web
from aliceio import Dispatcher, Skill
from aliceio.types import Message
from aliceio.webhook.aiohttp_server import OneSkillAiohttpRequestHandler, setup_application

dp = Dispatcher()
skill = Skill(skill_id="...")

@dp.message()
async def hello(message: Message) -> str:
    return f"Привет, {message.session.application.application_id}!"

def main() -> None:
    app = web.Application()
    requests_handler = OneSkillAiohttpRequestHandler(dispatcher=dp, skill=skill)

    WEB_SERVER_HOST = "127.0.0.1"
    WEB_SERVER_PORT = 80
    WEBHOOK_PATH = "/alice"

    requests_handler.register(app, path=WEBHOOK_PATH)
    setup_application(app, dp, skill=skill)
    web.run_app(app, host=WEB_SERVER_HOST, port=WEB_SERVER_PORT)

if __name__ == "__main__":
    main()

Материалы

Связь

Если у вас есть вопросы, вы можете задать их в Телеграм чате

Лицензия

Copyright © 2023-2025 K1rL3s and ZloyKobra
Этот проект использует MIT лицензию

Metadata

Release files for aliceio 0.2.3

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

Source distribution (sdist)

Source distribution for aliceio 0.2.3
File Size Uploaded
aliceio-0.2.3.tar.gz 2.1 MB Details

Built distribution (wheel)

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

Total release size: 2.2 MB

Release files / aliceio-0.2.3.tar.gz

Download URL aliceio-0.2.3.tar.gz
Size 2.1 MB
Tags Source
SHA-256 checksum
How to use checksums
25921e02a1ae77c11f3c9c857fad7488f7df34b23ca78446d6075109bf4461d1
BLAKE2b-256 checksum
How to use checksums
3d80eec2b916a10a54b4611f1361dece09a3a9b632a5c17c044ee1aa5782ac25
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via python-httpx/0.28.1

Release files / aliceio-0.2.3-py3-none-any.whl

Download URL aliceio-0.2.3-py3-none-any.whl
Size 116.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
7e9db18b6bcff253965ca340ad61ef77d7d749beb07ca7597aabdf075423e586
BLAKE2b-256 checksum
How to use checksums
34ef352f783f57a50a3503d11af94f55eb55eab7d7774761b6f8b27143c0aad5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via python-httpx/0.28.1

Release history Release notifications | RSS feed

This release

0.2.3 This release

2 release files

0.2.2

2 release files

0.2.1

2 release files

0.2.0

2 release files

0.1.1

2 release files

0.1.0

2 release files

0.0.4

2 release files

0.0.3

2 release files

0.0.2

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