Computer vision is an exciting and growing field. There are tons of interesting problems to solve! One of them is face detection: the ability of a computer to recognize that a photograph contains a human face, and tell you where it is located. In this article, you’ll learn about face detection with Python. To detect […]
Author: Real Python
Python Community Interview With Ali Spittel
Happy 2019! For our first community interview of the year, I’m joined by Ali Spittel. Ali is a Pythonista with a passion for CSS art and teaching Python. Join us as we talk about her non-traditional path to learning to code, teaching at a Bootcamp, and her recent move to one of the most positive […]
Reading and Writing Files in Python (Guide)
One of the most common tasks that you can do with Python is reading and writing files. Whether it’s writing to a simple text file, reading a complicated server log, or even analyzing raw byte data, all of these situations require reading or writing a file. In this tutorial, you’ll learn: What makes up a […]
How to Run Your Python Scripts
One of the most important skills you need to build as a Python developer is to be able to run Python scripts and code. This is going to be the only way for you to know if your code works as you planned. It’s even the only way of knowing if your code works at […]
Supercharge Your Classes With Python super()
While Python isn’t purely an object-oriented language, it’s flexible enough and powerful enough to allow you to build your applications using the object-oriented paradigm. One of the ways in which Python achieves this is by supporting inheritance, which it does with super(). In this tutorial, you’ll learn about the following: The concept of inheritance in […]
The Factory Method Pattern and Its Implementation in Python
This article explores the Factory Method design pattern and its implementation in Python. Design patterns became a popular topic in late 90s after the so-called Gang of Four (GoF: Gamma, Helm, Johson, and Vlissides) published their book Design Patterns: Elements of Reusable Object-Oriented Software. The book describes design patterns as a core design solution to […]
The Ultimate List of Data Science Podcasts
Podcasts are a great way to immerse yourself in an industry, especially when it comes to data science. The field moves extremely quickly, and it can be difficult to keep up with all the new developments happening each week! Take advantage of those times in the day when your body is busy, but your mind […]
Python Development in Visual Studio Code
One of the coolest code editors available to programmers, Visual Studio Code, is an open-source, extensible, light-weight editor available on all platforms. It’s these qualities that make Visual Studio Code from Microsoft very popular, and a great platform for Python development. In this article, you’ll learn about Python development in Visual Studio Code, including how […]
Python "for" Loops (Definite Iteration)
This tutorial will show you how to perform definite iteration with a Python for loop. In the previous tutorial in this introductory series, you learned the following: Repetitive execution of the same block of code over and over is referred to as iteration. There are two types of iteration: Definite iteration, in which the number […]
Jupyter Notebook: An Introduction
The Jupyter Notebook is an open source web application that you can use to create and share documents that contain live code, equations, visualizations, and text. Jupyter Notebook is maintained by the people at Project Jupyter. Jupyter Notebooks are a spin-off project from the IPython project, which used to have an IPython Notebook project itself. […]
Python’s Requests Library (Guide)
The requests library is the de facto standard for making HTTP requests in Python. It abstracts the complexities of making requests behind a beautiful, simple API so that you can focus on interacting with services and consuming data in your application. Throughout this article, you’ll see some of the most useful features that requests has […]
Working With Files in Python
Python has several built-in modules and functions for handling files. These functions are spread out over several modules such as os, os.path, shutil, and pathlib, to name a few. This article gathers in one place many of the functions you need to know in order to perform the most common operations on files in Python. […]
Async IO in Python: A Complete Walkthrough
Async IO is a concurrent programming design that has received dedicated support in Python, evolving rapidly from Python 3.4 through 3.7, and probably beyond. You may be thinking with dread, “Concurrency, parallelism, threading, multiprocessing. That’s a lot to grasp already. Where does async IO fit in?” This tutorial is built to help you answer that […]
Speed Up Your Python Program With Concurrency
If you’ve heard lots of talk about asyncio being added to Python but are curious how it compares to other concurrency methods or are wondering what concurrency is and how it might speed up your program, you’ve come to the right place. In this article, you’ll learn the following: What concurrency is What parallelism is […]
Django Migrations: A Primer
Since version 1.7, Django has come with built-in support for database migrations. In Django, database migrations usually go hand in hand with models: whenever you code up a new model, you also generate a migration to create the necessary table in the database. However, migrations can do much more. You are going to learn how […]