Skip to main content

All Questions

2 votes
1 answer
134 views

Asyncio Loop Within Asyncio Loop

I'm just starting to use Asyncio and I'm trying to use it to parse a website. I'm trying to parse 6 sections (self.signals) of the site, each section has N number of pages with tables on them, so ...
aseylys's user avatar
  • 354
0 votes
1 answer
863 views

running python application with asyncio async and await

I am trying to use asyncio and keywords await/async with python 3.5 I'm fairly new to asynchronous programming in python. Most of my experience with it has been with NodeJS. I seem to be doing ...
Riley Hughes's user avatar
  • 1,484
0 votes
1 answer
183 views

Asynchronous loop within an asynchronous loop in python

I am working on a web-scraping bot which needs to return all of its information very quickly. My main class Whole generates a list of Query objects. Here is my query class: class Query: #each query ...
Nameer Hirschkind's user avatar
4 votes
1 answer
5k views

Python: awaiting a list of coroutines sequentially

I want to await a list of coroutines sequentially in Python, i.e. I do not want to use asyncio.gather(*coros). The reason for this is that I'm trying to debug my app, so I want to pass a command-line ...
James Ko's user avatar
  • 34.7k
2 votes
1 answer
3k views

How python asyncIO, suspend & resume the task?

A style of programming in which task release the CPU during waiting periods, so that other tasks can use it. To introduce an async task, A task should be capable to suspend & resume An event ...
overexchange's user avatar
3 votes
1 answer
4k views

Using async/await syntax with Twisted callbacks

I'd like to use async/await syntax with Twisted Deferred.addCallback method. But as stated in the documentation, addCallback callback is called synchronously. I've seen inlineCallbacks decorator used ...
user1527491's user avatar
2 votes
2 answers
1k views

Python asyncio, possible to await / yield entire myFunction()

I've written a library of objects, many which make HTTP / IO calls. I've been looking at moving over to asyncio due to the mounting overheads, but I don't want to rewrite the underlying code. I've ...
Xerphiel's user avatar
  • 1,143
15 votes
1 answer
51k views

Writing files asynchronously

I've been trying to create a server-process that receives an input file path and an output path from client processes asynchronously. The server does some database-reliant transformations, but for the ...
Eli Korvigo's user avatar
  • 10.5k
4 votes
1 answer
3k views

Transfer Large Files Asynchronously In Flask

What is the best approach for transfer large files Asynchronously in Flask? I have read this article. But I want to know if there is a way to do this without using celery?
TheNone's user avatar
  • 5,792
2 votes
0 answers
1k views

Sanic Server Python 3.5 create async queue to write to AWS SQS

Testing out Sanic, currently have routes that when hit triggers a write to SQS. Trying to make that write asynchronous by adding the info to a queue that is then consumed 'independently' (in a non-...
pauld's user avatar
  • 421
1 vote
1 answer
2k views

Python asyncio - consumer blocking with asyncio.Event()

I have a program with one producer and two slow consumers and I'd like to rewrite it with coroutines in such way that each consumer will handle only last value (i.e. skip new values generated during ...
Łukasz Hryniuk's user avatar
4 votes
2 answers
7k views

A correct/common way to log async calls

Let's say we have a some async call of IO operation and we want to log it. The simplest way looks like this: async def f(): logger.log('io was called') await call_some_io() But we obviously ...
Paul's user avatar
  • 6,777
32 votes
2 answers
15k views

Python 3.5 async/await with real code example

I've read tons of articles and tutorial about Python's 3.5 async/await thing. I have to say I'm pretty confused, because some use get_event_loop() and run_until_complete(), some use ensure_future(), ...
n1_'s user avatar
  • 4,407
1 vote
2 answers
1k views

Proxybroker IndexError

I'm trying to use the python package proxybroker. I tried to use one of the examples mentioned here. I just copied the following example to run locally: import asyncio from proxybroker import Broker ...
sebisnow's user avatar
  • 2,097
1 vote
1 answer
413 views

python3.5: with aiohttp is it possible to serve several responses concurently?

I'm using the latest version (1.0.2) of aiohttp with python3.5 I have the following server code import asyncio from aiohttp.web import Application, Response, StreamResponse, run_app async def long(...
allan.simon's user avatar
  • 4,336

15 30 50 per page