PythonHub
2.4K subscribers
2.35K photos
49.1K links
News & links about Python programming.
https://pythonhub.dev/
Download Telegram
FastAPI and cooperative multi-threading

Cal Paterson wrote a great article comparing and describing synchronous and asynchronous Python frameworks and explaining why asynchronous frameworks go a bit wobbly under load. This is a story of how we experienced wobbliness in a recent project.

https://aivarsk.com/2022/01/21/fastapi-concurrency/
The fastest way to read a CSV in Pandas

You have a large CSV, you’re going to be reading it in to Pandas—but every time you load it, you have to wait for the CSV to load. And that slows down your development feedback loop, and might meaningfully slows down your production processing. In this post, learn the fastest way to read a CSV in to Pandas.

https://pythonspeed.com/articles/pandas-read-csv-fast/
Building for Balance

How Instacart Marketplace team developed a unified marketplace balancing engine with machine learning and optimization

https://tech.instacart.com/building-for-balance-e61fb9511893
Black, the uncompromising Python code formatter, is stable

https://pypi.org/project/black/
How we optimized Python API server code 100x

Some of the tricks we used to speed up calls to our analytical API written in Python: played with asyncio, messed with SQLAlchemy, hacked deep in asyncpg, rewrote parts in Cython, found better data structures, replaced some pandas with pure numpy.

https://t.co/jiRKVYHkl0