Issue #620

Celery, Context Managers, Data Wrangling, and More

March 12, 2024

Celery, Context Managers, Data Wrangling, and More
#620 – MARCH 12, 2024 VIEW IN BROWSER
The PyCoder’s Weekly Logo
Creating Asynchronous Tasks With Celery and Django
In this video course, you’ll learn how to integrate Celery and Django using Redis as a message broker. You’ll refactor the synchronous email sending functionality of an existing Django app into an asynchronous task that you’ll run with Celery instead.
REAL PYTHON course

Understanding Context Manager and Its Syntactic Sugar
The Context Manager is gets used for all kind of interesting things around blocks of code. This article gives a background about the origins of the context manager, which problem it solves and how to use it.
BJÖRN RICKS • Shared by Björn Ricks

🚀 Sentry Launch Week: Making Debugging Fun
If you’ve ever been curious about Sentry or application performance monitoring, Launch Week is for you. Tune in from March 18-22 to get the scoop on new products, new features, and a bunch of other cool stuff. You can get a sneak peek (and win free swag) if you RSVP. It’s a win-win →
SENTRYsponsor

The Ultimate Guide to Data Wrangling With Python
This comprehensive user guide equips you with the skills required to use Python Polars Data Frames effectively for financial and supply chain data science analytics.
AMIT SHUKLA • Shared by Amit Shukla

GIL Disable Added to Main Branch of Python Project
GITHUB

Django Security Releases Issued: 5.0.3, 4.2.11, and 3.2.25
DJANGO SOFTWARE FOUNDATION

PyCon US 2024 Talk Schedule Announced
PYCON US


Articles & Tutorials


Building a Healthy Developer Mindset While Learning Python
How do you get yourself unstuck when facing a programming problem? How do you develop a positive developer mindset while learning Python? This week on the show, Bob Belderbos from Pybites is here to talk about learning Python and building healthy developer habits.
REAL PYTHON podcast

Asyncio Patterns in Python
This post talks about how to go from a slow, synchronous process, to a highly concurrent and lightning fast asyncio process. This article starts from the problem in it’s most basic form and incrementally shows you how to move towards concurrency with Asyncio in Python.
SKYLER LEWIS • Shared by CHernandez

Master Python: 250 Actionable Tips Await You
Elevate your Python skills with our FREE ebook containing 250 Bulletproof Python Tips. Ideal for developers eager to refine their coding prowess with practical, instantly applicable advice. Transform your Python code and join a thriving community of Python enthusiasts today →
PYBITESsponsor

Tag-Based Python CI/CD Pipeline
This article walks you through setting up a CI/CD pipeline using Github Actions for Python projects, that trigger on git tag pushes. It also includes a way of handling CI pipeline errors for any point of failure.
DHRUV AHUJA • Shared by Dhruv Ahuja

Python’s __all__: Packages, Modules, and Wildcard Imports
In this tutorial, you’ll learn about wildcard imports and the __all__ variable in Python. With __all__, you can prepare your packages and modules for wildcard imports, which are a quick way to import everything.
REAL PYTHON

Don’t Mock Machine Learning Models in Unit Tests
How you unit test machine learning code differs from typical software practices and simply using mock often doesn’t cut it. This post covers alternative ways of testing your ML software.
EUGENE YAN

Styling Excel Cells With OpenPyXL and Python
Many Python libraries that deal with Excel only handle data, but OpenPyXL gives you the ability to style your cells in many different ways. Learn how to give your spreadsheets pizazz!
MIKE DRISCOLL

Neat Parallel Output in Python
Max adapts some StackOverflow code to handle multiple output streams in parallel, giving you a quick way to handle the output from concurrent processes at the same time.
MAX BERNSTEIN

Python Deque Tutorial With 7 Example Use Cases
This tutorial teaches the mechanics of the data structure collections.deque, using seven example use cases where deque simplifies the implementation of a function.
RODRIGO GIRÃO SERRÃO • Shared by Rodrigo Girão Serrão

Improving Django Testing With Seed Database
A seed database is one with initial data for your project. They can be useful when testing and in CI/CD pipelines. This article shows you how to create them in Django.
KARL FREDRIK HAUGHLAND

Datetimes With Timezones in Python
The article shows examples of using timezones with datetime objects, using the zoneinfo module added in the standard library in Python 3.9.
MARKKU LEINIÖ • Shared by Markku Leiniö

Speed Up AI Development With Open Source Code Snippets
Save time and resources by building on top of our open-source sample apps. Get a headstart on development and deploy your AI apps faster with Intel’s OpenVINO toolkit.
INTEL CORPORATIONsponsor

Python Dependencies Are Fixable
Dependency management can be a hurdle for newcomers to Python, and this article argues that better defaults would be the right answer.
MAT DUGGAN

Generic Functions and Generic Classes in Python
Python does have generics! Learn how to use typing TypeVar and Generic to reuse code with proper typing.
GUI LATROVA • Shared by Gui Latrova


Projects & Code


Brought to you by Real Python for Teamssponsor
Online Python training created by a community of experts. Give your team the real-world Python skills they need to succeed →

django-simple-menu: Code-Based Menus for Django
GITHUB.COM/JAZZBAND

poltergeist: Rust-Like Error Handling in Python
GITHUB.COM/ALEXANDERMALYGA

whenever: Strict, Predictable, and Typed Datetimes
GITHUB.COM/ARIEBOVENBERG

PyprojectX: Make Reproducible Builds
GITHUB.COM/PYPROJECTX • Shared by Ivo Houbrechts

modguard: Enforce a Decoupled Architecture
GITHUB.COM/NEVER-OVER

📆🐍 Upcoming Python Events


What’s New in Wagtail CMS Webinar
March 12 to March 13, 2024

Weekly Real Python Office Hours Q&A (Virtual)
March 13, 2024

Python Atlanta
March 14 to March 15, 2024

PyCon SK 2024
March 15 to March 18, 2024

Django Girls Eket Workshop
March 15 to March 17, 2024

Chattanooga Python User Group
March 15 to March 16, 2024
Happy Pythoning!
Copyright © 2024 PyCoder’s Weekly, All rights reserved.