In this guide, you will get a look into Python type checking. Traditionally, types have been handled by the Python interpreter in a flexible but implicit way. Recent versions of Python allow you to specify explicit type hints that can be used by different tools to help you develop your code more efficiently. In this […]
Author: Real Python
Modeling Polymorphism in Django With Python
Modeling polymorphism in relational databases is a challenging task. In this article, we present several modeling techniques to represent polymorphic objects in a relational database using the Django object-relational mapping (ORM). This intermediate-level tutorial is designed for readers who are already familiar with the fundamental design of Django. Free Bonus: Click here to get the […]
Python Community Interview With Corey Schafer
For this week’s community interview, I am joined by Corey Schafer, of YouTube fame. Corey is a full-time content creator publishing regular Python tutorials on YouTube. In this interview, we talk to Corey about his YouTube channel and his advice for budding YouTubers and content creators, getting his first developer job, and his passion for […]
Make a Location-Based Web App With Django and GeoDjango
Throughout this tutorial, you’ll learn how to use Django and GeoDjango to build a location-based web application from scratch. You’ll be building a simple nearby shops application that lists the shops closest to a user’s location. By the end of this tutorial, you’ll be able to: Use Django to build a simple web application from […]
How to Write Beautiful Python Code With PEP 8
PEP 8, sometimes spelled PEP8 or PEP-8, is a document that provides guidelines and best practices on how to write Python code. It was written in 2001 by Guido van Rossom, Barry Warsaw, and Nick Coghlan. The primary focus of PEP 8 is to improve the readability and consistency of Python code. PEP stands for […]
A Pythonista’s Holiday Wish List
It’s that time of year again when everyone is looking to get last minute gifts. Whether you’re a friend of a Python developer or one yourself, I’ve got the perfect wish list if you’re looking to get a little something special. I’ve combed through the interwebs and polled my fellow Real Python authors to find […]
Thonny: The Beginner-Friendly Python Editor
Are you a Python beginner looking for a tool that can support your learning? This article is for you! Every programmer needs a place to write their code. This article will discuss an awesome tool called Thonny that will enable you to start working with Python in a beginner-friendly environment. In this article, you’ll learn: […]
Python Community Interview With Brian Peterson
To date, I’ve interviewed people you’ve likely heard of before from the Python community. But this column isn’t just about interviewing the rock stars and core devs. It’s also a means to shine light on the huge contributions to the community that can often go unthanked and overlooked. As such, I present to you Brian […]
Sending Emails With Python
You probably found this tutorial because you want to send emails using Python. Perhaps you want to receive email reminders from your code, send a confirmation email to users when they create an account, or send emails to members of your organization to remind them to pay their dues. Sending emails manually is a time-consuming […]
Building Serverless Python Apps Using AWS Chalice
Shipping a web application usually involves having your code up and running on single or multiple servers. In this model, you end up setting up processes for monitoring, provisioning, and scaling your servers up or down. Although this seems to work well, having all the logistics around a web application handled in an automated manner […]
Python Community Interview With Emily Morehouse
I’m very pleased to be joined this week by Emily Morehouse. Emily is one of the newest additions to the CPython core developer team, and the founder and director of engineering of Cuttlesoft. Emily and I talk about the recent CPython core developer sprint and the fact that she completed three majors in college at […]
Continuous Integration with Python: An Introduction
When writing code on your own, the only priority is making it work. However, working in a team of professional software developers brings a plethora of challenges. One of those challenges is coordinating many people working on the same code. How do professional teams make dozens of changes per day while making sure everyone is […]
Memory Management in Python
Ever wonder how Python handles your data behind the scenes? How are your variables stored in memory? When do they get deleted? In this article, we’re going to do a deep dive into the internals of Python to understand how it handles memory management. By the end of this article, you’ll: Learn more about low-level […]
Interactive Data Visualization in Python With Bokeh
Bokeh prides itself on being a library for interactive data visualization. Unlike popular counterparts in the Python visualization space, like Matplotlib and Seaborn, Bokeh renders its graphics using HTML and JavaScript. This makes it a great candidate for building web-based dashboards and applications. However, it’s an equally powerful tool for exploring and understanding your data […]
Python Community Interview With Kenneth Reitz
This week, I’m excited to be interviewing the prolific Kenneth Reitz! Kenneth is the author of the extremely popular requests and pipenv libraries. Join us as we talk about his latest projects and the most challenging code he’s written to date. Ricky: Let’s start at the beginning… How did you get into programming, and when […]