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

Recording: 'Data Storytelling: What Organizations Need to Know Going Into 2025'

Friday, November 22, 2024

Thank you for your interest in our latest webinar. As promised here is your recording of the event. View email in browser Recording Now Available Thank you for your interest in receiving a recording of

💻 Issue 437 - Introducing local Azure Service Bus Emulator

Thursday, November 21, 2024

This week's Awesome .NET Weekly Read this email on the Web The Awesome .NET Weekly Issue » 437 Release Date Nov 21, 2024 Your weekly report of the most popular .NET news, articles and projects

💎 Issue 444 - Why did people rub snow on frozen feet? (2017)

Thursday, November 21, 2024

This week's Awesome Ruby Newsletter Read this email on the Web The Awesome Ruby Newsletter Issue » 444 Release Date Nov 21, 2024 Your weekly report of the most popular Ruby news, articles and

💻 Issue 444 - JavaScript Dos and Donts

Thursday, November 21, 2024

This week's Awesome JavaScript Weekly Read this email on the Web The Awesome JavaScript Weekly Issue » 444 Release Date Nov 21, 2024 Your weekly report of the most popular JavaScript news, articles

📱 Issue 438 - Reverse Engineering iOS 18 Inactivity Reboot

Thursday, November 21, 2024

This week's Awesome iOS Weekly Read this email on the Web The Awesome iOS Weekly Issue » 438 Release Date Nov 21, 2024 Your weekly report of the most popular iOS news, articles and projects Popular

💻 Issue 362 - React Anti-Pattern: Stop Passing Setters Down the Components Tree

Thursday, November 21, 2024

This week's Awesome React Weekly Read this email on the Web The Awesome React Weekly Issue » 362 Release Date Nov 21, 2024 Your weekly report of the most popular React news, articles and projects

💻 Issue 444 - Building simple event-driven applications with Pub/Sub

Thursday, November 21, 2024

This week's Awesome Node.js Weekly Read this email on the Web The Awesome Node.js Weekly Issue » 444 Release Date Nov 21, 2024 Your weekly report of the most popular Node.js news, articles and

📱 Issue 441 - Shift Left Is the Tip of the Iceberg

Thursday, November 21, 2024

This week's Awesome Swift Weekly Read this email on the Web The Awesome Swift Weekly Issue » 441 Release Date Nov 21, 2024 Your weekly report of the most popular Swift news, articles and projects

💻 Issue 439 - Async/Await Is Real And Can Hurt You

Thursday, November 21, 2024

This week's Awesome Rust Weekly Read this email on the Web The Awesome Rust Weekly Issue » 439 Release Date Nov 21, 2024 Your weekly report of the most popular Rust news, articles and projects

📲 Why I Ditched Linux for Samsung DeX — Buy This Instead of a Gaming Headset

Thursday, November 21, 2024

Also: Taking Instagram Stories to the Next Level, and More! How-To Geek Logo November 21, 2024 Did You Know Thurl Ravenscroft was both the voice behind the Christmas song "You're a Mean One,