Asynchronous library for Yandex Dialogs (Alice) API
Project description
aioAlice
AsyncIO library for Yandex Alice (Yandex Dialogs)
Why?
- Work with classes, don't bother parsing JSON
- Auto answer to webhook even if you were not fast enough to create answer - there won't be a server error, but you'll get a log
Auto response will not help if you are not using async IO. So consider not to use any long processing synchronous tasks inside handlers
- Handy handlers to match incoming commands
- Finite-State Machine
- Easy images upload, easy answers generation
Installation
# make sure you use virtual env and python 3.6+:
python3.6 -m venv aliceenv
source ./aliceenv/bin/activate
pip install pip -U
pip install setuptools -U
pip install uvloop # uvloop if you want
pip install aioalice -U
# Or install from GitHub:
# pip install git+https://github.com/surik00/aioalice.git -U
# or if you don't have git installed:
# 1. download ZIP
# 2. unarchive and go to dir
# 3. run:
python setup.py install
Quick start
dp = Dispatcher()
@dp.request_handler()
async def handle_all_requests(alice_request):
return alice_request.response('Hello world!')
Cards
JSON serializing
If you want to use a faster json library, install rapidjson or ujson, it will be detected and used automatically
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
aioAlice-1.2.1.tar.gz
(18.8 kB
view details)
Built Distribution
aioAlice-1.2.1-py3-none-any.whl
(26.3 kB
view details)
File details
Details for the file aioAlice-1.2.1.tar.gz
.
File metadata
- Download URL: aioAlice-1.2.1.tar.gz
- Upload date:
- Size: 18.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.11.0 pkginfo/1.4.2 requests/2.19.1 setuptools/40.2.0 requests-toolbelt/0.8.0 tqdm/4.26.0 CPython/3.6.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6d76e90b2bbeabbbf9003d81edcf6ac0b10d0c93f84dabdf862e82dcdd1e2ff3 |
|
MD5 | 3f7549697a3d82c8200365cce97bbfcf |
|
BLAKE2b-256 | 0325bbfba9e7b753093601226a770421aa537dc94a6b163af302b4d6f9f1ef2a |
Provenance
File details
Details for the file aioAlice-1.2.1-py3-none-any.whl
.
File metadata
- Download URL: aioAlice-1.2.1-py3-none-any.whl
- Upload date:
- Size: 26.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.11.0 pkginfo/1.4.2 requests/2.19.1 setuptools/40.2.0 requests-toolbelt/0.8.0 tqdm/4.26.0 CPython/3.6.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 731c4a17aef11a85a51b38f3cc6e41020e6a3812da1eaa6cf399670d125e1c80 |
|
MD5 | b232ed5ef748f99d29286c88a7dfce4e |
|
BLAKE2b-256 | 1ff1f5e9e3c51e4fb9338d184590a294351d8120b2fff96238d692d9c7a1c4a6 |