Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
To track which awesome lists appear on a repository list, you can simply use a set. The Redis SADD command is used to add members to a set stored at the key. SADD commands return the number of elements that were added to the set. This does not include all of the elements already present in the set.
SADD resource:github:{owner}:{repo_name}:lists {list}
SET resource:github:{owner}:{repo_name}
'repo_name': resource['name'],
'lists': # SMEMBERS resource:github:{owner}:{repo_name}:lists
'body': resource['description'],
'stargazers_count': resource['stargazers_count'],
'language': resource['language'],
'svn_url': resource['svn_url']
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment