tidbyt / pixlet

Build apps for pixel-based displays ✨
https://tidbyt.com
Apache License 2.0
756 stars 107 forks source link

Persistent storage across `pixlet render` runs #103

Open pepijnve opened 2 years ago

pepijnve commented 2 years ago

I'm working on a little app to pull some activity data from Strava and render it to Tidbyt (see https://github.com/pepijnve/tidbyt/blob/master/strava.star). Strava requires OAuth authentication these days (the older perpetual API tokens no longer work). You typically only want to do the OAuth authorization exchange once and then hold on to the received token for future runs.

I initially thought I was going to be able to use the cache module for this, but that's only an ephemeral in-memory implementation at the moment. Is there a supported means of storing/loading bits of data for use across render runs?

rohansingh commented 2 years ago

Internally we have a cache implementation that uses a durable Redis store. We also have a separate "config" store for things like OAuth tokens or user preferences. We're doing some work now to bring the latter into Pixlet.