Using the Ollama API with Python and requests

Featured image for the blog post

An earlier blog post explained how to access the Ollama API from the shell using the curl program. If the gemma3 model is used as a local AI on the system, it might look like this: In this article, we’ll take a look at the Python programming language and how to use the requests library. … Read more

A brief overview of strings in Python

To represent a sequence of characters, the string data type exists in Python — just as it does in other programming languages. Each individual character can be accessed via an index. The first character has index 0 (and not 1). A string is a sequence of characters and each character has an index starting from … Read more

Python — Determining the Path to the User Directory

The path to a user directory can vary depending on the operating system. For instance, if the username is “kendra”, you would deal with the following paths: When writing a Python program for personal use, you could simply use the corresponding path to your user directory (i.e., /Users/<Username>). However, the situation changes when the program … Read more

Setting up the package manager uv on a Mac

uv package manager

uv is a package manager written in Rust that is an alternative to pip. It allows you to isolate a project, meaning packages installed with uv are only available to the respective Python project. This makes it possible to install different package versions for different projects. When a package is installed with uv, the package … Read more

An object-oriented approach to creating a TKinter window

Tkinter window with label widget on Windows

The first Tkinter article showed how to create a simple window with a label. Here is the code: Grid was used as layout manager. After executing this code, this window appears: This simple app could now be further developed by adding more widgets. However, the more components are added, the more confusing the code becomes. … Read more