Metadata-Version: 2.4
Name: ranking
Version: 0.3.2
Summary: Ranking collection
Home-page: http://pythonhosted.org/ranking
Author: Heungsub Lee
Author-email: sub@subl.ee
License: BSD
Platform: any
Classifier: Development Status :: 1 - Planning
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: BSD License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 2
Classifier: Programming Language :: Python :: 2.7
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.4
Classifier: Programming Language :: Python :: 3.5
Classifier: Programming Language :: Python :: 3.6
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: Implementation :: CPython
Classifier: Programming Language :: Python :: Implementation :: Jython
Classifier: Programming Language :: Python :: Implementation :: PyPy
Classifier: Topic :: Games/Entertainment
License-File: LICENSE
Dynamic: author
Dynamic: author-email
Dynamic: classifier
Dynamic: description
Dynamic: home-page
Dynamic: license
Dynamic: license-file
Dynamic: platform
Dynamic: summary


Ranking
~~~~~~~

This library provides ``Ranking`` iterator to assign rank to each values and
various `strategies for assigning rankings`_.

>>> sorted_scores = [100, 90, 90, 80, 70]
>>> for rank, score in Ranking(sorted_scores):
...     print '%d. %d' % (rank + 1, score)
1. 100
2. 90
2. 90
4. 80
5. 70
>>> for rank, score in Ranking(sorted_scores, DENSE):
...     print '%d. %d' % (rank + 1, score)
1. 100
2. 90
2. 90
3. 80
4. 70

Links
`````

* `GitHub repository <http://github.com/sublee/ranking>`_
* `development version
  <http://github.com/sublee/ranking/zipball/master#egg=ranking-dev>`_

.. _strategies for assigning rankings: 
   http://en.wikipedia.org/wiki/Ranking#Strategies_for_assigning_rankings

