Python

Simple SQL Schema Migration

I'm working on an application to manage my streaming media for my Roku player using sqlite3 and Python for everything. One thing I've learned over the years is that your SQL schema always changes. Once your code is in production you always have something you need to change about it, whether it's adding a new column, changing a type or tables to support new features. I wanted a way to automatically update the database schema when a new version of the code is installed. I don't want to jump into the complexity of using SQLAlchemy and migrate so I came up with this simple method. The database has a table named schema with a single row with the current schema version in it. This class checks the current version and executes any missing commands, bringing it up to the latest version.

Streaming Local Video With Your Roku

Ever since I switched from Dish Network to a Roku player a few months ago I have had a couple of things I wanted my player to be able to do. The ability to categorize my Netflix queue is at the top of my list and it would be very cool to be able to play video from a local server. The SDK won't help me modify the Netflix application, but streaming from a local source is actually not a huge problem.

System Health Monitoring Software

System Health Monitor for Linux is a handy Python program that will setup your system to generate RRD Graphs of network interface traffic, system load, memory usage, disk space and inode usage and graphs of the number of running processes. It features a user-friendly interactive configuration mode and auto-generated html pages. Just point your web server to the health_html directory to get an overview of the status of your machine. You can see examples of it in operation here on my machine