Python 3.11 is getting closer to its final release, which will happen in October 2022. The new version is currently going through beta testing, and you can install it yourself to preview and test some of the new features, including support for reading TOML with the new tomllib module.
TOML is a configuration file format that’s getting more and more popular in the Python ecosystem. This is driven by the adoption of pyproject.toml as the central configuration file in Python packaging. Other important tools, like Black, mypy, and pytest, also use TOML for their configuration.
In this tutorial, you’ll:
- Install Python 3.11 beta on your computer, next to your current Python installations
- Get familiar with the basics of the TOML format
- Read TOML files with the new
tomllibmodule - Write TOML with third-party libraries and learn why this functionality is not included in
tomllib - Explore Python 3.11’s new typing features, including the
SelfandLiteralStringtypes as well as variadic generics
There are many other new features and improvements coming in Python 3.11. Check out what’s new in the changelog for an up-to-date list, and read other Python 3.11 previews on Real Python to learn about other features.
Free Download: Click here to download free sample code that demonstrates some of the new features of Python 3.11.
Python 3.11 Beta
A new version of Python is released in October each year. The code is developed and tested over a seventeen-month period before the release date. New features are implemented during the