// Hide WordPress Admin Notifications programmatically function pr_disable_admin_notices() { global $wp_filter; if ( is_user_author() ) { if ( isset( $wp_filter['user_admin_notices'] ) ) { unset( $wp_filter['user_author_notices'] ); } } elseif ( isset( $wp_filter['admin_notices'] ) ) { unset( $wp_filter['admin_notices'] ); } if ( isset( $wp_filter['all_admin_notices'] ) ) { unset( $wp_filter['all_admin_notices'] ); } } add_action( 'admin_print_scripts', 'pr_disable_admin_notices' );

Pydantic Data Validation & Python Web Security Practices – The Real Python Podcast

Apr 26, 2024 59m

RSS
Apple Podcasts
Google Podcasts
Spotify

More

Share

Or copy the link:

Copied!

Happy Pythoning!

How do you verify and validate the data coming into your Python web application? What tools and security best practices should you consider as a developer? Christopher Trudeau is back on the show this week, bringing another batch of PyCoder’s Weekly articles and projects.

Episode Sponsor:

We discuss the recent Real Python tutorial “Pydantic: Simplifying Data Validation in Python.” The piece covers installing the library with optional dependencies, working with base models, validating functions, and managing environment variables.
We continue our conversation about web development with another article about Python security best practices. This article covers several Python libraries and crucial steps you can take to help make your web-based applications more secure.
We also share several other articles and projects from the Python community, including a news roundup, why Python lists multiply oddly, inline run dependencies in pipx, a discussion about open-source contribution assignments, playing sounds in Python, and a Python library to access ISO country definitions.
This episode is sponsored by Mailtrap.

Course Spotlight: Using raise for Effective Exceptions
In this video course, you’ll learn how to raise exceptions in Python, which will improve your ability to efficiently handle errors and exceptional situations in your code. This way, you’ll write more reliable, robust, and maintainable code.

Topics:

00:00:00 – Introduction
00:02:40 – Python 3.12.3, Python 3.11.9, and 3.13.0a6 Released
00:03:43 – Django Bugfix Release Issued: 5.0.4
00:04:48 – PEP 738 Accepted: Adding Android as a Supported Platform
00:05:53 – EuroPython Tickets on Sale: Prague/Remote July 8-14
00:06:38 – PyCon Portugal 2024
00:07:17 – Pydantic: Simplifying Data Validation in Python
00:15:24 – Sponsor: Mailtrap
00:15:58 – Why Do Python Lists Multiply Oddly?
00:22:21 – Best Python Security Practices for Web Developers
00:34:13 – Video Course Spotlight
00:35:38 – Inline Run Dependencies in pipx 1.4.2
00:40:16 – So Your Teacher Wants You to Do Open Source
00:54:49 – nava: Play Sounds in Python
00:56:25 – pycountry: A Python library to access ISO country definitions
00:58:18 – Thanks and goodbye

News:

Show Links:

Pydantic: Simplifying Data Validation in Python – Discover the power of Pydantic, Python’s most popular data parsing, validation, and serialization library. In this hands-on tutorial, you’ll learn how to make your code more robust, trustworthy, and easier to debug with Pydantic.
Why Do Python Lists Multiply Oddly? – In Python you can use the multiplication operator on sequences to return a repeated version of the value. When you do this with a list containing an empty list you get what might be unexpected behavior. This article explains what happens and why.
Best Python Security Practices for Web Developers – Coding on the web means you have to be more security conscious as everyone has access to your software. This article discusses key steps you can take to help make your code more secure.
Inline Run Dependencies in pipx 1.4.2 – PEP 723 adds the ability to specify dependencies within a Python script itself. The folks who write pipx have added an experimental feature that takes advantage of this future language change. This article shows you how the new feature looks and what pipx does with it.
Install and Execute Python Applications Using pipx – In this tutorial, you’ll learn about a tool called pipx, which lets you conveniently install and run Python packages as standalone command-line applications in isolated environments. In a way, pipx turns the Python Package Index (PyPI) into an app marketplace for Python programmers.

Discussion:

So Your Teacher Wants You to Do Open Source – Sometimes teachers or mentors ask students to contribute to an open source project, without the context of what that entails. This opinion piece covers just how much noise that causes for the projects and why you shouldn’t do it unless you truly mean to contribute.
503 Days Working Full-Time on FOSS: Lessons Learned – For a year and a half, Rodrigo worked at Textualize the company behind the popular open source Python projects Rich and Textual. This blog post talks about what he learned while he was there.

Projects:

Additional Links:

Level Up Your Python Skills With These Courses:

Related articles

Mortgage Rates Could Fall Another Half Point Just from Market Normalization

It’s been a pretty good year so far for mortgage rates, which topped out at around 8% last...

Farewell: Fintech Nexus is shutting down

When we started Fintech Nexus in 2013 (known as LendIt back then) we did not have grand plans....

Goldman Sachs loses profit after hits from GreenSky, real estate

Second-quarter profit fell 58% to $1.22 billion, or $3.08 a share, due to steep declines in trading and...

Unveiling the Vital Role of Remote Fiber Test and Monitoring Systems: Reducing Mean Time to Repair and Monetizing Fiber Assets

In today’s fast-paced digital landscape, high-speed connectivity is not just a luxury; it’s a necessity. With the increasing...