Blog posts in category “Python A to Z”
Python posts during Blaugust 2026
-
Aug 31st, 202631st is for recap
August is over. I wrote 31 posts in 31 days for Blaugust following a theme of Python A to Z (plus a few others for good measure) and finished with the fourth year in a row with the Rainbow Diamond Award. I learned a lot throughout this month and it’s time to recap and look back at the past month.
-
Aug 29th, 2026Z is for zip file mocking - Python A to Z
I recently had to figure out how to test a function that fetches a zip file from hard-coded URL. Here’s how I solved that with requests-mock.
-
Aug 27th, 2026X is for XML parsing - Python A to Z
Parsing information from XML and HTML documents is a nice experience with BeautifulSoup.
-
Aug 26th, 2026W is for walrus operator - Python A to Z
Ever since Python 3.8, we’ve had the walrus operator := that gives us the ability to assign values to variables inside the condition clause of if and while clauses.
-
Aug 25th, 2026V is for visible characters - Python A to Z
I recently needed to validate a length of a Markdown text but only counting the “visible characters”, ie. what it would look like to a user without considering formatting. I found two solutions.
-
Aug 24th, 2026U is for uv - Python A to Z
uv is a tool to manage Python environments, packages and projects. I use it mainly to make running standalone scripts with external dependencies or bringing those dependencies to REPL sessions.
-
Aug 22nd, 2026T is for time-machine - Python A to Z
Time travel, baby! A lot of software deals with current time and to test them, you need to control time and time-machine is a great library for that.
-
Aug 21st, 2026S is for slicing - Python A to Z
Slicing is a way to create sublists from existing lists. This 101 level primer is aimed for people new to programming or Python to grasp the basics.
-
Aug 20th, 2026R is for REPL - Python A to Z
REPL is your interactive interface to Python. Write any Python expression and it gets immediately evaluated and you can continue. I use it all the time for iteratively developing and experimenting or as a replacement for shell scripting.
-
Aug 19th, 2026Q is for Q - Python A to Z
More Django for this week! Q objects are great for creating more complex queries in a way that stays readable, maintainable, composable and documents your intent.
-
Aug 18th, 2026P is for Python Enhancement Proposal (PEP) - Python A to Z
PEPs are proposals for how Python the programming language is changed. Even if you’ll never interact with them or the language in the level of proposing or making implementation changes to the language itself, reading them and the discussion around them will make you a better communicator of ideas.
-
Aug 17th, 2026O is for ORM - Python A to Z
ORM is an interface between databases and program’s business logic and it’s a wonderful thing. Django’s ORM is my favourite flavour and I’m happy to tell you why.
-
Aug 16th, 2026N is for namedtuple - Python A to Z
I’m writing again about namedtuple, my favourite data structure in Python. They have all the good stuff from tuples but adds attribute access and better documentation while maintaining full backwards compatibility so it’s an easy upgrade on existing codebase.
-
Aug 14th, 2026M is for meetups - Python A to Z
I love meetups: organising them, participating in them, speaking in them, writing about them. The grassroots movement of bringing people together to learn, meet each other and get inspired by each other is so lovely.
-
Aug 13th, 2026L is for learning - Python A to Z
A life of a software developer — no matter if you’re doing it professionally or as a hobby — is a life of continuous learning. The technologies evolve, problem solving skills are never complete and thanks to very generous sharing from the community, there’s always new things to learn.
-
Aug 12th, 2026K is for keyword arguments - Python A to Z
Use keyword arguments to make your Python code easier to read.
-
Aug 11th, 2026J is for JSON validation - Python A to Z
Don’t let rogue data mess up your program or database — validate it at the door with Pydantic. I wrote a quick tutorial to get you started with the basic building blocks fo Pydantic’s data validation schema.
-
Aug 10th, 2026I is for immutable - Python A to Z
The first thing most people learn in programming is that you can save data in variables and change their values. For me, learning about immutable data structures and functional programming was a painful but important shift in schema. Also, tuples are great.
-
Aug 9th, 2026H is for htmx - Python A to Z
For the past couple of years, all my Django projects have been built with htmx and I really like it. It works so well especially with Django and its great templating system.
-
Aug 8th, 2026G is for get_or_create - Python A to Z
Django’s ORM has a neat shorthand for when you’re creating new objects in the database but some might already exist and you want to reuse them rather than always create new ones. QuerySet’s get_or_create does all that on a single line.
-
Aug 7th, 2026F is for f-strings - Python A to Z
Combining strings with values of variables is an every day need in programming and for a decade now, we have had the pleasure to use f-strings in Python. If you’re new to programming, coming from another language or learned Python back in the 2.x days and only occasionally write it now, make sure you learn how to use them.
-
Aug 6th, 2026E is for environment variables - Python A to Z
Environment variables are used to define data that is specific to the machine and environment the program is ran in. I’ll take a look at how to access those values and how to automatically read project specific variables.
-
Aug 5th, 2026D is for dictionaries - Python A to Z
We call them dictionaries, others call them associative arrays, key-value stores or maps. They are a fundamental building block of a software developer and this blog post is a 101 level introduction to them.
-
Aug 4th, 2026C is for command line interfaces - Python A to Z
Python has many different tools to define and parse command line interfaces. For the small, simple scripts I usually use sys.argv but as soon as complexity increases or someone else than me uses the interface, I look into docopt and click.
-
Aug 3rd, 2026B is for batteries included - Python A to Z
“Batteries included” is a philosophy for strong, versatile standard library. It allows you to build more things without having to rely on external dependencies — which is especially nice for writing standalone scripts.
-
Aug 2nd, 2026A is for assert - Python A to Z
assert is a statement in Python that acts as syntactic sugar for raising an AssertionError. I often use it in individual shell style scripts and when writing tests with pytest.
-
Aug 1st, 2026Python A to Z - Blaugust 2026 introduction
August 1st means it’s time for Blaugust, the festival of blogging where I’ll be posting daily blog posts. For this year, I’ve chosen a theme of “Python A to Z” and will be sharing daily posts about Python (and related topics), each starting with the letter of the day.