Writing Samples
Articles at realpython.com
“Python’s filter(): Extract Values From Iterables”
In this step-by-step tutorial, you’ll learn how Python’s filter() works and how to use it effectively in your programs. You’ll also learn how to use list comprehension and generator expressions to replace filter() and make your code more Pythonic.
“Context Managers and Python’s with Statement”
In this step-by-step tutorial, you’ll learn what the Python with statement is and how to use it with existing context managers. You’ll also learn how to create your own context managers.
“Build a Bulk File Rename Tool With Python and PyQt”
In this step-by-step project, you’ll build a bulk file rename tool using Python and pathlib to manage the file renaming process and PyQt to provide the application’s GUI.
“Write Pythonic and Clean Code With namedtuple”
In this step-by-step tutorial, you’ll learn what Python’s namedtuple is and how to use it in your code. You’ll also learn about the main differences between named tuples and other data structures, such as dictionaries, data classes, and typed named tuples.
“Build a Python Directory Tree Generator for the Command Line”
In this step-by-step project, you’ll create a Python directory tree generator application for your command line. You’ll code the command-line interface with argparse and traverse the file system using pathlib.
“OrderedDict vs dict in Python: The Right Tool for the Job”
In this step-by-step tutorial, you’ll learn what Python’s OrderedDict is and how to use it in your code. You’ll also learn about the main differences between regular dictionaries and ordered dictionaries.
“Build a Contact Book With Python, PyQt, and SQLite”
In this step-by-step project, you’ll build a minimal contact book application using Python, with PyQt to build the application’s GUI and SQLite to handle the database.
“Python and MongoDB: Connecting to NoSQL Databases”
In this step-by-step tutorial, you’ll learn how to use Python to interface with the NoSQL database system MongoDB. You’ll get an overview of the differences between SQL and NoSQL, and you’ll also learn about related tools, including PyMongo and MongoEngine.
“Python Inner Functions: What Are They Good For?”
In this step-by-step tutorial, you’ll learn what inner functions are in Python, how to define them, and what their main use cases are.
“Qt Designer and Python: Build Your GUI Applications Faster”
In this step-by-step tutorial, you’ll learn how to use Qt Designer to create GUIs from your windows and dialogs and use them in your Python applications.
“How to Use Python: Your First Steps”
In this step-by-step tutorial, you’ll learn the basics of how to use Python. With this knowledge, you’ll be able to start coding your Python applications.
“Python’s .append(): Add Items to Your Lists in Place”
In this step-by-step tutorial, you’ll learn how Python’s .append() works and how to use it for adding items to your list in place. You’ll also learn how to code your own stacks and queues using .append() and .pop().
“Use PyQt’s QThread to Prevent Freezing GUIs”
In this step-by-step tutorial, you’ll learn how to prevent freezing GUIs by offloading long-running tasks to worker QThreads in PyQt.
“Handling SQL Databases With PyQt: The Basics”
In this step-by-step tutorial, you’ll learn how to use PyQt’s built-in SQL support to create GUI applications that effectively manage SQL databases.
“PyQt Layouts: Create Professional-Looking GUI Applications”
In this step-by-step tutorial, you’ll learn how to use PyQt layouts to arrange and manage the graphical components on your GUI applications. With the help of PyQt’s layout managers, you’ll be able to create polished and professional GUIs with minimal effort.
“Python and PyQt: Creating Menus, Toolbars, and Status Bars”
In this step-by-step tutorial, you’ll learn how to create, customize, and use Python menus, toolbars, and status bars for creating GUI applications using PyQt.
“Python’s map(): Processing Iterables Without a Loop”
In this step-by-step tutorial, you’ll learn how Python’s map() works and how to use it effectively in your programs. You’ll also learn how to use list comprehension and generator expressions to replace map() in a Pythonic and efficient way.
“The Python return Statement: Usage and Best Practices”
In this step-by-step tutorial, you’ll learn how to use the Python return statement when writing functions. Additionally, you’ll cover some good programming practices related to the use of return. With this knowledge, you’ll be able to write readable, robust, and maintainable functions in Python.
“Python’s reduce(): From Functional to Pythonic Style”
In this step-by-step tutorial, you’ll learn how Python’s reduce() works and how to use it effectively in your programs. You’ll also learn some more modern, efficient, and Pythonic ways to gently replace reduce() in your programs.
“Python eval(): Evaluate Expressions Dynamically”
In this step-by-step tutorial, you’ll learn how Python’s eval() works and how to use it effectively in your programs. Additionally, you’ll learn how to minimize the security risks associated to the use of eval().
“Python Scope & the LEGB Rule: Resolving Names in Your Code”
In this step-by-step tutorial, you’ll learn what scopes are, how they work, and how to use them effectively to avoid name collisions in your code. Additionally, you’ll learn how to take advantage of a Python scope to write more maintainable and less buggy code.
“Using the Python defaultdict Type for Handling Missing Keys”
In this step-by-step tutorial, you’ll learn how the Python defaultdict type works and how to use it for handling missing keys when you’re working with dictionaries. You’ll also learn how to use a defaultdict to solve problems like grouping or counting the items in a sequence or collection.
“Python and PyQt: Building a GUI Desktop Calculator”
In this step-by-step tutorial, you’ll learn how to create Graphical User Interface (GUI) applications with Python and PyQt. Once you’ve covered the basics, you’ll build a fully-functional desktop calculator that can respond to user events with concrete actions.
“Using the Python zip() Function for Parallel Iteration”
In this step-by-step tutorial, you’ll learn how to use the Python zip() function to solve common programming problems. You’ll learn how to traverse multiple iterables in parallel and create dictionaries with just a few lines of code.
“How to Use the Python or Operator”
In this step-by-step tutorial, you’ll learn about how the Python or operator works and how to use it. You’ll get to know its special features and see what kind of programming problems you can solve by using or in Python.
“How to Iterate Through a Dictionary in Python”
In this step-by-step tutorial, you’ll take a deep dive into how to iterate through a dictionary in Python. Dictionaries are a fundamental data structure, and you’ll be able to solve a wide variety of programming problems by iterating through them.
“How to Run Your Python Scripts”
This step-by-step tutorial will guide you through a series of ways to run Python scripts, depending on your environment, platform, needs, and skills as a programmer.
Articles at stackabuse.com
“Calculating Variance and Standard Deviation in Python”
In this step-by-step tutorial, you’ll learn how to calculate the variance and the standard deviation of a dataset in Python.
“Calculating Mean, Median and Mode in Python”
In this step-by-step tutorial, you’ll learn how to calculate the mean, median, and mode of a sample of data in Python.
“Unpacking in Python: Beyond Parallel Assignment”
In this step-by-step tutorial, you’ll learn how to perform iterable unpacking operations in Python.
“Formatting Strings with the Python Template Class”
In this step-by-step tutorial, you’ll learn how to use the Python Template
class. With Templates
, we gain a heavily customizable interface for string substitution (or string interpolation).
Articles at learnpyqt.com
“Creating Dialogs With Qt Designer”
In this step-by-step tutorial, you’ll learn how to use Qt Designer to build dialogs for your desktop applications.
“Laying Out Your GUIs With Qt Designer”
In this step-by-step tutorial, you’ll learn how to use Qt’s layouts with Qt Designer to build complex GUIs for your desktop applications.
Open Source Projects Samples
VideoMorph: A user-friendly Video Converter based on FFMPEG and written in Python/PyQt5.
RP Tree: A command-line tool to generate directory tree diagrams. RP Tree is a sample project I used in my Real Python tutorial: Build a Python Directory Tree Generator for the Command Line. It’s available on PyPI, so you can install it running pip install rptree
on your command line.
Lubepy: A library that provides a set of basic calculations for machinery lubrication engineering. It’s designed to be used on the field to perform fast calculations.
PyCalc: A sample calculator implemented using Python 3. The GUI is built using PyQt5, Tkinter, PySide2, and wxPython to show the flexibility of the Model-View-Controller (MVC) pattern. PyCalc is a sample project that extends the example I used in my Real Python tutorial: Python and PyQt: Building a GUI Desktop Calculator.
MathREPL: A math expression evaluator using Python eval() and the math module. MathREPL is a sample project based on the example used in the Real Python tutorial: Python eval(): Evaluate Expressions Dynamically.