Skip to content

Instantly share code, notes, and snippets.

@TomiToivio
Created June 7, 2012 14:29
Show Gist options
  • Save TomiToivio/2889097 to your computer and use it in GitHub Desktop.
Save TomiToivio/2889097 to your computer and use it in GitHub Desktop.
import sputnik
client_id = sputnik.get("sputnik:client_id")
sputnikchannels = sputnik.smembers("sputnik:channels")
chnl = {}
for ch in sputnik.rkeys("sputnik:channel:*:channel"):
chnl[ch] = sputnik.smembers(ch)
usrs = {}
for ch in sputnik.rkeys("sputnik:channel:*:users"):
usrs[ch] = sputnik.smembers(ch)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment