Python
asyncio in Python
Asynchronous programming with asyncio, with examples.
Open
Python basics
The first program, running scripts, indentation, objects, os, pathlib and flake8.
Open
Books about Python
A reading list of books about Python: the first book, practice and the deeper books.
Open
Command-line interaction in Python
Reading command-line arguments with sys.argv and argparse.
Open
Python built-in collections
Lists, dictionaries, sets, tuples, ranges and strings: the built-in collection types.
Open
Branching in Python
Branching with if, elif and else.
Open
Python databases
Database examples with PostgreSQL and SQLite3.
Open
Learning Python
Where to learn Python for free or cheaply.
Open
Exceptions in Python
Handling errors with try, except, else, finally and raise.
Open
Working with files in Python
Writing and reading files in Python.
Open
Functions in Python
Functions in Python and the built-in functions that go with them.
Open
__future__ in Python
Importing features from the future with __future__.
Open
Python frameworks
Examples of Python frameworks.
Open
Generators in Python
Generators: yielding values one at a time and keeping state.
Open
importlib in Python
Loading a module from a file path with importlib.util.
Open
Install Python
Installing Python on Linux and Windows.
Open
Interactive mode
The interactive interpreter of Python.
Open
Python issues
Difficulties and nuances of working with Python, and the errors you may meet.
Open
Lists in Python
Lists in Python with their methods.
Open
Loops in Python
Loops in Python.
Open
Mathematics in Python
Mathematical tasks solved with Python.
Open
Methods in Python
Methods of Python objects.
Open
Working with files in Python
The numpy article, with its files example.
Open
Object-oriented programming in Python
Object-oriented development in Python.
Open
Packages in Python
Creating packages in Python.
Open
pandas in Python
pandas examples, with the errors and the pydantic models of the folder.
Open
Paramiko
SSH and SFTP from Python with paramiko.
Open
pip: install Python packages
Installing, upgrading and removing Python packages with pip.
Open
Python exercises
Python exercise solutions with examples.
Open
PyCharm
PyCharm IDE tips.
Open
Pydantic
Pydantic data validation: models, fields and validators.
Open
pyenv
Managing Python versions with pyenv.
Open
Virtual environments in Python
Virtualenv, venv, pyenv, conda and uv: virtual environments in Python.
Open
virtualenv: isolation for Python projects
Creating an environment, choosing the interpreter, freezing requirements and installing the wrapper.
Open
asyncio in Python
Python basics
bool in Python
Using the bool type in Python 3.
Open
configparser in Python
Reading .ini configuration files with configparser.
Open
Context manager in Python
Using a context manager with the with statement.
Open
Date and time in Python
Working with dates and times in Python 3.
Open
Docstring in Python
Writing docstrings that document functions and modules.
Open
dotenv in Python
Keeping settings in .env files and loading them with dotenv.
Open
flake8 in Python
Checking Python code style and errors with flake8.
Open
os module in Python
Using the os module to work with the operating system.
Open
pathlib in Python
Working with file paths through the pathlib module.
Open
Command-line interaction in Python
argparse in Python
Parsing command-line options with argparse, with examples.
Open
sys.argv in Python
Reading the command-line arguments of a script with sys.argv.
Open
Python built-in collections
set in Python
Sets in Python, the article kept in the bytes folder.
Open
Python dictionaries
Python dictionaries and their methods.
Open
Dictionary abstraction in Python
Building dictionaries with comprehensions.
Open
Iteration in Python
Iterables and iterators in Python and the iter function.
Open
Python lists
Python lists and their methods.
Open
Python list comprehension
Building lists with comprehensions.
Open
Protocols in Python
Which built-in types support which protocols.
Open
set in Python
Sets in Python, the article kept in the range folder.
Open
Sets in Python
Sets in Python and their methods.
Open
Set abstraction in Python
Building sets with comprehensions.
Open
str in Python
Strings in Python: the str type, f-strings, formatting and encoding.
Open
Tuples in Python
The tuple type and how to use it.
Open
Python databases
PostgreSQL with Python
Connecting to PostgreSQL with psycopg2, creating tables and managing records.
Open
SQLite3 in Python
Working with SQLite3: importing CSV files and listing tables and their columns.
Open
SQLite3 Python errors
The errors SQLite3 raises in Python and what they mean.
Open
Learning Python
Python tutor
A Python tutor for mentoring and free advice.
Open
Software testing tutors
Software testing tutors for mentoring and free advice.
Open
Working with files in Python
Advanced file handling in Python
More complex examples of writing and reading files.
Open
Basics of working with files
The first steps of writing and reading files.
Open
Download a file with Python
Downloading a file to disk with Python.
Open
glob in Python
Finding files by pattern with glob.
Open
shutil in Python
Copying, moving and removing files with shutil.
Open
Converting YAML to JSON in Python
Converting a .yml file to a .json file.
Open
Functions in Python
all() in Python
The all function.
Open
any() in Python
The any function.
Open
*args and **kwargs in Python
Variable-length arguments and keyword arguments.
Open
cache in Python
Caching function results with functools.cache.
Open
chr in Python
Turning a code point into a character with chr.
Open
Closures in Python
Inner functions that keep names of the outer function.
Open
copy() in Python
The copy function and copying objects.
Open
Decorators in Python
Using decorators to change functions.
Open
enumerate() in Python
Numbering items in a loop with enumerate.
Open
filter() in Python
The filter function.
Open
First-class functions in Python
Functions as values that can be passed and returned.
Open
Lambda functions in Python
Short anonymous functions with lambda.
Open
map() in Python
The map function.
Open
pydantic models
Pydantic models used in the function examples.
Open
ord() in Python
The ord function: a character as a code point.
Open
random in Python
Random numbers and choices with the random module.
Open
sorted() in Python
Sorting any iterable with sorted.
Open
unichr in Python
Building characters from code points with unichr.
Open
zip() in Python
Pairing the items of several iterables with zip.
Open
Install Python
Install Python on Linux
Installing Python on Linux.
Open
Install Python on Windows
Installing Python on Windows.
Open
Python issues
Lists in Python
Loops in Python
The for loop in Python
The for loop in Python 3.
Open
pydantic models
Pydantic models used in the loop examples.
Open
Mathematics in Python
Solving a quadratic equation in Python
Solving a quadratic equation with Python.
Open
The Recaman sequence
The Recaman sequence in Python.
Open
Methods in Python
Object-oriented programming in Python
Classes in Python
Class bodies, class variables and the object lifecycle.
Open
classmethods in Python
Class methods in Python OOP.
Open
Inheritance in Python
Inheritance between classes in Python OOP.
Open
Methods in Python
Instance methods in Python OOP.
Open
The property decorator in Python
The property decorator with setter and deleter.
Open
Special methods in Python
Special (dunder) methods in Python OOP.
Open
Static methods in Python
Static methods in Python OOP.
Open
super() in Python
Calling the parent class with super().
Open
Packages in Python
Package structure in Python
The correct package layout of a Python program.
Open
Namespace packages in Python
Creating namespace packages.
Open
Plugins for a package in Python
Creating plugins for a package.
Open
setuptools in Python
Creating installable packages with setuptools.
Open
pandas in Python
Errors in pandas
The errors that pandas code raises.
Open
pydantic models
Pydantic models used in the pandas examples.
Open
Paramiko
Errors in Paramiko
The errors that paramiko raises.
Open
pydantic models
Pydantic models used in the paramiko examples.
Open
PyCharm
Text editor in PyCharm
Basics of the code editor in PyCharm.
Open
Installing PyCharm
Installing the PyCharm IDE.
Open
pydantic models
Pydantic models used in the PyCharm examples.
Open
Add a path to a project in PyCharm
Adding a path to a PyCharm project.
Open
Pydantic
Virtual environments in Python
Anaconda
Installing and using Anaconda for Python.
Open
pyenv
Managing Python versions with pyenv.
Open
uv and uv.lock in Python
What the uv.lock change means for a project.
Open
venv in Python
Using the built-in venv module.
Open
virtualenv in practice
Installing virtualenv, working inside an environment and managing several with virtualenvwrapper.
Open