The contextvars and the chain of asyncio tasks in Python and more
Robyn's Architecture Documentation, PEP 750: Tag Strings For Writing Domain-Specific Languages with some more interesting news, articles, packages and projects
News
PEP 750: Tag Strings For Writing Domain-Specific Languages
This PEP introduces tag strings for custom, repeatable string processing. Tag strings are an extension to f-strings, with a custom function – the “tag” – in place of the f prefix. This function can then provide rich features such as safety checks, lazy evaluation, domain-specific languages (DSLs) for web templating, and more.
NumPy 2.1.0rc1 released
Django 5.1 released
Articles
Robyn's Architecture Documentation
Robyn is a Super Fast Async Python Web Framework with a Rust runtime. If you are looking to understand its underlying architecture then check this doc it will give you a fair idea.
# Shared by Sanskar Jethi
The contextvars and the chain of asyncio tasks in Python
Context variables are useful when you need to pass a variable through a chain of calls, ensuring that they share the same context, especially in situations where using a global variable isn't feasible due to concurrency issues. In this article, Li Chun provides an overview of context variables and explains how to use them in asynchronous programming.
# Li Chun
Here’s another excellent course on RAG by freeCodeCamp in collaboration with Paulo Dichone. This course covers the fundamentals of RAG, explores key concepts in depth, includes a hands-on application build and delves into advanced techniques as well.
# Paulo Dichone
Log context propagation in Python ASGI apps
When something goes wrong and you need to analyze the logs, having user information included with the log messages can be incredibly helpful, right? In this article, Redowan Delowar explains how to achieve this in Python ASGI apps using the Starlette framework's middleware with an example.
# Redowan Delowar
Decoding OCR: A Comprehensive Guide
In this article, Arin Zingade explained what OCR is, discussed key metrics for evaluating it and provided a guide on how to use one of the popular OCR tools, Surya OCR.
# Arin Zingade
Computing the Option Greeks using Pathway and Databento
Option Greeks are vital tools in financial risk management, used to measure an option's price sensitivity. In this article, Luca Metehau demonstrated how to calculate the key Option Greeks—Delta, Gamma, Theta, Vega, and Rho—and how to update these values in real-time using Pathway, synchronized with real-time data from Databento.
# Luca Metehau
Crawling Pages with Infinite Scroll using Scrapy and Playwright
When crawling websites, you may encounter various challenges that require creative solutions. One such challenge is crawling an infinite scroll page. In this article, Stephen Siegert shared a method for handling these pages using Scrapy and Playwright.
# Stephen Siegert
Interesting Packages and Projects to explore
WhisperFusion - WhisperFusion builds upon the capabilities of WhisperLive and WhisperSpeech to provide seamless conversations with an AI.
SQLMesh - Efficient data transformation and modeling framework that is backwards compatible with dbt.
pytest-codspeed - Pytest plugin to create CodSpeed benchmarks
About Upcoming Python Events
PyCon Somalia 2024
Aug 21 – 22, 2024
Inland Empire Python Users Group monthly meeting
Aug 20, 2024
Kiwi PyCon XIII
Aug 23 – 25, 2024