
Security News
New Website “Is It Really FOSS?” Tracks Transparency in Open Source Distribution Models
A new site reviews software projects to reveal if they’re truly FOSS, making complex licensing and distribution models easy to understand.
Auto response will not help if you are not using async IO. So consider not to use any long processing synchronous tasks inside handlers
# 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
dp = Dispatcher()
@dp.request_handler()
async def handle_all_requests(alice_request):
return alice_request.response('Hello world!')
If you want to use a faster json library, install rapidjson or ujson, it will be detected and used automatically
In all examples the next configuration is used:
WEBHOOK_URL_PATH = '/my-alice-webhook/' # webhook endpoint
WEBAPP_HOST = 'localhost' # running on local machine
WEBAPP_PORT = 3001 # we can use any port that is not use by other apps
For testing purposes you can use ngrok, so set webhook to https://1a2b3c4d5e.ngrok.io/my-alice-webhook/
(endpoint has to be WEBHOOK_URL_PATH
, because WebApp expects to get updates only there), post has to be WEBAPP_PORT
(in this example it is 3001)
For production you can use Nginx, then edit Nginx configuration and add these lines inside the server
block:
location /my-alice-webhook/ { # WEBHOOK_URL_PATH
proxy_pass http://127.0.0.1:3001/; # addr to reach WebApp, in this case it is localhost and port is 3001
proxy_redirect off;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Host $server_name;
}
FAQs
Asynchronous library for Yandex Dialogs (Alice) API
We found that aioAlice demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
A new site reviews software projects to reveal if they’re truly FOSS, making complex licensing and distribution models easy to understand.
Security News
Astral unveils pyx, a Python-native package registry in beta, designed to speed installs, enhance security, and integrate deeply with uv.
Security News
The Latio podcast explores how static and runtime reachability help teams prioritize exploitable vulnerabilities and streamline AppSec workflows.