The other day I wanted to demo the Google Books API (we use for Pybites Books) to somebody so I started to write some code on the fly to call its endpoints using httpx. Then I thought it would be nice to turn it into a small script to search for books and view details… Continue reading Create Project-Less Python Utilities with uv and Inline Script Metadata
Bob Belderbos
Bob studied business economics, but got fired up about programming early in his career. He taught himself web design / coding and started living his biggest passion: automate the boring stuff, making other people's lives easier. Since then he has coded projects accruing millions in cost savings and built a coding platform that has taught Python to thousands of people worldwide. He deeply cares about helping other people succeed. His biggest win will be your next win!
Creating a Fitness Tracker App with Python Reflex
By Bob Belderbos on 16 January 2025
In this post, I will build a simple fitness tracker app using Python Reflex. Reflex is a Python library that allows you to create reactive applications using a functional and declarative approach. We will use Reflex to create a simple fitness tracker app that allows you to log the amount of workouts completed per week.… Continue reading Creating a Fitness Tracker App with Python Reflex
What is the Repository Pattern and How to Use it in Python?
By Bob Belderbos on 20 June 2024
The repository pattern is a design pattern that helps you separate business logic from data access code. It does so by providing a unified interface for interacting with different data sources, bringing the following advantages to your system: A practical example Let’s use Python and sqlmodel (PyPI) to demonstrate this pattern (code here): Note: In this implementation,… Continue reading What is the Repository Pattern and How to Use it in Python?
Deploying a FastAPI App as an Azure Function: A Step-by-Step Guide
By Bob Belderbos on 17 June 2024
In this article I will show you how to deploy a FastAPI app as a function in Azure. Prerequisites are that you have an Azure account and have the Azure CLI installed (see here). Setup Azure First you need to login to your Azure account: It should show your subscriptions and you select the one… Continue reading Deploying a FastAPI App as an Azure Function: A Step-by-Step Guide
Leveraging typing.Protocol: Faster Error Detection And Beyond Inheritance
By Bob Belderbos on 9 February 2024
Introduction Two weeks ago I wrote an article about ABCs and interface enforcement. Shortly after I learned that you can do this as well with protocols. Python 3.8 introduced quite a groundbreaking feature that further advanced the language’s capabilities in type checking: the typing.Protocol which allows Python developers to define and enforce interface contracts in… Continue reading Leveraging typing.Protocol: Faster Error Detection And Beyond Inheritance
How to Send Email Notifications Using Sendgrid and GitHub Actions
By Bob Belderbos on 7 February 2024
Introduction As a Python developer I want to stay up2date with trends and useful tips & tricks. Of course there are great newsletters like Pycoders, but those are already hitting my inbox. Let’s look at Planet Python in this article, an aggregation site/ service that indexes a lot of good Python blog feeds. Keeping an… Continue reading How to Send Email Notifications Using Sendgrid and GitHub Actions
Elevate Your Python: Harnessing the Power of Abstract Base Classes (ABCs)
By Bob Belderbos on 26 January 2024
Introduction One cool object-oriented programming (OOP) technique / pattern is enforcing consistent interfaces. In Python you can use Abstract Base Classes (ABCs) for that. 🐍 Using ABCs ensures that all subclasses implement the required methods. This can make it easier to maintain and extend the existing code base. Update Feb 2024: you can also leverage… Continue reading Elevate Your Python: Harnessing the Power of Abstract Base Classes (ABCs)
Exploring the Role of Static Methods in Python: A Functional Perspective
By Bob Belderbos on 24 January 2024
Introduction Python’s versatility in supporting different programming paradigms, including procedural, object-oriented, and functional programming, opens up a rich landscape for software design and development. Among these paradigms, the use of static methods in Python, particularly in an object-oriented context, has been a topic of debate. This article delves into the role and implications of static… Continue reading Exploring the Role of Static Methods in Python: A Functional Perspective
6 Cool Things You Can Do With The Functools Module
By Bob Belderbos on 21 September 2023
In this article let’s look at the functools Standard Library module and 6 cool things you can do with it (be warned, a lot of decorators are coming your way! 😍) … 1. Cache (“memoize”) things You can use the @cache decorator (formerly called @lru_cache) as a “simple lightweight unbounded function cache”. The classic example is… Continue reading 6 Cool Things You Can Do With The Functools Module
Your First Python Open Source Contribution: A Step-By-Step Guide
By Bob Belderbos on 20 September 2023
Introduction I recently re-engaged with one of my open source projects and it was a rewarding experience. 🎉 It was a Pybites project I had written the core for years ago, but thanks to some amazing Pythonistas in our community it became a way more mature tool so I had to get acquainted again. I… Continue reading Your First Python Open Source Contribution: A Step-By-Step Guide