Skip to main content

rs-avl for Python

PyPI 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]

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.0.tar.gz (32.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.0-cp310-abi3-win_arm64.whl (164.5 kB view details)

Uploaded CPython 3.10+Windows ARM64

rs_avl-0.1.0-cp310-abi3-win_amd64.whl (166.5 kB view details)

Uploaded CPython 3.10+Windows x86-64

rs_avl-0.1.0-cp310-abi3-win32.whl (156.8 kB view details)

Uploaded CPython 3.10+Windows x86

rs_avl-0.1.0-cp310-abi3-musllinux_1_2_x86_64.whl (511.5 kB view details)

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

rs_avl-0.1.0-cp310-abi3-musllinux_1_2_i686.whl (546.3 kB view details)

Uploaded CPython 3.10+musllinux: musl 1.2+ i686

rs_avl-0.1.0-cp310-abi3-musllinux_1_2_armv7l.whl (583.5 kB view details)

Uploaded CPython 3.10+musllinux: musl 1.2+ ARMv7l

rs_avl-0.1.0-cp310-abi3-musllinux_1_2_aarch64.whl (480.5 kB view details)

Uploaded CPython 3.10+musllinux: musl 1.2+ ARM64

rs_avl-0.1.0-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (307.9 kB view details)

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

rs_avl-0.1.0-cp310-abi3-manylinux_2_17_s390x.manylinux2014_s390x.whl (324.0 kB view details)

Uploaded CPython 3.10+manylinux: glibc 2.17+ s390x

rs_avl-0.1.0-cp310-abi3-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl (424.0 kB view details)

Uploaded CPython 3.10+manylinux: glibc 2.17+ ppc64le

rs_avl-0.1.0-cp310-abi3-manylinux_2_17_armv7l.manylinux2014_armv7l.whl (309.8 kB view details)

Uploaded CPython 3.10+manylinux: glibc 2.17+ ARMv7l

rs_avl-0.1.0-cp310-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (304.7 kB view details)

Uploaded CPython 3.10+manylinux: glibc 2.17+ ARM64

rs_avl-0.1.0-cp310-abi3-manylinux_2_5_i686.manylinux1_i686.whl (327.4 kB view details)

Uploaded CPython 3.10+manylinux: glibc 2.5+ i686

rs_avl-0.1.0-cp310-abi3-macosx_11_0_arm64.whl (274.0 kB view details)

Uploaded CPython 3.10+macOS 11.0+ ARM64

rs_avl-0.1.0-cp310-abi3-macosx_10_12_x86_64.whl (271.9 kB view details)

Uploaded CPython 3.10+macOS 10.12+ x86-64

File details

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

File metadata

  • Download URL: rs_avl-0.1.0.tar.gz
  • Upload date:
  • Size: 32.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.0.tar.gz
Algorithm Hash digest
SHA256 420ee8f18256ec0143c9c0bcaae5385de7ae1e99c75b346f36f62cbb582f14bb
MD5 fa26c24ae08eff7ceea2195b0126238a
BLAKE2b-256 0d485ac6cc7283b2c9e69be08ba9f769b9e7a5b6c915f5cfcb797363057ec9f8

See more details on using hashes here.

Provenance

The following attestation bundles were made for rs_avl-0.1.0.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.0-cp310-abi3-win_arm64.whl.

File metadata

  • Download URL: rs_avl-0.1.0-cp310-abi3-win_arm64.whl
  • Upload date:
  • Size: 164.5 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.0-cp310-abi3-win_arm64.whl
Algorithm Hash digest
SHA256 aef95ebe9083d7ee0bcb3c2df7d4273bad5f05dc91f69e21c3d0b26ed8c9d80f
MD5 dde47401981895f49e448b39aa95ec9a
BLAKE2b-256 3da98140b48a74b13cf7474cb3e47b0024b7c559e869c8c36564030ddd8c027e

See more details on using hashes here.

Provenance

The following attestation bundles were made for rs_avl-0.1.0-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.0-cp310-abi3-win_amd64.whl.

File metadata

  • Download URL: rs_avl-0.1.0-cp310-abi3-win_amd64.whl
  • Upload date:
  • Size: 166.5 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.0-cp310-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 fddbd8100527f25e1c6e493983f467c30d08944611ff42f8a8b2ebfda98756a2
MD5 d0edecf6762704bef4250df01be41b47
BLAKE2b-256 a40d9add5c1c21f3df69b7b94ceadb2a1abab75c8bc19db180682284da1b73b7

See more details on using hashes here.

Provenance

The following attestation bundles were made for rs_avl-0.1.0-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.0-cp310-abi3-win32.whl.

File metadata

  • Download URL: rs_avl-0.1.0-cp310-abi3-win32.whl
  • Upload date:
  • Size: 156.8 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.0-cp310-abi3-win32.whl
Algorithm Hash digest
SHA256 59baf9257db6bc66bf1edabcddca7448b0273aab6f4c0eb9a62a2c5bf6efb5e2
MD5 6eb358e477b1b1d976523fb67e03744d
BLAKE2b-256 ca505a739ec7664259e0f0f2fd1586bdf982e85d6463dfc036bae7ac9ebbe3bf

See more details on using hashes here.

Provenance

The following attestation bundles were made for rs_avl-0.1.0-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.0-cp310-abi3-musllinux_1_2_x86_64.whl.

File metadata

File hashes

Hashes for rs_avl-0.1.0-cp310-abi3-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 b6ef3b6eb4b3db94ecab3b2e6c6aa5a37cffaa9a60d0dd71fb155f9524a13716
MD5 ed98044b195947042dea811d32c51724
BLAKE2b-256 6c05d5e26a9ee1a99207bf16dac4b48cbec5573e6354b1ebd41c9facc12d0e0b

See more details on using hashes here.

Provenance

The following attestation bundles were made for rs_avl-0.1.0-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.0-cp310-abi3-musllinux_1_2_i686.whl.

File metadata

  • Download URL: rs_avl-0.1.0-cp310-abi3-musllinux_1_2_i686.whl
  • Upload date:
  • Size: 546.3 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.0-cp310-abi3-musllinux_1_2_i686.whl
Algorithm Hash digest
SHA256 7b46d3f796587eae13ee25d5bd0626892176199f684327a259ee4801b6519bbc
MD5 ffd72f802bb51ccdd3b76b253c79718b
BLAKE2b-256 9bf41cd7a7067bff67a71b267a3237c21dd8c5ae00ba1be0bbc37691c88e78f5

See more details on using hashes here.

Provenance

The following attestation bundles were made for rs_avl-0.1.0-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.0-cp310-abi3-musllinux_1_2_armv7l.whl.

File metadata

File hashes

Hashes for rs_avl-0.1.0-cp310-abi3-musllinux_1_2_armv7l.whl
Algorithm Hash digest
SHA256 88dce1301e746ae8997d7fb33d421b22d2eda97e367e9137f0af595eacd2c68e
MD5 16448953613f9cad713736fea41edf2c
BLAKE2b-256 04cea18ce38a243adae7d84da3f3bcc8ddafc405470ec0f46c3bd88c5e0e8de1

See more details on using hashes here.

Provenance

The following attestation bundles were made for rs_avl-0.1.0-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.0-cp310-abi3-musllinux_1_2_aarch64.whl.

File metadata

File hashes

Hashes for rs_avl-0.1.0-cp310-abi3-musllinux_1_2_aarch64.whl
Algorithm Hash digest
SHA256 0e88c9fadf80e31b7a6fd122ba9746e4b0405000f0c77272c61061a070b53a13
MD5 7c34d7fa24f8108afc1c9ad9e1a41ee7
BLAKE2b-256 51d8f1d553d9483e58184bc99878609f7bf62777f1efaf87f22e69578a3245f4

See more details on using hashes here.

Provenance

The following attestation bundles were made for rs_avl-0.1.0-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.0-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for rs_avl-0.1.0-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 ec49fa02e0abfc34202acc8a0d11f2282d4c7149a1673e5bb2fac8f10c96bfff
MD5 de3da9f6e6b8c4374f3a05d19a4ab32a
BLAKE2b-256 f152521456064c5f56ae73c4c84aa9b771aa7f27fe705d5aecb5d5126d08df08

See more details on using hashes here.

Provenance

The following attestation bundles were made for rs_avl-0.1.0-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.0-cp310-abi3-manylinux_2_17_s390x.manylinux2014_s390x.whl.

File metadata

File hashes

Hashes for rs_avl-0.1.0-cp310-abi3-manylinux_2_17_s390x.manylinux2014_s390x.whl
Algorithm Hash digest
SHA256 a21d32bab4686323e70c196e4dfc66cddad442b732593ab8695c1e9cd420b7d3
MD5 6eeabc539181aef08b284169d8b8c1eb
BLAKE2b-256 689b575894deabdb12a1fe1dab53bc15b2dd3a15d069855560e859c34fe4faa6

See more details on using hashes here.

Provenance

The following attestation bundles were made for rs_avl-0.1.0-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.0-cp310-abi3-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl.

File metadata

File hashes

Hashes for rs_avl-0.1.0-cp310-abi3-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl
Algorithm Hash digest
SHA256 4b3cd352b487d16da2495d99f04caefcba59e2a9c3c45b08eff5b0d5e668521a
MD5 aadb0598c7540a11d1f2a8297cc8071b
BLAKE2b-256 ae336aa1483bd64287a8deb49cea4f0b3b382dbbd631a70508f35555e8bfc878

See more details on using hashes here.

Provenance

The following attestation bundles were made for rs_avl-0.1.0-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.0-cp310-abi3-manylinux_2_17_armv7l.manylinux2014_armv7l.whl.

File metadata

File hashes

Hashes for rs_avl-0.1.0-cp310-abi3-manylinux_2_17_armv7l.manylinux2014_armv7l.whl
Algorithm Hash digest
SHA256 019d2b72deb41092f5c6fd06b36fc3465b44c62f5772eceae65091ad550d0297
MD5 fc86cbb08c73d89ea4b2057b73a06bf3
BLAKE2b-256 be49619b0984494fe1bd43c2aa6992b98a88cd1684b2f3e5edce736178a40b7b

See more details on using hashes here.

Provenance

The following attestation bundles were made for rs_avl-0.1.0-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.0-cp310-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for rs_avl-0.1.0-cp310-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 ae9a58753211e68be203179584ba86a2477b4bd9f03ff2689546d471caa24c15
MD5 d67714d5cdc336000ddc4be99befd912
BLAKE2b-256 77389772c353bd73ca9f64178e1e3b15f35056c519da2df1fc17251f4cace506

See more details on using hashes here.

Provenance

The following attestation bundles were made for rs_avl-0.1.0-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.0-cp310-abi3-manylinux_2_5_i686.manylinux1_i686.whl.

File metadata

File hashes

Hashes for rs_avl-0.1.0-cp310-abi3-manylinux_2_5_i686.manylinux1_i686.whl
Algorithm Hash digest
SHA256 889280611da338039633081e8b21d0fd03cf3b1a16ea1bda162fc7ef6e51700a
MD5 d9912ba04c11fa894c9bf0e0763142c4
BLAKE2b-256 63912997b681435e6649e89a1e40ac24f27a4c6f07073c5c34992d3c3e1c8567

See more details on using hashes here.

Provenance

The following attestation bundles were made for rs_avl-0.1.0-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.0-cp310-abi3-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for rs_avl-0.1.0-cp310-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 b8ecd25872fca869f1192f9086dadcbe305ed01d30896f05b5ca4f2a913ef29d
MD5 56e3a20376a4ee86988bceead4f585ec
BLAKE2b-256 7a73b2461ef8d934bc7df2b5d37a38a6a6a5c9ae45f1457e33b4a42ae075854a

See more details on using hashes here.

Provenance

The following attestation bundles were made for rs_avl-0.1.0-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.0-cp310-abi3-macosx_10_12_x86_64.whl.

File metadata

File hashes

Hashes for rs_avl-0.1.0-cp310-abi3-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 a312fe6f8fdb7018f4915702e0650d481d5f54599306427f1a3a84310e95fcf5
MD5 04f8dea71303934150fc6b61464db9db
BLAKE2b-256 4ed8027e40ed39de2de62ea2310b55eea273f82975bc6f1c1c6e4fec878347c8

See more details on using hashes here.

Provenance

The following attestation bundles were made for rs_avl-0.1.0-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