Notes on FastAPI, LiteStar and HTMX

I recently wrote about Picking a web framework for a project at work. We’re moving from an R Shiny app to something else. We weren’t sure what that something else should be so I rebuilt the app (in part) in three different web frameworks (each in a different programming language): FastAPI (Python) Rails (Ruby) Svelte (JavaScript) I decided to go with FastAPI for many reasons - go read the post linked above. ...

October 9, 2025 · 6 min · Scott Chamberlain

Picking a web framework

Over the past few months at work we’ve been looking into web framework options for a project that currently uses R Shiny. Our needs have grown beyond what Shiny can provide. We decided to try Rails, SvelteKit, and HTMX/FastAPI to see which one would best suit our needs. The frameworks Info and links on each: Rails Main language: Ruby Docs: Rails Guides Svelte Kit Main language: JavaScript Docs: Svelte Kit Docs HTMX/FastAPI Main language: Python Docs: HTMX Docs, FastAPI Docs Build minimal apps I built a minimal version of our existing Shiny app using each framework. For each app I created only the landing page, and two other pages - in total these three pages encompassed a lot of the complexity of the app, and allowed me to get a feel for how it would be to use each framework IRL. Because of reasons I’m not going to share these minimal apps. ...

March 27, 2025 · 7 min · Scott Chamberlain

uv notes

What is uv I’ve recently started using uv to manage Python projects and packages: many projects at work and the one active package I have on pypi.org (habanero). I don’t really know enough about all the various Python tools similar to uv to give an informed opinion. Rather, this is purely reflections on using uv. uv’s tagline is: An extremely fast Python package and project manager, written in Rust. uv docs and source code. ...

February 20, 2025 · 3 min · Scott Chamberlain

Working at Fred Hutchinson Cancer Center

Soooo, my last job at Deck was amazing. I loved it. I was doing data engineer stuff there, mostly maintaining infrastructure for data pipelines. Everyone was great and the mission was amazing: helping Democrats win. Yet the company was shut down about a month ago, sending me on another job search, the 3rd since early/mid 2021. I’m super thrilled to have landed a job (Software and Reproducibility Software Developer) at the Fred Hutch Data Science Lab (DASL), headed up by Jeff Leek, working with Sean Kross, Amy Paguirigan, and Monica Gerber, among many other amazing folks. ...

October 6, 2023 · 1 min · Scott Chamberlain

Python, ast, and redbaron

I recently had a use case at work where I wanted to check that file paths given in a Python script actually existed. These paths were in various GitHub repositories, so all I had to do was pull out the paths and check if they exist on GitHub. There were a few catches though. First, I couldn’t simply get any string out of each Python script - they needed to be strings specficied by a specific function parameter, and match a regex (e.g., start with ‘abc’). ...

April 18, 2023 · 4 min · Scott Chamberlain

List comprehension vs. filter vs. key lookup

I was working on a work task last week, and needed to filter out one instance of a class from a list of class instances. No matter how you do this speed doesn’t matter too much if you’re doing this operation once or a few times. However, I this operation needs to be done about 100K times each time the script runs - so speed definitely does matter in this case. ...

April 18, 2022 · 3 min · Scott Chamberlain

Notes on Python

It’s been interesting switching jobs with respect to programming languages. I used to write 95% R - now I write 95% Python. I have been using Python for many years, but not seriously or getting paid either. I’ve learned alot in the first 6 months. Some Python things learned: Functions and methods I used to think functions and methods were the same thing. But during the last 6 months I learned that functions and methods are not the same. Well, they’re not that different. A function outside a class is just called a function while a function inside a class is called a method. They could be exactly the same and do the same thing, but one is outside a class and the other inside a class. ...

February 7, 2022 · 2 min · Scott Chamberlain

habanero update: Crossref data from Python

I wrote about Crossref clients back nearly two years ago on this blog: Crossref programmatic clients. Since it’s been a while, it seems worth talking again about the the many ways to work programmatically with Crossref data - and focus in on the Python client habanero since it has some recent updates. The 3 clients work with the main Crossref API, which lets you do things like search for works by title, author, etc. (e.g., books, articles), search for publishing members, for funders, for journals, for DOI prefixes, and for licenses. It’s a powerful API with basically no rate limits, so you can work through lots of data quickly. ...

October 23, 2017 · 3 min · Scott Chamberlain

Crossref programmatic clients

I gave two talks recently at the annual Crossref meeting, one of which was a somewhat technical overview of programmatic clients for Crossref APIs. Check out the talk here. I talked about the motivation for working with Crossref data by writing code/etc. rather than going the GUI route, then went over the various clients, with brief examples. We (rOpenSci) have been working on the R client rcrossref for a while now, but I’m also working on the Python and Ruby clients for Crossref. In addition, the Ruby client has a CLI client inside. The Javascript client is worked on independently by ScienceAI. ...

November 30, 2015 · 3 min · Scott Chamberlain

pygbif - GBIF client for Python

I maintain an R client for the GBIF API, at rgbif. Been working on it for a few years, and recently been thinking that there should be a nice low level client for Python as well. I didn’t see one searching Github, etc. so I started working on one recently: pygbif It’s up on pypi. There’s not much in pygbif yet - I wanted to get something up to start getting some users to more quickly make the library useful to people. ...

November 12, 2015 · 2 min · Scott Chamberlain