- Fix an edge case in the updated comparison for non-members
- Fix running under Python 3 for
ranked_in_list(...)
ifinclude_missing
isTrue
and non-member(s) passed in
- Fixed an error with the
ranked_in_list
method when using certain options #46 - Added
total_scores
method #45
- Remove
izip_longest
import where unneeded. #44
- More pipelining as per Ruby library, #58.
Also adds
members_data_for(...) and
members_data_for_in(...)` methods. - Guard against an out of bounds index in
member_at
- Allow options to be passed down to the connection pool.
- Allow a Redis connection to be passed in the Leaderboard initializer using the
redis_connection
option.
- Similar fix to one found in the Ruby leaderboard library. Fixes TieRankingLeaderboard doesn't rank if the score is 0.
- Allow member data to be set in the
change_score_for(...)
method. - Add
include_missing
option in leaderboard request options to change whether or not to include missing members in the result.
- Add
global_member_data
option that allows multiple leaderboards to share the same set of member_data. #51 for original pull request from the Ruby leaderboard library. - Add
top
helper method. #50 for the original pull request from the Ruby leaderboard library.
- Add support for
change_score_for(...)
in theTieRankingLeaderboard
class.
- Add Python3 version check to accommodate 2to3 change of itertools.izip_longest #30
- Add support for tie handling in leaderboards #28
- Re-organized the structure of the leaderboard library so that all the base leaderboard code is no longer in the init.py.
- Allow for customization of member_data namespace #19
- Allow for custom keys to be set for customizing the data returned from calls like
leaders
oraround_me
#18. Thanks @seaders.
- Identify client class and send appropriate zadd command. Resolves #17.
- Added
score_for_percentile
method to be able to calculate the score for a given percentile value in the leaderboard.
- Added
rank_member_across
method to be able to rank a member across multiple leaderboards at once. - Fixed bugs in
leaders_in
andaround_me_in
methods that would not correctly use theleaderboard_name
argument.
- Added
remove_members_outside_rank
method to remove members from the leaderboard outside a given rank.
- Added
members_only
option for various leaderboard requests - HT: Simon Zimmerman leaders
call should return[]
in case of an empty result set - HT: Simon Zimmerman- Initializer no longer deep copies options - HT: Simon Zimmerman
- Fixed a data leak in
expire_leaderboard
andexpire_leaderboard_at
to also set expiration on the member data hash.
- Updated
remove_member
to also remove the optional member data for the member being removed.
- Added
rank_member_if
andrank_member_if_in
methods that allow you to rank a member in the leaderboard based on execution of a function. - Added
rank_members
andrank_members_in
methods that allow you to rank multiple members in a leaderboard at once by passing in an array of members and scores.
- No longer cast scores to a floating point automatically. If requesting a score for an unknown member in the leaderboard, return
None
. Under the old behavior, aNone
score gets returned as 0.0. This is misleading as 0.0 is a valid score. - Fixes a bug in
ranked_in_list
when requesting a list with an unknown member.
- Remove unnecessary options from
score_and_rank_for
method
- Port missing functionality from Ruby leaderboard project to Python.
- Feature and data parity should exist between these two implementations.