Why do we all love Python? For starters, it’s a beautiful and easy-to-learn programming language. Another reason: it comes with batteries included, meaning Python has many excellent libraries included by default. But in my opinion, it’s the 230,000 user-contributed packages that make Python really powerful and popular.
In this article, I handpicked 15 packages that I found most useful during my 10-year career as a Pythonista. Let’s go!
Dash is relatively new. It’s ideal for building data visualization apps in pure Python, so it’s particularly suited for anyone who works with data. Dash is a blend of Flask, Plotly.js, …
Python ships with a powerful and elegant JSON library to help you decode and encode JSON. It can be imported with:
In mathematics, there’s a concept called set-builder notation, also called set comprehension. Inspired by this principle, Python offers comprehensions, too. In fact, list comprehensions are one of the defining features of Python. They allow us to create concise, readable code that outperforms the uglier alternatives like
for loops or using
We’ll first look at the most well-known type: list comprehensions. Once we’ve got a good grasp of how they work, you’ll also learn about set comprehensions and dictionary comprehensions.
A list comprehension is a language construct. It’s used to create a list based on an existing list. Sounds a…
How is Python being used around the globe and across industries?
This question inspired me to write this piece. I figured a list of the most-used Python packages would give a good indication.
As a starting point, I took a list of the most downloaded Python packages on PyPI over the past 365 days. Let’s dive in and find out what they do, how they’re related, and why they rank so high!
Urllib3 is an HTTP client for Python that brings many features that are missing from the Python standard libraries:
Concurrency is working on multiple things at the same time. In Python, this can be done in several ways:
threading, by letting multiple threads take turns.
multiprocessingwe’re using multiple processes. This way we can truly do more than one thing at a time using multiple processor cores. This is called parallelism.
Concurrency is working on multiple things at the same time
Make sure to check…
There are lots of little tricks that can make life easier for a Python coder. Some of these will be known to you, but I’m sure there are at least a couple that you haven’t seen before.
If you’re done reading, also take a look at our latest article on concurrency:
Iterators make for very elegant for-loops in Python, and also make comprehension possible. Even though it requires some work to understand all the inner workings, they are actually very easy to use in practice!
To understand what a Python iterator is, you need to know two terms:
Iterator — An object that can be iterated, meaning we can keep asking it for a new element until there are no elements left. Elements are requested using a method called
Iterable — An object that implements another special method, called __iter__. This function returns an iterator.
As stated above, a Python…
One of Python’s biggest strengths is the enormous number of user-contributed packages available for free. Python packages can be offered anywhere but are most commonly published in the Python Package Index.
The Python Package Index, PyPI for short, contains more than 270K packages. Let’s explore some of the most-used packages and find out how to install them using a tool called pip.
Just to get a taste of what’s available, here are seven packages I personally like and use a lot.
Python has a long history, starting around 1991 with its first release in a newsgroup called
alt.sources. Since then, we all know how omnipresent the language has become. Last year, Python ranked second in Redmonk’s list of the most popular programming languages. And I can tell you… this year won’t be different. Here’s why Python will stay among the top languages in 2021.
Python has a very vibrant community, and it’s very well maintained. …
I’ve recently switched from Grav CMS to WordPress on one of my sites, Python Land. I jotted down some lessons learned and some advanced tips while setting up this WordPress site that I’d like to share with anyone interested.
I’m not new to WordPress, and I’m certainly not new to running websites. I’ve been doing it for 25 years. My first sites used tables to structure the pages, CSS wasn’t invented yet, and SEO didn’t exist either. Yeah… I guess I’m that old (and wise, hopefully).
Anyways... without further ado, here we go!
Picking the right theme is hard; don’t…