In this tutorial, several Real Python authors share Python packages we like to use as alternatives to modules in the standard library. You’ll get to know a number of useful packages, including pudb, requests, parse, dateutil, and typer.

Python has a vast ecosystem of packages, modules, and libraries that you can use to create your application. Some of these packages and modules are included with your Python installation and are collectively known as the standard library.

The standard library consists of modules that provide standardized solutions to common programming problems. They’re great building blocks for applications across many disciplines. However, many developers prefer to use alternative packages, or extensions, that may improve on the usability and usefulness of what’s in the standard library.

In this tutorial, you’ll meet some of the authors at Real Python and learn about packages they like to use in place of more common packages in the standard library.

The packages you’ll learn about in this tutorial are:

  • **pudb**: An advanced, text-based visual debugger
  • **requests**: A beautiful API for making HTTP requests
  • **parse**: An intuitive, readable text matcher
  • **dateutil**: An extension for the popular datetime library
  • **typer**: An intuitive command-line interface parser

You’ll begin by looking at a visual and powerful alternative to pdb.

pudb for Visual Debugging

Christopher Trudeau

Christopher Trudeau is an author and course creator at Real Python. At work he’s a consultant who helps organizations improve their technical teams. At home, he spends his time with board games and photography.

I spend a lot of time working SSHed into remote machines, so I can’t take advantage of most IDEs. My debugger of choice is pudb, which has a text-based user interface. I find its interface intuitive and easy to use.

Python ships with pdb, which was inspired by gdb, which itself was inspired by dbx. While pdb does the job, the strongest thing it has going for it is that it ships with Python. Because it’s based on the command line, you have to remember a lot of shortcut keys and can only see small amounts of the source code at a time.

An alternative Python package for debugging is pudb. It displays a full screen of source code along with useful debugging information. It has the added benefit of making me feel nostalgic for the old days when I coded in Turbo Pascal:

Pudb Interface

The interface is divided into two main parts. The left panel is for source code, and the right panel is for context information. The right-hand side is subdivided into three sections:

  1. Variables
  2. Stack
  3. Breakpoints

Everything you need in a debugger is available on one screen.

#python #developer

Python Packages: Five Real Python Favorites
2.10 GEEK