The Real Python Podcast

Building a Python JSON Parser & Discussing Ideas for PEPs

12.01.2023 - By Real PythonPlay

Download our free app to listen on your phone

Download on the App StoreGet it on Google Play

Have you thought of a way to improve the Python language? How do you share your idea with core developers and start a discussion in the Python community? Christopher Trudeau is back on the show this week, bringing another batch of PyCoder’s Weekly articles and projects.

We consider a couple of Python syntax and functional ideas posted to the discussions on python.org. The first idea is for simplifying the syntax of a function’s keyword arguments, and the second is for the ability to return a NamedTuple from a function. The threads reveal steps within the Python Enhancement Proposal (PEP) process and the goal of finding a sponsor.

Christopher covers a tutorial on building a JSON-like parser in Python. The project is a solid place to start if you want to learn about parsing and developing rules for recognizing syntax and extracting data.

We also share several other articles and projects from the Python community, including a couple of release announcements and news items, a step-by-step guide to building a hangman game for the command line in Python, the reasons why the Django admin is supposedly ugly and ways to customize it to differentiate admin environments, an explanation of confusing git terminology, a project to extract links from a remote HTML resource, and a regex crossword game.

Course Spotlight: Advent of Code: Solving Puzzles With Python

Advent of Code is an online advent calendar that shares new programming puzzles each day from December 1 to the 25. In this Code Conversation, you’ll learn why solving programming puzzles can be beneficial and how you can get started with Advent of Code using Python.

Topics:

00:00:00 – Introduction

00:02:46 – PyPI has completed its first security audit

00:03:55 – Python Developers Survey 2023

00:04:45 – Wagtail 5.2 (LTS) Released

00:05:02 – How many Python core devs use typing?

00:07:51 – Build a Hangman Game for the Command Line in Python

00:17:30 – Why Is the Django Admin “Ugly”?

00:20:37 – Customize the Django Admin to Differentiate Environments

00:22:48 – Confusing git Terminology

00:30:01 – Video Course Spotlight

00:31:31 – Let’s Make a Silly JSON-like Parser

00:34:31 – Idea: Return a NamedTuple

00:45:08 – Idea: Syntactic Sugar to Encourage Use of Named Arguments

00:50:31 – grablinks: Extract Links From a Remote HTML Resource

00:52:43 – Regex Crossword

00:55:46 – Thanks and goodbye

News:

PyPI has completed its first security audit - The Python Package Index

Python Developers Survey 2023

Wagtail 5.2 (LTS) Released

How many Python core devs use typing? - Gram Publishing v2

Show Links:

Build a Hangman Game for the Command Line in Python – In this step-by-step project, you’ll learn how to write the game of hangman in Python for the command line. You’ll learn how to structure the game as a text-based interface (TUI) application.

Why Is the Django Admin “Ugly”? – When Vince was talking with people at DjangoCon US, one question kept coming up: Why is the Django admin so “ugly”?

Customize the Django Admin to Differentiate Environments – A quick post about changing the color scheme of the Django admin depending on what environment the code is deployed within. Although Django specific, this is a great idea—visually reminding your admins and developers whether they’re in dev, staging, or production.

Confusing git Terminology – Julia is working on a doc that explains git and, in doing so, polled some people about what git terminology they found confusing. This post covers the most common responses and attempts to clear up the confusion.

Let’s Make a Silly JSON-like Parser – This article goes into deep detail on how you would construct a JSON parser in Python. If you’re new to parsing, then this is a great place to start.

Discussion:

Idea: Return a NamedTuple

Idea: Syntactic Sugar to Encourage Use of Named Arguments

Projects:

grablinks: Extract Links From a Remote HTML Resource

Regex Crossword

Regex Crossword Mobile

Additional Links:

Episode #2: Learn Python Skills While Creating Games – The Real Python Podcast

Episode #179: Improving Your Git Developer Experience in Python – The Real Python Podcast

Write Pythonic and Clean Code With namedtuple – Real Python

Level up your Python skills with our expert-led courses:

Advent of Code: Solving Puzzles With Python

Everyday Project Packaging With pyproject.toml

Writing Clean, Pythonic Code With namedtuple

Support the podcast & join our community of Pythonistas

More episodes from The Real Python Podcast