Skip to main content

Python bindings to Rust's persistent data structures (rpds)

Project description

PyPI version Supported Python versions Build status

Python bindings to the Rust rpds crate for persistent data structures.

What’s here is quite minimal (in transparency, it was written initially to support replacing pyrsistent in the referencing library). If you see something missing (which is very likely), a PR is definitely welcome to add it.

Installation

The distribution on PyPI is named rpds.py (equivalently rpds-py), and thus can be installed via e.g.:

$ pip install rpds-py

Note that if you install rpds-py from source, you will need a Rust toolchain installed, as it is a build-time dependency. An example of how to do so in a Dockerfile can be found here.

If you believe you are on a common platform which should have wheels built (i.e. and not need to compile from source), feel free to file an issue or pull request modifying the GitHub action used here to build wheels via maturin.

Usage

Methods in general are named similarly to their rpds counterparts (rather than pyrsistent‘s conventions, though probably a full drop-in pyrsistent-compatible wrapper module is a good addition at some point).

>>> from rpds import HashTrieMap, HashTrieSet, List

>>> m = HashTrieMap({"foo": "bar", "baz": "quux"})
>>> m.insert("spam", 37) == HashTrieMap({"foo": "bar", "baz": "quux", "spam": 37})
True
>>> m.remove("foo") == HashTrieMap({"baz": "quux"})
True

>>> s = HashTrieSet({"foo", "bar", "baz", "quux"})
>>> s.insert("spam") == HashTrieSet({"foo", "bar", "baz", "quux", "spam"})
True
>>> s.remove("foo") == HashTrieSet({"bar", "baz", "quux"})
True

>>> L = List([1, 3, 5])
>>> L.push_front(-1) == List([-1, 1, 3, 5])
True
>>> L.rest == List([3, 5])
True

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

rpds_py-0.21.0.tar.gz (26.3 kB view hashes)

Uploaded Source

Built Distributions

rpds_py-0.21.0-pp310-pypy310_pp73-win_amd64.whl (219.6 kB view hashes)

Uploaded PyPy Windows x86-64

rpds_py-0.21.0-pp310-pypy310_pp73-musllinux_1_2_x86_64.whl (529.0 kB view hashes)

Uploaded PyPy musllinux: musl 1.2+ x86-64

rpds_py-0.21.0-pp310-pypy310_pp73-musllinux_1_2_i686.whl (550.6 kB view hashes)

Uploaded PyPy musllinux: musl 1.2+ i686

rpds_py-0.21.0-pp310-pypy310_pp73-musllinux_1_2_aarch64.whl (546.9 kB view hashes)

Uploaded PyPy musllinux: musl 1.2+ ARM64

rpds_py-0.21.0-pp310-pypy310_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (361.7 kB view hashes)

Uploaded PyPy manylinux: glibc 2.17+ x86-64

rpds_py-0.21.0-pp310-pypy310_pp73-manylinux_2_17_s390x.manylinux2014_s390x.whl (430.2 kB view hashes)

Uploaded PyPy manylinux: glibc 2.17+ s390x

rpds_py-0.21.0-pp310-pypy310_pp73-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl (404.6 kB view hashes)

Uploaded PyPy manylinux: glibc 2.17+ ppc64le

rpds_py-0.21.0-pp310-pypy310_pp73-manylinux_2_17_armv7l.manylinux2014_armv7l.whl (370.4 kB view hashes)

Uploaded PyPy manylinux: glibc 2.17+ ARMv7l

rpds_py-0.21.0-pp310-pypy310_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (362.1 kB view hashes)

Uploaded PyPy manylinux: glibc 2.17+ ARM64

rpds_py-0.21.0-pp310-pypy310_pp73-manylinux_2_5_i686.manylinux1_i686.whl (384.0 kB view hashes)

Uploaded PyPy manylinux: glibc 2.5+ i686

rpds_py-0.21.0-pp310-pypy310_pp73-macosx_11_0_arm64.whl (319.2 kB view hashes)

Uploaded PyPy macOS 11.0+ ARM64

rpds_py-0.21.0-pp310-pypy310_pp73-macosx_10_12_x86_64.whl (328.3 kB view hashes)

Uploaded PyPy macOS 10.12+ x86-64

rpds_py-0.21.0-pp39-pypy39_pp73-win_amd64.whl (219.9 kB view hashes)

Uploaded PyPy Windows x86-64

rpds_py-0.21.0-pp39-pypy39_pp73-musllinux_1_2_x86_64.whl (528.5 kB view hashes)

