Skip to main content

rs-avl for Python

PyPI PyPI downloads Python Publish PyPI

A fast AVL ordered set backed by Rust, with support for arbitrary comparable Python objects.

Installation

pip install rs-avl

Comparable values

from rs_avl import AVLTree

tree = AVLTree([4, 2, 6, 1, 3, 5])
tree.insert(7)

assert list(tree) == [1, 2, 3, 4, 5, 6, 7]
assert tree.search(3) == 3
assert list(tree.range(2, 6)) == [2, 3, 4, 5]
assert list(tree.iter_from(3, 3)) == [3, 4, 5]
assert list(tree.iter_to(5, 3)) == [5, 4, 3]
assert list(tree.descending()) == [7, 6, 5, 4, 3, 2, 1]

Objects ordered by an attribute

from dataclasses import dataclass
from rs_avl import AVLTree

@dataclass
class Task:
    name: str
    priority: int

tasks = AVLTree(
    [Task("document", 2), Task("release", 1)],
    key="priority",
)

assert tasks.first().name == "release"
assert tasks.search_key(2).name == "document"

key can also be a callable, including a lambda returning a composite key:

tasks = AVLTree(key=lambda task: (task.priority, task.name))

Equal keys are treated as duplicates. Extracted keys should remain comparable for as long as their values are stored. Type information is included through a generated .pyi file and py.typed marker.

License

Dual-licensed under your choice of GPL-3.0-only or Apache-2.0.

Download files

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

Source Distribution

