PythonHub
2.66K subscribers
2.35K photos
50.7K links
Human-curated Python news, projects, articles & tools.

https://pythonhub.dev/
Download Telegram
How to find and fix N+1 queries in Django

Learn how to identify and eliminate N+1 queries in Django using selectrelated(), prefetchrelated(), and SQL profiling tools to reduce unnecessary database operations. A practical example demonstrates reducing query counts from 61 to 2, with additional guidance on optimizing serializers, avoiding over-fetching, and preventing regressions through automated tests.

https://codewithstein.com/fix-n-plus-one-queries-django/
Learn Data Structures and Algorithms in Python with Visualizations

Learn data structures and algorithms in Python in this beginner's course. This course covers arrays, linked lists, stacks, queues, hash tables, trees, heaps, and graphs, plus recursion, searching, sorting, and interview prep. Each topic is explained with custom animations and visualizations alongside Python code examples. By the end, you will understand how the most important data struct...

https://www.youtube.com/watch?v=ybe6EGe_wjo
Pytml

Pytml is a lightweight, open-source PyScript alternative that lets developers run Python directly in HTML using a single script tag, with support for DOM interaction, UI controls, and Python packages through Pyodide.

https://github.com/NodeX-AR/Pytml
Functional Programming Ideas Every Python Developer Should Know

This video explores how functional programming principles, such as pure functions and immutable data, improve Python code readability and testability. It also demonstrates the functional core, imperative shell pattern for separating business logic from infrastructure concerns.

https://www.youtube.com/watch?v=bcdZlYPn3BA
Faster CI with Orchestrated Pytest Workers

Close reduced CI execution time for nearly 58,000 Python integration tests from approximately 12 minutes to 2.5 minutes by replacing static pytest test splitting with dynamically orchestrated workers. The system uses centralized job scheduling, AWS Spot Instances, and automatic work redistribution when workers are interrupted to improve test execution efficiency while maintaining similar...

https://making.close.com/posts/faster-ci-with-orchestrated-pytest-workers/