I recently had a use case at work (a LiteStar app) where I needed to write to two linked tables (see below) in a transaction in our PostgreSQL database. In the models for the two tables was included a foreign key relationship: from sqlalchemy import Column, String, DateTime, ForeignKey from sqlalchemy.orm import Mapped, relationship from typing import List # UUIDBase automatically generates a UUID…
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…
I’m excited to announce a new release of vcr: v2. vcr helps you record and replay HTTP interactions in your tests (and more now, see below ). This release brings improvements in usability and security, it streamlines the API, and adds many new features. Where all past versions of vcr have been minor tweaks on a direct port of the Ruby gem of the same name , this version diverges from the…
Introduction At work ( Fred Hutch Cancer Center ) we’ve been working on an R package ( sixtyfour ) over the last ~1.5 years. This post is a quick intro to the package with some learnings about working with AWS. sixtyfour is a science-focused, more humane R interface to AWS. It is built on top of the great paws package maintained by Dyfan Jones , which handles authentication and the low-level…
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…