6
votes
Accepted
2
votes
Python RESTClient Class with asyncio and aiohttp
While creating this bit of code, I ran into a few problems with the asyncio loop that, to be honest, I know very little about.
You are using asyncio very ...
2
votes
Zipping Many Files
In addition to the good advice in the other answer, there area a few more minor points to consider.
Readability
For large numbers like 1000000, it is nice to use ...
1
vote
Optimizing domain requests and filtering results with Polars
design
"I hold a hammer, and as I look around I see many nails."
The OP design seems to be constrained by some "batched" APIs
that are already in your codebase.
Consider revisiting ...
1
vote
Converting python code to async calls
After doing some reading and taking the advice of FMc, I decided against async for what I was doing.
I ended up with multi-processing
...
1
vote
Asynchronous mailing tool
Decorators
When looking at decorators, I ask 3 questions:
How long does it take me to make heads or tails of what the decorator is doing?
Does the decorated function still make sense as its original ...
1
vote
Bulk recompiling edits to files by running external processes with a pool of 4 workers using asyncio
Combining concurrent.futures and subprocess libraries, seems to be the shortest sync way to achieve the same results. This ...
1
vote
What is the best way to retrieve all pages of a REST API route with Python aiohttp when the number of pages is unknown?
Don't format your token and page parameters into your URL. aiohttp supports passing a params dict to get.
I assume that you've ...
1
vote
Python asyncio multithread wrapper
are there known packages for my use case?
Yes.
Use 0mq, RabbitMQ, kafka, or similar pub/sub platform,
to address horizontal scaling issues.
1
vote
Python RESTClient Class with asyncio and aiohttp
I've updated the code according to the feedback from @Peilonrayz (thanks!)
rest.py
...
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
python × 11asyncio × 11
python-3.x × 5
asynchronous × 3
multithreading × 2
beginner × 1
web-scraping × 1
api × 1
concurrency × 1
email × 1
rest × 1
beautifulsoup × 1
pagination × 1
child-process × 1
websocket × 1
apache-kafka × 1