Skip to main content
6 votes
Accepted

Zipping Many Files

swallowing exceptions ...
J_H's user avatar
  • 43.3k
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 ...
Peilonrayz's user avatar
  • 44.6k
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 ...
toolic's user avatar
  • 16.4k
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 ...
J_H's user avatar
  • 43.3k
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 ...
James's user avatar
  • 61
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 ...
Simply Beautiful Art's user avatar
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 ...
0xKate's user avatar
  • 521
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 ...
Reinderien's user avatar
  • 71.2k
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.
J_H's user avatar
  • 43.3k
1 vote

Python RESTClient Class with asyncio and aiohttp

I've updated the code according to the feedback from @Peilonrayz (thanks!) rest.py ...
Niels Perfors's user avatar

Only top scored, non community-wiki answers of a minimum length are eligible