rpds_py: Python bindings to Rust’s persistent data structures - Packages and Features

Skip to content
Back to top
View this page
Edit this page

# rpds_py: Python bindings to Rust’s persistent data structures

## Description

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

rpds-py provides efficient, immutable data structures including:

- `HashTrieMap` - Persistent hash map

- `HashTrieSet` - Persistent hash set

- `List` - Persistent list with efficient operations

These data structures are backed by Rust implementations for high performance while maintaining a Pythonic API. They are particularly useful for functional programming patterns and situations requiring immutable, persistent collections.

The library is used by projects like the referencing library (part of the Python JSON Schema ecosystem) as a faster alternative to pyrsistent.

## License

MIT License

## Upstream Contact

- Author: Julian Berman <Julian+rpds@GrayVines.com>

- Home page: https://github.com/crate-py/rpds

- PyPI: https://pypi.org/project/rpds-py/

- Documentation: https://rpds.readthedocs.io/

- Upstream Rust crate: https://github.com/orium/rpds

## Dependencies

Python (>= 3.12)

Build dependencies: pip, packaging

## Special Notes

This package provides platform-specific binary wheels for multiple Python versions and platforms:

- Python 3.12, 3.13, 3.14 (including free-threaded 3.14t)

- Linux (x86_64, aarch64, armv7l, ppc64le, s390x, i686, musllinux variants)

- macOS (x86_64, arm64)

- Windows (win32, win_amd64, win_arm64)

The Sage build system automatically selects and downloads the appropriate wheel for your platform and Python version using the packaging library’s compatibility tags. If no compatible binary wheel is available for your platform, the building system will raise an error indicating that no matching wheels were found.

## Type

standard

## Dependencies

- $(PYTHON)

- $(PYTHON_TOOLCHAIN)

- packaging: Core utilities for Python packages

- pip: Tool for installing and managing Python packages

## Version Information

package-version.txt:

    0.30.0

## Equivalent System Packages

(none known)

However, these system packages will not be used for building Sage because `spkg-configure.m4` has not been written for this package; see Issue #27330 for more information.