I'm not sure if this is what you meant but I've wondered if Web2py would make a good framework for being able to distribute a self-contained app to be run locally. For example, I've seen some point-of-sale systems that package up a Ruby + Postgres runtime designed to be run locally (I believe ShopKeep is an example). An app like this could of course sync with a server in the cloud (would be nice to have some pre-existing code for that).
But it sounds like you might be referring to something like a Backbone.js app with browser-based local storage and speaking to a back-end somewhere in REST. Certainly Web2py or DAL might be a reasonable engine to run the back-end but it's a little "thick". I saw some examples that run off the PHP "Slim" framework which is super-lightweight and just spits out JSON/REST.