Learn how to set up a basic Application Programming Interface (API) to make your data more accessible to users. This lesson also discusses principles of API design and the benefits of APIs for d...
Beautiful Soup: Build a Web Scraper With Python – Real Python
In this tutorial, you'll walk through the main steps of the web scraping process. You'll learn how to write a script that uses Python's requests library to scrape data from a website. You'll also use Beautiful Soup to extract the specific pieces of information that you're interested in.
How to Catch Multiple Exceptions in Python – Real Python
In this how-to tutorial, you'll learn different ways of catching multiple Python exceptions. You'll review the standard way of using a tuple in the except clause, but also expand your knowledge by exploring some other techniques, such as suppressing exceptions and using exception groups.
Merge multiple dictionaries and add items to a dictionary in Python | note.nkmk.me
This article explains how to add a new item to a dictionary (dict) or update the value of an existing item in Python. It is also possible to merge multiple dictionaries.Add or update an item in the dictionary by specifying a key Merge multiple dictionaries: update(), {}, dict(), |, |= Add or update ...
Iterators and Iterables in Python: Run Efficient Iterations – Real Python
In this tutorial, you'll learn what iterators and iterables are in Python. You'll learn how they differ and when to use them in your code. You'll also learn how to create your own iterators and iterables to make data processing more efficient.
Data classes are one of the new features of Python 3.7. With data classes you do not have to write boilerplate code to get proper initialization, representation and comparisons for your objects.
How to Split a Python List or Iterable Into Chunks – Real Python
This tutorial provides an overview of how to split a Python list into chunks. You'll learn several ways of breaking a list into smaller pieces using the standard library, third-party libraries, and custom code. You'll also split multidimensional data to synthesize an image with parallel processing.
Logging is one of the best ways to keep track of what is going on inside your code while it is running. Python comes with a very powerful logging library but with great power… things start to get a bit complicated.
Python's property(): Add Managed Attributes to Your Classes – Real Python
In this step-by-step tutorial, you'll learn how to create managed attributes, also known as properties, using Python's property() in your custom classes.