PythonHub
2.47K subscribers
2.35K photos
49.6K links
News & links about Python programming.
https://pythonhub.dev/
Download Telegram
High-Performance Wavelet Matrix for Python, Implemented in Rust

https://pypi.org/project/wavelet-matrix/
1
Clock Synchronization Is a Nightmare

The author explains that physical clock synchronization is a "nightmare" because hardware oscillators inevitably drift due to temperature and aging, leading to critical failures in distributed systems like database inconsistencies and impossible debug traces. He argues that while algorithms like NTP and Cristian's attempt to bridge the gap, truly robust systems often must rely on logical...

https://arpitbhayani.me/blogs/clock-sync-nightmare
A different way to think about Python API Clients

The author argues that while building Python API servers has become mature and declarative through frameworks like FastAPI, API client integration remains a slow, "last mile" problem reliant on low-level boilerplate. To solve this, he introduces a new framework for his project, Clientele, which uses decorators and type hints to create a high-level, declarative developer experience for cl...

https://paulwrites.software/articles/python-api-clients
"Enabling" C threads in a Python / Wasm environment

The author details the significant hurdles of implementing high-performance C++ multithreading within a Pyodide (Python on WebAssembly) environment, specifically for real-time applications where Python's GIL and FFI overhead are too slow. His solution involves a custom-patched Pyodide built with -pthread and a specialized C++ thread pool that avoids deadlocks by using low-level Wasm buil...

https://yosefk.com/blog/enabling-c-threads-in-a-python-wasm-environment.html
Auto updating knowledge graph from meeting notes

Build a meeting knowledge graph from Google Drive using LLM extraction and graph database, with automatic continuous updates.

https://github.com/cocoindex-io/meeting-notes-knowledge-graph
randomized-svd

randomized-svd is a lightweight, high-performance Python library for computing the Randomized Singular Value Decomposition (rSVD).

https://github.com/massimofedrigo/randomized-svd
What async really means for your python web app?

The author challenges the hype around async Python, demonstrating through benchmarks that for most database-driven web apps, synchronous Django with connection pooling often outperforms or matches async alternatives. The study concludes that unless a service is highly distributed or the primary bottleneck, the overhead of async can actually degrade performance, making sync the more effic...

https://hackeryarn.com/post/async-python-benchmarks/
👍1
Static Protocols in Python: Behaviour Over Inheritance

Patrick Müller explores how Python's static protocols enable "static duck typing," allowing developers to define interfaces based on behavior (structural typing) rather than inheritance (nominal typing). He argues that this approach promotes loose coupling and greater flexibility in software design, particularly in complex fields like machine learning where diverse libraries and coding s...

https://patrickm.de/static-protocols-in-python/