Uploaded PyPy musllinux: musl 1.2+ x86-64

rpds_py-0.21.0-pp39-pypy39_pp73-musllinux_1_2_i686.whl (550.8 kB view hashes)

Uploaded PyPy musllinux: musl 1.2+ i686

rpds_py-0.21.0-pp39-pypy39_pp73-musllinux_1_2_aarch64.whl (546.7 kB view hashes)

Uploaded PyPy musllinux: musl 1.2+ ARM64

rpds_py-0.21.0-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (361.3 kB view hashes)

Uploaded PyPy manylinux: glibc 2.17+ x86-64

rpds_py-0.21.0-pp39-pypy39_pp73-manylinux_2_17_s390x.manylinux2014_s390x.whl (429.9 kB view hashes)

Uploaded PyPy manylinux: glibc 2.17+ s390x

rpds_py-0.21.0-pp39-pypy39_pp73-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl (404.1 kB view hashes)

Uploaded PyPy manylinux: glibc 2.17+ ppc64le

rpds_py-0.21.0-pp39-pypy39_pp73-manylinux_2_17_armv7l.manylinux2014_armv7l.whl (370.4 kB view hashes)

Uploaded PyPy manylinux: glibc 2.17+ ARMv7l

rpds_py-0.21.0-pp39-pypy39_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (362.4 kB view hashes)

Uploaded PyPy manylinux: glibc 2.17+ ARM64

rpds_py-0.21.0-pp39-pypy39_pp73-manylinux_2_5_i686.manylinux1_i686.whl (383.9 kB view hashes)

Uploaded PyPy manylinux: glibc 2.5+ i686

rpds_py-0.21.0-pp39-pypy39_pp73-macosx_11_0_arm64.whl (319.1 kB view hashes)

Uploaded PyPy macOS 11.0+ ARM64

rpds_py-0.21.0-pp39-pypy39_pp73-macosx_10_12_x86_64.whl (328.0 kB view hashes)

Uploaded PyPy macOS 10.12+ x86-64

rpds_py-0.21.0-cp313-none-win_amd64.whl (220.4 kB view hashes)

Uploaded CPython 3.13 Windows x86-64

rpds_py-0.21.0-cp313-none-win32.whl (202.6 kB view hashes)

Uploaded CPython 3.13 Windows x86

rpds_py-0.21.0-cp313-cp313-musllinux_1_2_x86_64.whl (530.5 kB view hashes)

Uploaded CPython 3.13 musllinux: musl 1.2+ x86-64

rpds_py-0.21.0-cp313-cp313-musllinux_1_2_i686.whl (554.2 kB view hashes)

Uploaded CPython 3.13 musllinux: musl 1.2+ i686

rpds_py-0.21.0-cp313-cp313-musllinux_1_2_aarch64.whl (548.9 kB view hashes)

Uploaded CPython 3.13 musllinux: musl 1.2+ ARM64

rpds_py-0.21.0-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (363.7 kB view hashes)

Uploaded CPython 3.13 manylinux: glibc 2.17+ x86-64

rpds_py-0.21.0-cp313-cp313-manylinux_2_17_s390x.manylinux2014_s390x.whl (422.3 kB view hashes)

Uploaded CPython 3.13 manylinux: glibc 2.17+ s390x

rpds_py-0.21.0-cp313-cp313-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl (405.3 kB view hashes)

Uploaded CPython 3.13 manylinux: glibc 2.17+ ppc64le

rpds_py-0.21.0-cp313-cp313-manylinux_2_17_armv7l.manylinux2014_armv7l.whl (372.3 kB view hashes)

Uploaded CPython 3.13 manylinux: glibc 2.17+ ARMv7l

rpds_py-0.21.0-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (363.6 kB view hashes)

Uploaded CPython 3.13 manylinux: glibc 2.17+ ARM64

rpds_py-0.21.0-cp313-cp313-manylinux_2_5_i686.manylinux1_i686.whl (386.6 kB view hashes)

Uploaded CPython 3.13 manylinux: glibc 2.5+ i686

rpds_py-0.21.0-cp313-cp313-macosx_11_0_arm64.whl (320.2 kB view hashes)

Uploaded CPython 3.13 macOS 11.0+ ARM64

rpds_py-0.21.0-cp313-cp313-macosx_10_12_x86_64.whl (329.2 kB view hashes)

Uploaded CPython 3.13 macOS 10.12+ x86-64