rs_avl-0.1.1.tar.gz (34.8 kB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

rs_avl-0.1.1-cp310-abi3-win_arm64.whl (167.4 kB view details)

Uploaded CPython 3.10+Windows ARM64

rs_avl-0.1.1-cp310-abi3-win_amd64.whl (169.6 kB view details)

Uploaded CPython 3.10+Windows x86-64

rs_avl-0.1.1-cp310-abi3-win32.whl (160.2 kB view details)

Uploaded CPython 3.10+Windows x86

rs_avl-0.1.1-cp310-abi3-musllinux_1_2_x86_64.whl (514.3 kB view details)

Uploaded CPython 3.10+musllinux: musl 1.2+ x86-64

rs_avl-0.1.1-cp310-abi3-musllinux_1_2_i686.whl (550.5 kB view details)

Uploaded CPython 3.10+musllinux: musl 1.2+ i686

rs_avl-0.1.1-cp310-abi3-musllinux_1_2_armv7l.whl (588.0 kB view details)

Uploaded CPython 3.10+musllinux: musl 1.2+ ARMv7l

rs_avl-0.1.1-cp310-abi3-musllinux_1_2_aarch64.whl (484.2 kB view details)

Uploaded CPython 3.10+musllinux: musl 1.2+ ARM64

rs_avl-0.1.1-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (311.2 kB view details)

Uploaded CPython 3.10+manylinux: glibc 2.17+ x86-64

rs_avl-0.1.1-cp310-abi3-manylinux_2_17_s390x.manylinux2014_s390x.whl (326.7 kB view details)

Uploaded CPython 3.10+manylinux: glibc 2.17+ s390x

rs_avl-0.1.1-cp310-abi3-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl (427.4 kB view details)

Uploaded CPython 3.10+manylinux: glibc 2.17+ ppc64le

rs_avl-0.1.1-cp310-abi3-manylinux_2_17_armv7l.manylinux2014_armv7l.whl (313.8 kB view details)

Uploaded CPython 3.10+manylinux: glibc 2.17+ ARMv7l

rs_avl-0.1.1-cp310-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (308.3 kB view details)

Uploaded CPython 3.10+manylinux: glibc 2.17+ ARM64

rs_avl-0.1.1-cp310-abi3-manylinux_2_5_i686.manylinux1_i686.whl (331.9 kB view details)

Uploaded CPython 3.10+manylinux: glibc 2.5+ i686

rs_avl-0.1.1-cp310-abi3-macosx_11_0_arm64.whl (277.3 kB view details)

Uploaded CPython 3.10+macOS 11.0+ ARM64

rs_avl-0.1.1-cp310-abi3-macosx_10_12_x86_64.whl (274.4 kB view details)

Uploaded CPython 3.10+macOS 10.12+ x86-64

File details

Details for the file rs_avl-0.1.1.tar.gz.

File metadata

  • Download URL: rs_avl-0.1.1.tar.gz
  • Upload date:
  • Size: 34.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for rs_avl-0.1.1.tar.gz
Algorithm Hash digest
SHA256 90701038774cf1effad9c44ad7a4d6375e86ba2cf7b843733f6521010717b9f5
MD5 2f866a340b2ca5fd118358f83b4bb89c
BLAKE2b-256 d818c5d924551f0c7790170c21c9726381808b158ba57d42213e4d30a1b45aaf

See more details on using hashes here.

Provenance

The following attestation bundles were made for rs_avl-0.1.1.tar.gz:

Publisher: pypi.yml on anuradhawick/rs-avl

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file rs_avl-0.1.1-cp310-abi3-win_arm64.whl.

File metadata

  • Download URL: rs_avl-0.1.1-cp310-abi3-win_arm64.whl
  • Upload date:
  • Size: 167.4 kB
  • Tags: CPython 3.10+, Windows ARM64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for rs_avl-0.1.1-cp310-abi3-win_arm64.whl
Algorithm Hash digest
SHA256 bf90626d9c35ca01270fb676c7caac677e6f0d510edf74423f8b626210a3bb5e
MD5 9c4b78334037cf5c94d7c71201ef9127
BLAKE2b-256 75491b1124e605f75afd158ad1bb4bbcb938fc13869d75e25e5e4b7b29e6f311

See more details on using hashes here.

Provenance

The following attestation bundles were made for rs_avl-0.1.1-cp310-abi3-win_arm64.whl:

Publisher: pypi.yml on anuradhawick/rs-avl

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file rs_avl-0.1.1-cp310-abi3-win_amd64.whl.

File metadata

  • Download URL: rs_avl-0.1.1-cp310-abi3-win_amd64.whl
  • Upload date:
  • Size: 169.6 kB
  • Tags: CPython 3.10+, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for rs_avl-0.1.1-cp310-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 f8f14bb66c59c7f4c706aa3020d79979e528c700b112bde1f69c7e54b35c504c
MD5 6c132434cec26b016e337db891a9825d
BLAKE2b-256 e0edc98e56598f3c3c20cd01ede67e29c36bc3fb5e96fda9cb3b2b6a266130f7

See more details on using hashes here.

Provenance

The following attestation bundles were made for rs_avl-0.1.1-cp310-abi3-win_amd64.whl:

Publisher: pypi.yml on anuradhawick/rs-avl

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file rs_avl-0.1.1-cp310-abi3-win32.whl.

File metadata

  • Download URL: rs_avl-0.1.1-cp310-abi3-win32.whl
  • Upload date:
  • Size: 160.2 kB
  • Tags: CPython 3.10+, Windows x86
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for rs_avl-0.1.1-cp310-abi3-win32.whl
Algorithm Hash digest
SHA256 5458b20189cfa40ec9095483584786e524ef62f9f59b97aaf3f8f55554a2e09a
MD5 85546235c0a2af534265114985f3a5cb
BLAKE2b-256 516dbc190c9eafebcf8a060c523a3a751ddfaa493a30ab48be8d8c14318c93ff

See more details on using hashes here.

Provenance

The following attestation bundles were made for rs_avl-0.1.1-cp310-abi3-win32.whl:

Publisher: pypi.yml on anuradhawick/rs-avl

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file rs_avl-0.1.1-cp310-abi3-musllinux_1_2_x86_64.whl.

File metadata

File hashes

Hashes for rs_avl-0.1.1-cp310-abi3-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 5f5f4d4cada3e62bb7ac3741191e414b46eda6a3e5081c497fc291442ff0000f
MD5 eb7fd2955a8fc63a7745cd70f97e9ed7
BLAKE2b-256 fa58417bb376fa1a563b18a5fc2cd49602676a69c02b11cf5e59022920ecc281

See more details on using hashes here.

Provenance

The following attestation bundles were made for rs_avl-0.1.1-cp310-abi3-musllinux_1_2_x86_64.whl:

Publisher: pypi.yml on anuradhawick/rs-avl

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file rs_avl-0.1.1-cp310-abi3-musllinux_1_2_i686.whl.

File metadata

  • Download URL: rs_avl-0.1.1-cp310-abi3-musllinux_1_2_i686.whl
  • Upload date:
  • Size: 550.5 kB
  • Tags: CPython 3.10+, musllinux: musl 1.2+ i686
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for rs_avl-0.1.1-cp310-abi3-musllinux_1_2_i686.whl
Algorithm Hash digest
SHA256 270f7c846ebc0e85b29005053aebad31f333e2f122c60624288906f1e5cda5cc
MD5 e39013ea70c6ce59070671e3ea1f9778
BLAKE2b-256 0730173b6f3f1c372a40a62de67aa2979e67c436c34540e51838575b620780a7

See more details on using hashes here.

Provenance

The following attestation bundles were made for rs_avl-0.1.1-cp310-abi3-musllinux_1_2_i686.whl:

Publisher: pypi.yml on anuradhawick/rs-avl

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file rs_avl-0.1.1-cp310-abi3-musllinux_1_2_armv7l.whl.

File metadata

File hashes

Hashes for rs_avl-0.1.1-cp310-abi3-musllinux_1_2_armv7l.whl
Algorithm Hash digest
SHA256 02403ef62b1386bb98f775561c83e0bd84126bb8fccb36f641921a6d7c85eb87
MD5 b45b3fcb0100f1677f304519a9273821
BLAKE2b-256 4408cc8a346862c32edf362d99dfb4f0fd69a136b0f5c12b430bf52aac6326d4

See more details on using hashes here.

Provenance

The following attestation bundles were made for rs_avl-0.1.1-cp310-abi3-musllinux_1_2_armv7l.whl:

Publisher: pypi.yml on anuradhawick/rs-avl

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file rs_avl-0.1.1-cp310-abi3-musllinux_1_2_aarch64.whl.

File metadata

File hashes

Hashes for rs_avl-0.1.1-cp310-abi3-musllinux_1_2_aarch64.whl
Algorithm Hash digest
SHA256 cbbc39e72022803eb906c882f9977202cb781485cc54d750108722f6a93007b5
MD5 ff9ae5ed82c4597d8b752e17a53f26ac
BLAKE2b-256 6a08fc2d4d3aa6b1595b597741d23778daabdb4a39a9767b909d4be1426df456

See more details on using hashes here.

Provenance

The following attestation bundles were made for rs_avl-0.1.1-cp310-abi3-musllinux_1_2_aarch64.whl:

Publisher: pypi.yml on anuradhawick/rs-avl

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file rs_avl-0.1.1-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for rs_avl-0.1.1-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 354551e16754f7eff0468fff75eb6252568efb390beb105af004a89ba8e12c69
MD5 1a17d55184dacbb1c335e4c36c12266d
BLAKE2b-256 d59a577a6e3c02722f27f08f8d43da4582334fa1663af178c752b2b3fbd3e551

See more details on using hashes here.

Provenance

The following attestation bundles were made for rs_avl-0.1.1-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl:

Publisher: pypi.yml on anuradhawick/rs-avl

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file rs_avl-0.1.1-cp310-abi3-manylinux_2_17_s390x.manylinux2014_s390x.whl.

File metadata

File hashes

Hashes for rs_avl-0.1.1-cp310-abi3-manylinux_2_17_s390x.manylinux2014_s390x.whl
Algorithm Hash digest
SHA256 34edd6e6ec29926514e3109f87204c2c173e52eb478104acc931033c8bda16ae
MD5 1b2cdea038c59b57a6f24dd1ffb549ed
BLAKE2b-256 e3a5740afb205714a6e953aed1a138d1f366302e13c9b0845c13f38d7dcd0cd5

See more details on using hashes here.

Provenance

The following attestation bundles were made for rs_avl-0.1.1-cp310-abi3-manylinux_2_17_s390x.manylinux2014_s390x.whl:

Publisher: pypi.yml on anuradhawick/rs-avl

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file rs_avl-0.1.1-cp310-abi3-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl.

File metadata

File hashes

Hashes for rs_avl-0.1.1-cp310-abi3-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl
Algorithm Hash digest
SHA256 884f5794f33c5ffae7ce8dd7d11027a63541536df816ca80427154e0c5300f9c
MD5 066bc473b2e02351e99f2fff7d6f07d6
BLAKE2b-256 a098d5ced23f23e6b81421d2f9c5937492ec53e281c3ed70784dccba7ca9cca1

See more details on using hashes here.

Provenance

The following attestation bundles were made for rs_avl-0.1.1-cp310-abi3-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl:

Publisher: pypi.yml on anuradhawick/rs-avl

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file rs_avl-0.1.1-cp310-abi3-manylinux_2_17_armv7l.manylinux2014_armv7l.whl.

File metadata

File hashes

Hashes for rs_avl-0.1.1-cp310-abi3-manylinux_2_17_armv7l.manylinux2014_armv7l.whl
Algorithm Hash digest
SHA256 d791613d0d014cc025c229eac4c618684a8b22ceb5b37709d4f542fc876d536b
MD5 f66c08d5914d943fe2b947057a4eea32
BLAKE2b-256 da8e36672bb163f71f488b7c50c300195f7b629771133ca333fc286f143252ba

See more details on using hashes here.

Provenance

The following attestation bundles were made for rs_avl-0.1.1-cp310-abi3-manylinux_2_17_armv7l.manylinux2014_armv7l.whl:

Publisher: pypi.yml on anuradhawick/rs-avl

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file rs_avl-0.1.1-cp310-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for rs_avl-0.1.1-cp310-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 17b399479fc05451c19c13497cb17f155b1b031118803011584ec6d5e16922df
MD5 5b4e7482dabcb3342620944c4b9656b1
BLAKE2b-256 774a280c9efd6365c5890900f07b0fb5c12d5ecc04c7d6e692f45a4ebadcbbaf

See more details on using hashes here.

Provenance

The following attestation bundles were made for rs_avl-0.1.1-cp310-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl:

Publisher: pypi.yml on anuradhawick/rs-avl

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file rs_avl-0.1.1-cp310-abi3-manylinux_2_5_i686.manylinux1_i686.whl.

File metadata

File hashes

Hashes for rs_avl-0.1.1-cp310-abi3-manylinux_2_5_i686.manylinux1_i686.whl
Algorithm Hash digest
SHA256 a4acc311028faf8aa0fe518ad04cdac56eb11a7dd2b7de559195663165007fd7
MD5 283f510ab3a91e88558d7df51c798de0
BLAKE2b-256 b533448d3ca65dd6f126d8e380880f09c2489b3449ff4532ad811666e0185977

See more details on using hashes here.

Provenance

The following attestation bundles were made for rs_avl-0.1.1-cp310-abi3-manylinux_2_5_i686.manylinux1_i686.whl:

Publisher: pypi.yml on anuradhawick/rs-avl

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file rs_avl-0.1.1-cp310-abi3-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for rs_avl-0.1.1-cp310-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 4744f05abcd555afddc26dfd1e40399e8e058f22bdbd48d3b0e65c47548c5da3
MD5 8bad5d2caee12a6aef9f05bca405967c
BLAKE2b-256 9b4922ddd667ade37b09f9eef63b09671d3e52de16532b3ba77f0252196821a0

See more details on using hashes here.

Provenance

The following attestation bundles were made for rs_avl-0.1.1-cp310-abi3-macosx_11_0_arm64.whl:

Publisher: pypi.yml on anuradhawick/rs-avl

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file rs_avl-0.1.1-cp310-abi3-macosx_10_12_x86_64.whl.

File metadata

File hashes

Hashes for rs_avl-0.1.1-cp310-abi3-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 e6e247d5cfb1a542fca0adf43eedd9a456a16b18db8495483d1339142ec4419a
MD5 9a183f09cff38e5f700d96718043208f
BLAKE2b-256 ee036eba65dfdaa0ba08268d8e9c83f889b26daf75f804c92fdf2c513d96f63e

See more details on using hashes here.

Provenance

The following attestation bundles were made for rs_avl-0.1.1-cp310-abi3-macosx_10_12_x86_64.whl:

Publisher: pypi.yml on anuradhawick/rs-avl

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page