Если запустить REPL с модулем asyncio, то вы входите в особый асинхронный REPL.
user@host:~$ python -m asyncio
asyncio REPL 3.12.7 ...
Use "await" directly instead of "asyncio.run()".
>>> import asyncio
>>>
В этом режиме
- создаётся и настраивается event loop
- уже импортирован asyncio
- работает await на верхнем уровне
То есть такая команда сработает без ошибок!
await asyncio.sleep(3)
Удобно для тестирования асинхронных функций без создания ивентлупов и остальной обвязки.
Работает в: 3.8+
#tricks#async
#typescript#chatbot#chatwoot#cloud_api#dify#evolution#n8n#openai#pusher#rabbitmq#typebot#whatsapp#whatsapp_api#whatsapp_bot
Evolution API is a powerful tool that lets you connect and control WhatsApp and other messaging platforms easily. It supports both free WhatsApp Web-based API and the official WhatsApp Business API, plus upcoming Instagram and Messenger support. You can integrate it with popular services like OpenAI for AI features, Chatwoot for customer support, and Amazon S3 for media storage. There’s also a lightweight version for simple, fast setups. Using Evolution API helps you automate messaging, manage chats, and build smart bots, saving time and improving communication for your business or projects.
https://github.com/EvolutionAPI/evolution-api