rpds_py-0.21.0-cp312-none-win_amd64.whl (220.7 kB view hashes)

Uploaded CPython 3.12 Windows x86-64

rpds_py-0.21.0-cp312-none-win32.whl (203.1 kB view hashes)

Uploaded CPython 3.12 Windows x86

rpds_py-0.21.0-cp312-cp312-musllinux_1_2_x86_64.whl (530.9 kB view hashes)

Uploaded CPython 3.12 musllinux: musl 1.2+ x86-64

rpds_py-0.21.0-cp312-cp312-musllinux_1_2_i686.whl (554.8 kB view hashes)

Uploaded CPython 3.12 musllinux: musl 1.2+ i686

rpds_py-0.21.0-cp312-cp312-musllinux_1_2_aarch64.whl (549.4 kB view hashes)

Uploaded CPython 3.12 musllinux: musl 1.2+ ARM64

rpds_py-0.21.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (364.2 kB view hashes)

Uploaded CPython 3.12 manylinux: glibc 2.17+ x86-64

rpds_py-0.21.0-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl (422.9 kB view hashes)

Uploaded CPython 3.12 manylinux: glibc 2.17+ s390x

rpds_py-0.21.0-cp312-cp312-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl (405.9 kB view hashes)

Uploaded CPython 3.12 manylinux: glibc 2.17+ ppc64le

rpds_py-0.21.0-cp312-cp312-manylinux_2_17_armv7l.manylinux2014_armv7l.whl (373.1 kB view hashes)

Uploaded CPython 3.12 manylinux: glibc 2.17+ ARMv7l

rpds_py-0.21.0-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (364.0 kB view hashes)

Uploaded CPython 3.12 manylinux: glibc 2.17+ ARM64

rpds_py-0.21.0-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.whl (386.4 kB view hashes)

Uploaded CPython 3.12 manylinux: glibc 2.5+ i686

rpds_py-0.21.0-cp312-cp312-macosx_11_0_arm64.whl (321.2 kB view hashes)

Uploaded CPython 3.12 macOS 11.0+ ARM64

rpds_py-0.21.0-cp312-cp312-macosx_10_12_x86_64.whl (329.5 kB view hashes)

Uploaded CPython 3.12 macOS 10.12+ x86-64

rpds_py-0.21.0-cp311-none-win_amd64.whl (218.5 kB view hashes)

Uploaded CPython 3.11 Windows x86-64

rpds_py-0.21.0-cp311-none-win32.whl (201.0 kB view hashes)

Uploaded CPython 3.11 Windows x86

rpds_py-0.21.0-cp311-cp311-musllinux_1_2_x86_64.whl (527.9 kB view hashes)

Uploaded CPython 3.11 musllinux: musl 1.2+ x86-64

rpds_py-0.21.0-cp311-cp311-musllinux_1_2_i686.whl (549.3 kB view hashes)

Uploaded CPython 3.11 musllinux: musl 1.2+ i686

rpds_py-0.21.0-cp311-cp311-musllinux_1_2_aarch64.whl (546.6 kB view hashes)

Uploaded CPython 3.11 musllinux: musl 1.2+ ARM64

rpds_py-0.21.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (360.4 kB view hashes)

Uploaded CPython 3.11 manylinux: glibc 2.17+ x86-64

rpds_py-0.21.0-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl (429.9 kB view hashes)

Uploaded CPython 3.11 manylinux: glibc 2.17+ s390x

rpds_py-0.21.0-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl (403.5 kB view hashes)

Uploaded CPython 3.11 manylinux: glibc 2.17+ ppc64le

rpds_py-0.21.0-cp311-cp311-manylinux_2_17_armv7l.manylinux2014_armv7l.whl (369.5 kB view hashes)

Uploaded CPython 3.11 manylinux: glibc 2.17+ ARMv7l

rpds_py-0.21.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (361.2 kB view hashes)

Uploaded CPython 3.11 manylinux: glibc 2.17+ ARM64

rpds_py-0.21.0-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.whl (382.4 kB view hashes)

Uploaded CPython 3.11 manylinux: glibc 2.5+ i686

rpds_py-0.21.0-cp311-cp311-macosx_11_0_arm64.whl (318.2 kB view hashes)

Uploaded CPython 3.11 macOS 11.0+ ARM64

rpds_py-0.21.0-cp311-cp311-macosx_10_12_x86_64.whl (327.3 kB view hashes)

Uploaded CPython 3.11 macOS 10.12+ x86-64

