PythonHub
2.44K subscribers
2.35K photos
49.4K links
News & links about Python programming.
https://pythonhub.dev/
Download Telegram
DuckDB vs Polars. Wait. DuckDB and Polars.

The article emphasizes that DuckDB and Polars are not direct competitors but complementary tools in the Modern Data Stack, with each excelling in different contexts: DuckDB is best for SQL-heavy analytics and embedding as a query engine, while Polars suits end-to-end ETL pipelines and DataFrame-centric workflows. The choice depends on your problem context, team comfort, and use case rath...

https://www.confessionsofadataguy.com/duckdb-vs-polars-wait-duckdb-and-polars/
Simplifying Resource Management in mssql-python through Context Manager

The article introduces context manager support in the mssql-python driver, allowing Python applications to manage SQL Server and Azure SQL resources more safely and efficiently using Python's "with" statement. This feature automates opening and closing of connections and cursors, as well as commit and rollback of transactions, reducing boilerplate code, preventing resource leaks, and ens...

https://devblogs.microsoft.com/python/simplifying-resource-management-in-mssql-python-through-context-manager/
Effective context engineering for AI agents

Context is a critical but finite resource for AI agents. In this post, we explore strategies for effectively curating and managing the context that powers them.

https://www.anthropic.com/engineering/effective-context-engineering-for-ai-agents
I stopped using the Django shell because of marimo

The video explains how marimo, a modern Python notebook, enhances productivity in Django projects by integrating SQL support, coding agents, and interactivity beyond the traditional Django shell. It demonstrates using marimo for database connections, asynchronous Django ORM operations, custom admin interfaces, and reactive, interactive notebooks that combine SQL, Python, and UI elements ...

https://www.youtube.com/watch?v=ksGIAy2s_5k
SOLID: Writing Better Python Without Overengineering

The video explores applying the SOLID design principles to improve Python code quality by refactoring a messy sales report script into both a clean class-based and a lean functional version. It discusses the relevance of SOLID principles in Python, showing how they enhance code modularity, testability, and maintainability while highlighting when they might lead to overengineering.

https://www.youtube.com/watch?v=uxwjXLjJOoM
👍1