One thing I thought of is that with the architecture I chose for the processes and data base, the updating of an external (or even internal) service could be a separate process that gets readings from the data base and forwards them off. So, first I separated the Xively code into a separate process and tested the idea. It worked like a charm. So, I created a process for doing the same thing for ThingSpeak.
It followed the model of: not enough examples, not enough documentation in the examples that did exist, and nothing that actually fit what I wanted to do. But, since I'm getting a little more buzz-word and jargon savvy, this effort was about a morning instead of days.
So, the python script below sucks items out of the database, formats, and forwards them to ThingSpeak. I used the same tactic that I've found makes my job much, much easier, scheduling. If you glance at the code, all the main processing does is set up a few things, schedule a task every minute, then hang in a loop. Every minute, it wakes up a routine that does all the work. That's all there is to it. Unlike many of the examples out there, this code is running right this second on my little Pi and doing a fine job of sending the data off.
It runs in the background like the code that monitors the house and records the data in my data base. I just invoke it by "nohup python -u updatethingspeak.py >logfile &" (leave out the quotes of course), and it just works its little heart out. I'll eventually look into automating the bring up of the various pieces so that I don't have to bother with it after a reboot or power failure, but for now, doing it by hand is fine.
As usual, it is HIGHLY commented. I hate examples the cause you to search the internet for hours to get any understanding of what is going on. I also used the simplest statements I could while still leveraging the power of python. It's funny that python was designed to be self-documenting and easy to read, but excels at being obtuse and strange. That's almost entirely because people have chosen to use it that way. My thinking is that I'm going to come back to this code in a year or two and have to remember what the heck I did and why. When you do something similar, keep that in mind.
Yep, that's all there is to it. Using this technique, I can add or subtract services really easily. If I run across something that catches my eye, it'll only be a little while before I'm testing it.