PythonHub
2.49K subscribers
2.35K photos
50K links
News & links about Python programming.
https://pythonhub.dev/
Download Telegram
Decoupling Your Business Logic from the Django ORM

As Django apps grow, stuffing business logic into views, models, and managers creates tangled code, slow tests, and ORM-driven performance issues like overfetching and N+1 queries. The solution proposed is moving domain logic into typed plain-Python classes while using the ORM only for persistence, making systems cleaner, faster, easier to test, and easier to evolve.

https://buttondown.com/carlton/archive/decoupling-your-business-logic-from-the-django-orm/
Django: fixing a memory “leak” from Python 3.14’s incremental garbage collection

Adam Johnson explains how Python 3.14's new incremental garbage collection caused excessive memory growth during Django migrations, leading to out-of-memory errors on resource-constrained servers. He shares a practical workaround by explicitly triggering garbage collection after each migration step, and notes the issue helped support the planned revert to the prior GC behavior in Python ...

https://adamj.eu/tech/2026/04/20/django-python-3.14-incremental-gc/
Reimagine Python Notebooks in the AI Era

Traditional notebooks are evolving as AI shifts more value from writing syntax to guiding workflows, reviewing outputs, and iterating through natural-language prompts. The emerging model emphasizes reactive cells and integrated LLM tooling that can turn linear notebooks into more interactive, dynamic applications.

https://mljar.com/blog/reimagine-python-notebook-in-ai-era/
What Most Python Developers Miss About Generators

Most Python developers view generators as a memory optimization, but their deeper value is controlling when computation happens and how data flows through a system. They enable lazy pipelines, backpressure handling, two-way communication, and patterns that extend naturally into async streaming architectures.

https://www.youtube.com/watch?v=5VN-3rIUPZ8
Array API adoption: Performance wins across the ecosystem

Adopting the Array API standard lets major Python libraries run the same code across backends like NumPy, PyTorch, CuPy, and JAX, unlocking dramatic speedups with minimal user changes. The broader impact is a more interoperable scientific Python ecosystem where GPU acceleration and new hardware become accessible without rewriting entire libraries.

https://labs.quansight.org/blog/array-api-meta-blogpost
Implementing MikroTik's Binary API Protocol in Python from Scratch

A deep dive into implementing MikroTik's proprietary RouterOS binary API protocol in Python — variable-length encoding, sentence-based messaging, and programmatic network infrastructure control. Zero dependencies, 137 lines.

https://www.joekarlsson.com/blog/implementing-mikrotik-binary-api-protocol-in-python/
Dinobase

Dinobase is an agent-first data platform that syncs 100+ sources like APIs, databases, files, and MCP servers into SQL-ready tables with automatic data annotation.

https://github.com/DinobaseHQ/dinobase