Issue #588 (Aug. 1, 2023)

#588 – AUGUST 1, 2023

Python 3.12 Preview: More Intuitive and Consistent F-Strings

In this tutorial, you’ll preview one of the upcoming features of Python 3.12, which introduces a new f-string syntax formalization and implementation. The new implementation lifts some restrictions and limitations that affect f-string literals in Python versions lower than 3.12.
REAL PYTHON

Python: Profile a Section of Code With cProfile

“When trying to improve a slow function or module, it’s always a good idea to profile it. Here’s a snippet for quickly profiling a section of code with Python’s cProfile module.”
ADAM JOHNSON

AI/ML and Your Tech Career: Get the Answers You Need With Interview Kickstart

Will AI replace tech jobs or will your job evolve? Is it too late to switch to a career in AI/ML? Attend Interview Kickstart’s free session with Co-founder Soham Mehta (ex-Engineering Head @Box) to explore your AI career path, gain insights from FAANG AI/ML engineers, and find answers. Register now →
INTERVIEW KICKSTART sponsor

Python Quirks

A straight-out list of code snippets showing off some of the weird and unexpected behavior of your favorite language.
NATHAN

Steering Council Announces Optional GIL

PYTHON.ORG

Articles & Tutorials

Getting Started With Vector DBs in Python

Vector databases are all the rage today, with LLMs driving their popularity. This article breaks down nine different choices in details including how you connect to them in Python. It even points you at a few others in case you need more.
DANIEL DOUBROVKINE

Socket Programming in Python Part 1: Handling Connections

In this video course, you’ll learn how to build a socket server and client with Python. Along the way, you’ll get to know the main functions and methods in Python’s socket module, and you’ll implement a multi-connection server and client.
REAL PYTHON course

CTF 101 Workshop | Aug 3 @ 11am EDT | Register for Free

Did you know Snyk can be used to solve CTF challenges? Join Snyk’s CTF 101 Workshop to learn how, and get live support from CTF experts in the virtual hands-on lab as you solve your first challenge. Plus, (ISC)2 members will get 1 credit. Save your spot →
SNYK.IO sponsor

Leveraging Your Database With Postgres and Python

Are you getting the most out of your Postgres database? What features could you leverage to improve your Python project? This week on the show, Craig Kerstiens from Crunchy Data is here to discuss getting the most out of Postgres.
REAL PYTHON podcast

Using Rich Inspect to Interrogate Python Objects

You might know the Rich library as the terminal color tool, but it has a few utilities in it that are generally helpful in your code. This article shows you the inspect feature that gives you loads of info on an object.
WILL MCGUGAN

End to End Data Applications With SQL and Jupyter

This comprehensive course gives you a step-by-step introduction to building data applications using Python, SQL, and Jupyter notebooks. It even includes an introduction to visualization using plotly and others.
PLOOMBER

Flood Fill Mazes

This article shows you how to generate mazes using jupyter notebooks, numpy, matplotlib, and the scikit-image flood_fill function. It shows both a traditional square-cornered maze as well as a bendy labyrinth.
IAN WARD

Text Editor Data Structures

This article details the different ways a text editor represents text in memory and the advantages of each. Unfortunately, the examples aren’t in Python, but there is plenty CS stuff to dig into here.
CAMERON DACAMARA

Software Design by Example

This is CS 101 in a web friendly format. It covers the basic concepts of software design using examples, with a focus on self taught data scientists who want to bring their coding to the next level.
THIRD-BIT.COM

A Practical Use for &=

Can you already picture real use cases for this little Pythonic gem? Learn about the bitwise-and-equal operator and where it can be used.
PETE FISON • Shared by Pete Fison

EuroPython 2023

Python’s Developer in Residence has starting blogging again and this week he sums up his experience at EuroPython 2023.
ŁUKASZ LANGA

Working With AJAX in Django

This article looks at how to perform GET, POST, PUT, and DELETE AJAX requests in Django with the Fetch API and jQuery.
YACINE ROUIZI • Shared by Yacine Rouizi

Running Untrusted Python Code

Andrew wanted to play with some untrusted Python. Read how he used seccomp and setrlimit to build a Python sandbox.
ANDREW HEALEY

Projects & Code

training-code: Fine-Tuning Causal Language Models

GITHUB.COM/PYGMALIONAI

django-pgcrypto-fields: Django Encryption With Pgcrypto

GITHUB.COM/INCUNA

Comprehensive Python Cheatsheet

GTO76.GITHUB.IO

plotoptix: Ray Tracing in Python Based on OptiX

GITHUB.COM/RND-TEAM-DEV

basaran: OSS Alternative to OpenAI Text Completion API

GITHUB.COM/HYPERONYM

Events

Weekly Real Python Office Hours Q&A (Virtual)

August 2, 2023
REALPYTHON.COM

Canberra Python Meetup

August 3, 2023
MEETUP.COM

Melbourne Python Users Group, Australia

August 7, 2023
J.MP

PiterPy Meetup

August 8, 2023
PITERPY.COM

PyCon KR

August 11 to August 14, 2023
PYCON.KR

Django Girls Abuja

August 11 to August 13, 2023
DJANGOGIRLS.ORG

Happy Pythoning!
This was PyCoder’s Weekly Issue #588.
View in Browser »

[ Subscribe to 🐍 PyCoder’s Weekly 💌 – Get the best Python news, articles, and tutorials delivered to your inbox once a week >> Click here to learn more ]

Source:: PyCoder’s