Auto-refresh the Browser on File Save with Django

Introduction I’ve recently started learning Python’s Django framework and have brought my favourite JavaScript framework along with me: TailwindCSS. From a development standpoint, I find that TailwindCSS feels much more efficient when I don’t have to refresh the page every time I make a change. At first, I wasn’t entirely certain about how I could […]

Automatically update Pypi on GitHub release

Introduction This article will guide you through setting up a GitHub workflow that automatically updates your PYPI package upon a new GitHub release, using my zomboid_rcon repository as a practical example. Understanding the Workflow The process involves a GitHub workflow specifically designed to upload a Python package to PYPI when a new release is published. […]

Compile Python to .exe Files With PyInstaller

Introduction If you’re delving into the world of Python programming, you might find yourself needing to convert your Python scripts into executables (.exe) files, especially for ease of distribution among Windows users. A popular tool for this task is PyInstaller, but there are a few key points and nuances to be aware of during this […]

Python Decorators

Basic custom decorator functions Python decorators are functions which you call on top of another function to expand its functionality. Some common use cases include logging, adding delays or timeouts to function executions, extending behaviours and more. Here’s a basic example: In the above example, our initial function is called with decorator called ‘decorator’ just […]

Return values from a Python thread

What are Threads in Python? Threads in Python are separate flows of execution. Typically, a simple Python program is single-threaded. This means everything happens in a sequence one after the other. Your program will execute line-by-line and only after one line has finished will the next one begin. Implementing additional threads means that you can […]

Python & Pygame Solar System Simulation

Creating a Solar System Simulation with Python and Pygame This project is a fantastic demonstration of using object-oriented programming to create infinitely scalable programs by instantiating classes based on various sets of data. Ready to explore the galaxies from the comfort of your home? Let’s get started! Here’s what you can expect by the end […]

Get links from an XML sitemap using Python

What we’re going to be doing I’m going to walk you through step-by-step how to assemble a full list of all pages on a website’s sitemap using Python with BeautifulSoup4. I will assume some basic knowledge of Python on the part of the reader, so I won’t go into great detail on some basics. This […]