rpds_py-0.21.0-cp310-none-win_amd64.whl (218.5 kB view hashes)

Uploaded CPython 3.10 Windows x86-64

rpds_py-0.21.0-cp310-none-win32.whl (201.0 kB view hashes)

Uploaded CPython 3.10 Windows x86

rpds_py-0.21.0-cp310-cp310-musllinux_1_2_x86_64.whl (528.0 kB view hashes)

Uploaded CPython 3.10 musllinux: musl 1.2+ x86-64

rpds_py-0.21.0-cp310-cp310-musllinux_1_2_i686.whl (549.5 kB view hashes)

Uploaded CPython 3.10 musllinux: musl 1.2+ i686

rpds_py-0.21.0-cp310-cp310-musllinux_1_2_aarch64.whl (546.5 kB view hashes)

Uploaded CPython 3.10 musllinux: musl 1.2+ ARM64

rpds_py-0.21.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (360.8 kB view hashes)

Uploaded CPython 3.10 manylinux: glibc 2.17+ x86-64

rpds_py-0.21.0-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl (430.6 kB view hashes)

Uploaded CPython 3.10 manylinux: glibc 2.17+ s390x

rpds_py-0.21.0-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl (403.6 kB view hashes)

Uploaded CPython 3.10 manylinux: glibc 2.17+ ppc64le

rpds_py-0.21.0-cp310-cp310-manylinux_2_17_armv7l.manylinux2014_armv7l.whl (369.5 kB view hashes)

Uploaded CPython 3.10 manylinux: glibc 2.17+ ARMv7l

rpds_py-0.21.0-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (361.4 kB view hashes)

Uploaded CPython 3.10 manylinux: glibc 2.17+ ARM64

rpds_py-0.21.0-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.whl (382.7 kB view hashes)

Uploaded CPython 3.10 manylinux: glibc 2.5+ i686

rpds_py-0.21.0-cp310-cp310-macosx_11_0_arm64.whl (318.4 kB view hashes)

Uploaded CPython 3.10 macOS 11.0+ ARM64

rpds_py-0.21.0-cp310-cp310-macosx_10_12_x86_64.whl (327.5 kB view hashes)

Uploaded CPython 3.10 macOS 10.12+ x86-64

rpds_py-0.21.0-cp39-none-win_amd64.whl (218.9 kB view hashes)

Uploaded CPython 3.9 Windows x86-64

rpds_py-0.21.0-cp39-none-win32.whl (200.5 kB view hashes)

Uploaded CPython 3.9 Windows x86

rpds_py-0.21.0-cp39-cp39-musllinux_1_2_x86_64.whl (528.6 kB view hashes)

Uploaded CPython 3.9 musllinux: musl 1.2+ x86-64

rpds_py-0.21.0-cp39-cp39-musllinux_1_2_i686.whl (550.2 kB view hashes)

Uploaded CPython 3.9 musllinux: musl 1.2+ i686

rpds_py-0.21.0-cp39-cp39-musllinux_1_2_aarch64.whl (547.2 kB view hashes)

Uploaded CPython 3.9 musllinux: musl 1.2+ ARM64

rpds_py-0.21.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (361.5 kB view hashes)

Uploaded CPython 3.9 manylinux: glibc 2.17+ x86-64

rpds_py-0.21.0-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl (431.3 kB view hashes)

Uploaded CPython 3.9 manylinux: glibc 2.17+ s390x

rpds_py-0.21.0-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl (404.7 kB view hashes)

Uploaded CPython 3.9 manylinux: glibc 2.17+ ppc64le

rpds_py-0.21.0-cp39-cp39-manylinux_2_17_armv7l.manylinux2014_armv7l.whl (370.2 kB view hashes)

Uploaded CPython 3.9 manylinux: glibc 2.17+ ARMv7l

rpds_py-0.21.0-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (361.9 kB view hashes)

Uploaded CPython 3.9 manylinux: glibc 2.17+ ARM64

rpds_py-0.21.0-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.whl (383.1 kB view hashes)

Uploaded CPython 3.9 manylinux: glibc 2.5+ i686

rpds_py-0.21.0-cp39-cp39-macosx_11_0_arm64.whl (318.7 kB view hashes)

Uploaded CPython 3.9 macOS 11.0+ ARM64

rpds_py-0.21.0-cp39-cp39-macosx_10_12_x86_64.whl (327.8 kB view hashes)

Uploaded CPython 3.9 macOS 10.12+ x86-64

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