Skip to main content

lexorank.py

python3 -m pip install lexorank-py

New Rank

from pprint import pprint

from lexorank import Bucket, middle

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

pprint(ranks)
[<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>]

Between

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)  # = a.next()
# <LexoRank value=0|i0000g: base=36>

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

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

Metadata

Release files for lexorank-py 0.2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for lexorank-py 0.2.0
File Size Uploaded
lexorank_py-0.2.0.tar.gz 48.8 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for lexorank-py 0.2.0
File Interpreter ABI Platform
lexorank_py-0.2.0-py3-none-any.whl Python 3 none any Details

Total release size: 60.2 kB

Release files / lexorank_py-0.2.0.tar.gz

Download URL lexorank_py-0.2.0.tar.gz
Size 48.8 kB
Tags Source
SHA-256 checksum
How to use checksums
63ff48ddf28aa6954e8f12ca2b21343ecb30ee5f7cfd3982606fd3195cb5d259
BLAKE2b-256 checksum
How to use checksums
f0b707a1e942e883211fb0293d4bed716a74896d85988e2443be5967ac67c7b8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.10.19

Release files / lexorank_py-0.2.0-py3-none-any.whl

Download URL lexorank_py-0.2.0-py3-none-any.whl
Size 11.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
4d126a7bc7025037262c04cbd12b388df5fb9b087864821cbbbbfe8f21fb79cc
BLAKE2b-256 checksum
How to use checksums
3de432d40d9d7a9c5d589031ff398176c3fb4697bf2bee6da6e14b352d92b479
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.10.19

Release history Release notifications | RSS feed

This release

0.2.0 This release

2 release files

0.1.1

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page