MCPcopy Index your code
hub / github.com/K1rL3s/aliceio

github.com/K1rL3s/aliceio @v0.2.1

Chat with this repo
repository ↗ · DeepWiki ↗ · release v0.2.1 ↗ · + Follow
1,297 symbols 5,811 edges 265 files 193 documented · 15%

Browse by type

Functions 948 Types & classes 310 Endpoints 39
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

aliceio

AliceIO

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

<b>
    Асинхронный фреймворк для разработки
    <a target="_blank" href="https://dialogs.yandex.ru/store">навыков Алисы</a>
    из
    <a target="_blank" href="https://dialogs.yandex.ru/development">Яндекс.Диалогов</a>
</b>






Based on <a target="_blank" href="https://github.com/aiogram/aiogram/tree/dev-3.x">aiogram v3</a>

Особенности

Важно!

Рекомендуется иметь опыт работы с 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()

Материалы

Связь

Если у вас есть вопросы, вы можете задать их в Телеграм чате - 🇷🇺 \@aliceio_chat

Лицензия

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

Core symbols most depended-on inside this repo

Shape

Method 798
Class 310
Function 150
Route 39

Languages

Python100%

Modules by API surface

tests/test_dispatcher/test_event/test_handler.py33 symbols
tests/test_dispatcher/test_event/test_alice.py28 symbols
aliceio/fsm/state.py24 symbols
tests/test_utils/test_builders.py23 symbols
tests/test_dispatcher/test_router.py23 symbols
tests/test_api/test_client/test_session/test_base_session.py23 symbols
examples/fsm_games.py22 symbols
tests/test_fsm/test_state.py20 symbols
aliceio/utils/builders.py19 symbols
tests/test_api/test_client/test_session/test_aiohttp_session.py18 symbols
tests/test_dispatcher/test_dispatcher.py17 symbols
examples/fsm_form.py17 symbols

For agents

$ claude mcp add aliceio \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact

Ask about this repo answers extend the page