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

Import AI 399: 1,000 samples to make a reasoning model; DeepSeek proliferation; Apple's self-driving car simulator

Friday, February 14, 2025

What came before the golem? ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏

Defining Your Paranoia Level: Navigating Change Without the Overkill

Friday, February 14, 2025

We've all been there: trying to learn something new, only to find our old habits holding us back. We discussed today how our gut feelings about solving problems can sometimes be our own worst enemy

5 ways AI can help with taxes 🪄

Friday, February 14, 2025

Remotely control an iPhone; 💸 50+ early Presidents' Day deals -- ZDNET ZDNET Tech Today - US February 10, 2025 5 ways AI can help you with your taxes (and what not to use it for) 5 ways AI can help

Recurring Automations + Secret Updates

Friday, February 14, 2025

Smarter automations, better templates, and hidden updates to explore 👀 ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏

The First Provable AI-Proof Game: Introducing Butterfly Wings 4

Friday, February 14, 2025

Top Tech Content sent at Noon! Boost Your Article on HackerNoon for $159.99! Read this email in your browser How are you, @newsletterest1? undefined The Market Today #01 Instagram (Meta) 714.52 -0.32%

GCP Newsletter #437

Friday, February 14, 2025

Welcome to issue #437 February 10th, 2025 News BigQuery Cloud Marketplace Official Blog Partners BigQuery datasets now available on Google Cloud Marketplace - Google Cloud Marketplace now offers

Charted | The 1%'s Share of U.S. Wealth Over Time (1989-2024) 💰

Friday, February 14, 2025

Discover how the share of US wealth held by the top 1% has evolved from 1989 to 2024 in this infographic. View Online | Subscribe | Download Our App Download our app to see thousands of new charts from

The Great Social Media Diaspora & Tapestry is here

Friday, February 14, 2025

Apple introduces new app called 'Apple Invites', The Iconfactory launches Tapestry, beyond the traditional portfolio, and more in this week's issue of Creativerly. Creativerly The Great

Daily Coding Problem: Problem #1689 [Medium]

Friday, February 14, 2025

Daily Coding Problem Good morning! Here's your coding interview problem for today. This problem was asked by Google. Given a linked list, sort it in O(n log n) time and constant space. For example,

📧 Stop Conflating CQRS and MediatR

Friday, February 14, 2025

​ Stop Conflating CQRS and MediatR Read on: m​y website / Read time: 4 minutes The .NET Weekly is brought to you by: Step right up to the Generative AI Use Cases Repository! See how MongoDB powers your