Skip to main content


Project description

python3 -m pip install lexorank-py

New Rank

from pprint import pprint

from lexorank import Bucket, middle

prev = middle(Bucket.BUCEKT_0)
ranks = [prev]
for _ in range(9):
    prev = ranks[-1]

[<LexoRank value=0|i00000: base=36>,
 <LexoRank value=0|i0000g: base=36>,
 <LexoRank value=0|i0000w: base=36>,
 <LexoRank value=0|i0001c: base=36>,
 <LexoRank value=0|i0001s: base=36>,
 <LexoRank value=0|i00028: base=36>,
 <LexoRank value=0|i0002o: base=36>,
 <LexoRank value=0|i00034: base=36>,
 <LexoRank value=0|i0003k: base=36>,
 <LexoRank value=0|i00040: base=36>]


from lexorank import between, parse

a = parse("0|i00000:")
b = parse("0|i00001:")

mid = between(a, b)
# <LexoRank value=0|i00000:i base=36>

a = parse("0|i00000:")
b = None

mid = between(a, b)  # =
# <LexoRank value=0|i0000g: base=36>

a = None
b = parse("0|i00000:")

mid = between(a, b)  # = b.prev()
# <LexoRank value=0|hzzzzk: base=36>

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

lexorank-py-0.1.1.tar.gz (48.7 kB view hashes)

Uploaded Source

Built Distribution

lexorank_py-0.1.1-py3-none-any.whl (11.3 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page