Python Weekly - Python Weekly - Issue 630

View this email in your browser

Python Weekly

Welcome to issue 630 of Python Weekly. Let's get straight to the links this week.
From Our Sponsor 
Get Your Weekly Dose of Programming
A weekly newsletter featuring the best hand curated news, articles, tutorials, talks, tools and libraries etc for programmers.
Join For Free

Articles, Tutorials and Talks

Vector Search RAG Tutorial – Combine Your Data with LLMs with Advanced Search 
Learn how to use vector search and embeddings to easily combine your data with large language models like GPT-4. You will first learn the concepts and then create three projects.

Annotated At Runtime
PEP 593 is a bit vague on how you’re supposed to actually consume arguments to Annotated; here is my proposal.

pytest daemon: 10X Local Test Iteration Speed
At Discord, their Python test suite suffered from slow local test runs, taking 13 seconds per test. They built a pytest daemon that improves local test iteration speed by 10x, significantly reducing development time. This solution involves offloading heavy work to a background process and caching results, bypassing slow imports and fixtures.

How Many Lines of C it Takes to Execute a + b in Python?
Understand the mechanics of dynamic dispatch implementation in CPython.

Why if TYPE_CHECKING?
The article discusses the use of conditional imports in Python, particularly the if TYPE_CHECKING pattern, to address differences in typechecking enforced by tools like mypy and typechecking at runtime. It explores the need for this pattern when dealing with large sets of custom classes that depend on each other and could result in circular dependencies.

The Fanout Pattern Explained
The article discusses the use of the fanout pattern in the context of Celery tasks, where a single task can be replaced with a variable number of other tasks. It provides a practical example of the fanout pattern and its application in handling complex task signatures, emphasizing its power in task design and management within the Celery framework. The fanout pattern is illustrated through code examples, demonstrating its ability to handle sequential and parallel task execution, offering insights into its effectiveness for task orchestration and workload distribution

Django: Sanitize incoming HTML fragments with nh3
Let’s look at how to use nh3 for HTML sanitisation in Django forms. You can adapt this approach to other situations, such as in DRF serializers.

Real-world match/case
Python 3.10 introduced structural pattern matching, known as match/case, which allows for matching patterns in the structure of data. The article provides a real-world example of using match/case to simplify the examination of complex JSON payloads received from a GitHub bot, demonstrating its practical application in handling deeply nested data structures. The author highlights how match/case made the task much simpler compared to traditional methods of picking apart the payloads


Interesting Projects, Tools and Libraries

coffee
Build and iterate on your UI 10x faster with AI - right from your own IDE.

µHTTP
µHTTP emerged from the need of a simple web framework. It's great for micro-services, single page applications, AND monolithic monsters.

PurpleLlama
Set of tools to assess and improve LLM security.

Arrest
Arrest is a small utility to easily structure and validate your REST api calls using pydantic and httpx.

LLMCompiler
An LLM Compiler for Parallel Function Calling.

Pearl
A Production-ready Reinforcement Learning AI Agent Library brought by the Applied Reinforcement Learning team at Meta.

Mamba-Chat
Mamba-Chat is the first chat language model based on a state-space model architecture, not a transformer.

Netchecks
Netchecks is a set of tools for testing network conditions and asserting that they are as expected.

concordia
A library for generative social simulation.

Cyclopts
Intuitive, easy CLIs based on python type hints.

UniDep
Single source of truth with requirements for pip and conda.


New Releases

Python in Visual Studio Code – December 2023 Release
This release includes the following announcements:
  • Configurable debugging options added to Run button menu
  • Show Type Hierarchy with Pylance
  • Deactivate command support for automatically activated virtual environments in the terminal
  • Setting to turn REPL Smart Send on/off and a message when it is unsupported

Python 3.12.1
 
Our Other Newsletters
Programmer Weekly - A free weekly newsletter for programmers.

Founder Weekly - A free weekly newsletter for entrepreneurs featuring best curated content, must read articles, how to guides, tips and tricks, resources, events and more.
 
Copyright © 2023 Python Weekly, All rights reserved.
You are receiving our weekly newsletter because you signed up at http://www.PythonWeekly.com.

