Top "Python-asyncio" questions

This tag is to be used for the asyncio Python package which provides mechanisms for writing single-threaded concurrent code.

Asyncio.gather vs asyncio.wait

asyncio.gather and asyncio.wait seem to have similar uses: I have a bunch of async things that I want …

python python-asyncio
RuntimeError: This event loop is already running in python

I think I'm getting this error because my code calls asyncio.get_event_loop().run_until_complete(foo()) twice. Once …

python python-asyncio
What does "SSLError: [SSL] PEM lib (_ssl.c:2532)" mean using the Python ssl library?

I am trying to use connect to another party using Python 3 asyncio module and get this error: 36 sslcontext = ssl.SSLContext(…

python python-3.x ssl ssl-certificate python-asyncio
RuntimeError: There is no current event loop in thread in async + apscheduler

I have a async function and need to run in with apscheduller every N minutes. There is a python code …

python python-3.x python-asyncio aiohttp apscheduler
asyncio.ensure_future vs. BaseEventLoop.create_task vs. simple coroutine?

I've seen several basic Python 3.5 tutorials on asyncio doing the same operation in various flavours. In this code: import asyncio …

python python-3.x python-3.5 coroutine python-asyncio
How to properly create and run concurrent tasks using python's asyncio module?

I am trying to properly understand and implement two concurrently running Task objects using Python 3's relatively new asyncio module. …

python concurrency task python-3.4 python-asyncio
How can I periodically execute a function with asyncio?

I'm migrating from tornado to asyncio, and I can't find the asyncio equivalent of tornado's PeriodicCallback. (A PeriodicCallback takes two …

python python-3.x tornado python-3.5 python-asyncio
Getting values from functions that run as asyncio tasks

I was trying the following code: import asyncio @asyncio.coroutine def func_normal(): print("A") yield from asyncio.sleep(5) print("…

python python-3.x python-3.4 python-asyncio
Python3.6 AttributeError: module 'asyncio' has no attribute 'run'

I tried to read https://hackernoon.com/asynchronous-python-45df84b82434. It's about asynchronous python and I tried the code from …

python python-3.6 python-asyncio
Asynchronous exception handling in Python

I've the following code using asyncio and aiohttp to make asynchronous HTTP requests. import sys import asyncio import aiohttp @asyncio.…

python python-3.x python-asyncio