Learn coding in Python, Go and Rust from Serdar Yegulalp, software dev specialist and senior writer at InfoWorld.
Sometimes with a program you just need a quick and dirty way to persist values across to disk. The dbm module in Python provides a native way to do this across platforms, with no more effort than you'd need to save values in a dictionary. Learn in this video the basics of how it works, and how it's been updated to use SQLite as a storage backend.
Python's type hinting system makes it easier to check your programs for correctness and consistency, but adding type hints to an existing code base can be grueling work. MonkeyType, created by Instagram, runs your code and automatically generates type hints for code, which you can apply directly to your source or list alongside it as type stubs. This video shows a simple example of MonkeyType in action, along with some use cases and caveats.
Python programs can use a web frontend with HTML to create GUIs conveniently. In many cases you don't even have to know HTML, CSS, or JS: you can use a Python framework that generates your interactive frontend programmatically. With NiceGUI, HTML apps with complex web controls aren't hard to implement in a few lines of Python. This video walks through the basics of how NiceGUI apps work, and compares and contrasts with similar frameworks like Streamlit.
Python 3.13 provides early access to some groundbreaking new features in CPython, the default Python interpreter. A new JIT can enable speedups in "hot spots" in Python code, by selectively replacing generic instructions with specialized versions and by using a new second-stage bytecode – without having to rewrite any existing Python code. And the new "free-threaded", or "no-GIL" build, lets Python threads run with true parallelism. However, none of these features are enabled by default yet. To use them, you need to build a custom edition of the Python interpreter. In this video, we've done just that, and we show some examples of where both of these new features add real value to Python. Twitter: @syegulalp LinkedIn: https://www.linkedin.com/in/serdar-yegulalp-136a483/
In previous videos we covered Cython (for translating Python into C for speed), Numpy (for working with numerical arrays at scale), and parallelism in Cython (for doing work in multiple threads). In this video we look at how all three of these things can be used at once: writing Cython that runs in parallel for operating on Numpy arrays. We'll also cover how to ensure Cython uses Numpy arrays correclty, and why parallelism with Numpy arrays doesn't always result in linear speedups.
Many different data libraries in Python work with dataframes – Polars, Pandas, DuckDB, and so on. But they all sport highly dissimilar APIs and feature sets, and some have features the others don't. Ibis provides a common, unified front end for over a dozen Python dataframe libraries – a common way to read data, query it, pass dataframes between different processing engines, and report the results. This video shows an example of how this works using a single common dataframe derived from a CSV, using DuckDB, Polars, and Ibis's native dataframe processing.
Asynchronous programming in any language can be tricky, and Python is no exception. The AnyIO library simplifies many common patterns in async programming in Python, such as how to start async tasks or manage them. AsyncIO also adds many behaviors and features for async not found in Python's standard library, like performing asynchronous work with files.
Analytics databases, or column-oriented DBs, speed up analytics jobs on big datasets. But most such DBs are big products with a lot of setup and management overhead. DuckDB bucks that trend: it's a single, self-contained executable and library that brings SQL-query-powered analytics DB functionality to most any programming language, workflow, or data trove. This video shows how you can use DuckDB with Python to work with big, multi-megabyte JSON or CSV datasets, and query the data using conventional SQL syntax.
As WebAssembly gains in popularity, one possible application is to embed a WASM runtime into applications to extend the app's functionality. Extism lets you write WASM extensions for your own applications, creating in effect a WASM-powered plugin system for your apps without the overhead of embedding a full language runtime like Lua. This video shows the basics of how to write a WASM add-on in AssemblyScript, and add it to a Python application, all in a few lines of code.
Cython's used to take existing Python code and translate it to C for speed. It can also be used to make some operations on C types faster by performing them in parallel, and without using the overhead of Python's threading or multiprocessing mechanisms. Instead, you can write Cython code that makes use of the industry-standard OpenMP interface for writing parallel-processing code. This video goes through the basics of using OpenMP in Cython, using the "prange" object, and gives you an idea of what's involved to make operations parallel.
If you've ever needed to compile something from C/C++ source in Microsoft Windows, odds are you've also been aggravated by how complex it can be to set up the Visual Studio C++ Build Tools. Turns out there's a simple, one-command way to do it using the Winget package manager, with minimal babysitting and fuss. Watch this video to learn how to install the Build Tools from the command line, and how to customize the setup to include more than the basic components if needed.
Writing a web app in Python isn't hard, as long as you understand the frontend components – HTML, CSS, and JavaScript. It's harder when you don't know those things, especially if you want to write a Python app that lets users freely explore data through interactive components. Streamlit lets you write web apps in pure Python, and outfit them with a wide-ranging gallery of interactive data exploration widgets. This video shows the basics of Streamlit in action, demonstrates how Streamlit apps are typically written and how they behave, and also walks through a few caveats worth knowing about.
Normally, Visual Studio Code is a text editor, but its panoply of add-ons can transform it into a versatile development tool for working with many aspects of software development. In this video we look at some examples of how VS Code can be made into a database exploration and workbench tool by way of various free add-ons.
The creators of the "ruff" linter have a new Rust-powered tool for Python – an all-in-one project creation and management tool named "uv". See in this video how "uv" performs the same jobs as "pip" and many other Python tools, but a great deal faster. But how much of a future is there for Python tools written in Rust?
Got ambitions about getting into game development? This video walks you through some specific steps to take towards that goal: laying a proper foundation with knowing software development generally; how to not let ambitions to create your dream game derail things; how to choose the kinds of games to make; and more.
The PyScript project offers the promise of being able to run Python programs as-is in a web page, as transparently as one runs JavaScript programs. The project's been through some major revisions since we last looked at it, as it's now somewhat easier to set up and work with. Watch as we set up a few basic Python programs in PyScript, which interact with the web page they're embeded in, or even use an embedded in-browser console for interactivity with the user.
Video games have become a massive and lucrative market, bigger even than the movie industry. If you've considered video game development as a career move, it's worth knowing what kind of prerequisites are involved. In this video we look at a few things you'll need to know before considering video game development as a career – not just skills, but habits and expectations.
All Python developers write loops in their code. But sometimes the built-in looping mechanisms aren't enough – sometimes you want to write loops that handle sophisticated scenarios. What if you want to loop through multiple things of different lengths together? Or loop through all the possible combination of some things? Learn how the itertools module in Python lets you do all these things and more, without having to write your own custom code to do them.
Your Python programs shouldn't be black boxes – they should be able to tell you about what's going on inside them as they run. The logging module for Python gives you convenient ways to write log messages to the console, to use different levels of verbosity for logging, and to configure defaults for logging behavior. Learn the basics of the logging module in this video, with a few easy examples to get you started.
Python projects that use modern tooling and standards work best when the files in the project repository follow a certain layout. Learn in this video how to organize a Python project's files and directories, including: using the pyproject.toml file to describe a project's metadata, setting up .gitignore for Python projects, and where to place tests or documentation.
Sponsored Links