Our mailing address is:
Python Weekly
Brooklyn
Brooklyn, NY 11209

Add us to your address book


Want to change how you receive these emails?
You can update your preferences or unsubscribe from this list.

Older messages

Python Weekly - Issue 629

Thursday, December 7, 2023

View this email in your browser Python Weekly Welcome to issue 629 of Python Weekly. Let's get straight to the links this week. From Our Sponsor Get Your Weekly Dose of Programming A weekly

Python Weekly - Issue 628

Thursday, November 30, 2023

View this email in your browser Python Weekly Welcome to issue 628 of Python Weekly. One of the Y Combinator companies is looking for a Founding Engineer with 6+ years of experience, expertise in ETL,

Python Weekly - Issue 627

Thursday, November 23, 2023

View this email in your browser Python Weekly Welcome to issue 627 of Python Weekly. Let's get straight to the links this week. From Our Sponsor Use GenAI to report on product development Stepsize

Python Weekly - Issue 626

Friday, November 17, 2023

View this email in your browser Python Weekly Welcome to issue 626 of Python Weekly. Let's get straight to the links this week. From Our Sponsor Get Your Weekly Dose of Programming A weekly

Python Weekly - Issue 625

Thursday, November 9, 2023

View this email in your browser Python Weekly Welcome to issue 625 of Python Weekly. Let's get straight to the links this week. From Our Sponsor Linting is a process where errors in the code can be

You Might Also Like

iOS Dev Weekly - Issue 693

Friday, January 3, 2025

Happy New Year, and here's to a cracking 2025! 🎊 View on the Web Archives ISSUE 693 January 3rd 2025 Comment Happy New Year, everyone! 🎊 I hope you all had a restful and relaxing break if you took

JSK Daily for Jan 3, 2025

Friday, January 3, 2025

JSK Daily for Jan 3, 2025 View this email in your browser A community curated daily e-mail of JavaScript news Optimizing Productivity: Integrate Salesforce with JavaScript Scheduler Syncfusion

Daily Coding Problem: Problem #1657 [Easy]

Friday, January 3, 2025

Daily Coding Problem Good morning! Here's your coding interview problem for today. This problem was asked by Airbnb. Given a linked list and a positive integer k , rotate the list to the right by k

🍎 How I Use Trackpad Gestures to Manage my Mac — Are You Wearing Your Smartwatch Correctly?

Friday, January 3, 2025

Also: I Used a Temporary eSIM While Traveling and Have Thoughts How-To Geek Logo January 3, 2025 Did You Know There might never have been a Star Wars if not for George Lucas' lead foot and diabetes

SWLW #632: On avoiding pile-ups, The Chief Architect role, and more.

Friday, January 3, 2025

Weekly articles & videos about people, culture and leadership: everything you need to design the org that makes the product. A weekly newsletter by Oren Ellenbogen with the best content I found

Ranked | The World's Top Companies by Revenue in 2024 💵

Friday, January 3, 2025

Walmart, Amazon, and China's State Grid generate over half a trillion dollars in annual revenue, driven by their vast global presence. View Online | Subscribe | Download Our App FEATURED STORY

Issue #574: Web gaming strikes back, Doom Captcha, and Phaser Box2D

Friday, January 3, 2025

View this email in your browser Issue #574 - January 3rd 2025 Weekly newsletter about Web Game Development. If you have anything you want to share with our community please let me know by replying to

Could AI make you a billionaire?

Friday, January 3, 2025

Siri's secret recordings; Is streaming still worth it?; Transform your doodles with AI -- ZDNET ZDNET Tech Today - US January 3, 2025 lm-email-verifaction-tool Could AI make you a billionaire in

⚙️ The grid can't handle AI

Friday, January 3, 2025

Plus: Anthropic's guardrails ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌

LDAPNightmare PoC Exploit Crashes LSASS and Reboots Windows Domain Controllers

Friday, January 3, 2025

THN Daily Updates Newsletter cover JavaScript: Mastering JavaScript from Basics to Advanced Topics ($54.99 Value) FREE for a Limited Time This book provides a comprehensive introduction to JavaScript