Common String Functions

December 5, 2020

One of the basic built-in data types in Python, a string, is a sequence of text characters. strings are declared with quotation marks ... You can also try to coerce other data types to be a string using the built-in str() function. Strings are used all over the place in Python.

Calling an API with Python

December 6, 2020

When developers build an API they define API routes. These are URLs on the server that process the HTTP request arguments and return data based on those arguments (or an error). Each route has an accepted HTTP method that you must use. For example, I might have a profile picture on my API at

Learning How to Do Things with Python

November 3, 2020

Before doing a difficult task, it helps to have a process. Processes allow you to reduce the cognitive load of a task by outsourcing part of the "figuring out" to the process. Processes can—also—reduce the chance that you will miss something obvious, or waste time trying to

Importing Modules with Python

November 4, 2020

There comes a point in a beginner Python developer's life when he wants to leave the nest and starting importing and reusing his own functions. However, just like with any programming language, there are conventions and syntax that dictate how to export or import code to different modules.

Python Decorators

November 0, 2020

Python decorators have a mysterious presence. This is true for a developer that has some Python knowledge, and definitely the case for someone new to programming. The first time I used a decorator in Python was with the Flask ​web framework, and I kept looking at the line of code it was on like it

Timeit! Python

November 6, 2020

The timeit module is a trustworthy way to test small blocks (or bits as mentioned in the documentation ​) of Python code. You might think that testing Python code is quite straightforward:

Python: Destructuring (Packing and Unpacking)

October 5, 2020

Destructuring is a nice tool to be familiar with in Python. As with many Python features, the benefits include cleaning up code and ease of programming. In this post, I'll take a quick look at how packing and unpacking work in Python.

What and Why is asyncio in Python?

October 0, 2020

Asynchronous code is non-blocking. For example, your server may need to reach out to a database or external API. This could take some time. Therefore, the code bookmarks the task and moves on to the next line of code. Or, better yet, it handles the next request.

Python & the Walrus Operator

October 0, 2020

I was trying to use list comprehension in a Python script, but I was having trouble with reassigning a variable inside the expression. In researching my issue, I came across "the walrus operator". The operator is in Python 3.8 but has only a few common use cases.