PydanticAI + MCP + Ollama examples for your local tool-use LLM

This blog post is for you if you’ve heard of the model context protocol (MCP) and are curious how you could implement something in Python such that you can try it with your local models that are capable of tool use, e.g. via Ollama. Maybe you even looked at the documentation but felt there still was something missing for you to get started? At least that’s how I felt. The “easiest” / Stdio server verison worked immediately but when I wanted to use a HTTP server I was sort of stranded. It was unclear to me how to actually run the server and what the client needs where so it can successfully talk to the server. Don’t get me wrong, the MCP and PydanticAI documentation is pretty good, but things could always be easier, could they not? :-P Maybe I’ll save you some time with this post. ...

June 4, 2025 · 4 min · ericschmidt

"hypermedia systems"'s Contact.app built up step by step

TL;DR htmx can be quite useful, especially for python devs with not enough time to learn javascript frameworks but who needs an alternative to tools like streamlit. The “hypermedia systems” book quite a good read, I recommend reading it. My code discussed in this blog post very closely resembles the code in the “hypermedia systems” book, but is built up progressively, to make it easier to follow along the book when stepping through the chapters. I only cover parts I found essential though. But maybe my template is helpful to follow if you want to add components important to you. ...

May 4, 2025 · 5 min · ericschmidt

"hypermedia systems"'s Contact.app with fasthtml

TL;DR fasthtml is new, still seems to have some quirks, but is a great tool to use if you want to keep all your frontend logic in python. Hello again In my previous blog post I wrote about htmx used with flask and jinja2 as done by the authors of the book “hypermedia systems”. Having done that one could wonder what that code would look like using fasthtml. This is what this blog post is about :), I know, you are probably shocked beyond belief, if you’ve seen my two previous posts. ...

May 4, 2025 · 6 min · ericschmidt

Writing an interactive dataframe editor with fasthtml

Ever wanted to edit a pandas dataframe object in python in some interactive way felt too limited by streamlit but also did not want to pick up html / css / javascript just for that? Then one solution could be fasthtml, or python-fasthtml as it is called on PyPI. With that package you can write your client facing web code as well as your server side code from the comfort of python. And, if you manage to wrap your head around it, you can also use htmx. Not quite sure I’m fully there yet myself :-P. ...

March 24, 2025 · 1 min · ericschmidt

Fully Utilizing Your Supermarket Receipts

Introduction Want to track how much you spend on what but don’t want to download every supermarket’s app / manually fill some sort of spreadsheet? The app ( github) described here can be hosted on your machine or online so you can take a picture of your receipt with your phone upload it and later download the extracted data using a desktop machine. App Overview If you have a receipt like ...

October 21, 2024 · 3 min · ericschmidt