RSSAmplifier

Blog

Gribouillis

Mindless sketches ✐ᝰ

blog.natfu.beRSS feed ↗5 posts

Latest posts

Runtime validation in type annotations

Motivation I was trying to understand a pattern I've seen in libraries like FastAPI , pydantic or cyclopts ; where type annotations are used for runtime validation via typing.Annotated . You'll also see such examples straight from the Python documentation but without an explicit example in how to implement the validation. Here's what I've come up with as a minimal example. Type…

Emacs in the terminal: keybindings, client and more

Emacs in the terminal If you've ever tried using Emacs with emacs -nw (no window) in your terminal, you might've faced a frustrating experience: because Emacs binds keys starting with Ctrl and terminal input is first handled by the terminal emulator; some keys might not work as expected. They might provoke an action in the terminal but not in Emacs or be changed on the way. If…

You might not need python-dotenv

I often see python-dotenv as a dependency in applications where one needs to load the .env and think to myself: 'Why?'. It's a convenient package but the usage most applications have of it can easily be implemented which is what I'll show here. Note that I'm talking about applications, not libraries you'd want to package for others. Another thing that bugs me, is that…

Managing settings in Python projects

Motivation In general, I've not seen any strong prescription in how to deal with settings when working on Python applications. As the project grows and when you're exposing multiple kinds of configurations, it makes sense to have a common interface to handle settings. Otherwise, it can lead to some frustration, as any time you're working on an application with multiple people,…

Whoami?

I'm Nathan and I'm a software developer. I've mostly been working on back-ends with Python and I play around with Emacs and Lisps (like Emacs Lisp or Clojure) in my free time. Right now, I'm working on securing operations for AI applications and I do a hodgepodge of DevOps, security and software design, hand-in-hand with data scientists. Find me on Github Subscribe Do not email…