Registry / data / rpds-py

rpds-py

JSON →
library2026.6.3pypypi✓ verified 27d ago

rpds-py provides Python bindings to Rust's persistent data structures (rpds), offering immutable collections with efficient structural sharing. The current version is 0.30.0, released on March 28, 2026. The library has a regular release cadence, with multiple updates per year.

pip install rpds-py
INSTALL
IMPORT
SIG · RPDS-PY
R
rpds-py
datapythonv2026.6.3
Install
2.1s avg
Import
Disk
17MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v0.30.0 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.103.95 runs
installs and imports cleanly · install 0.0s · import 0.000s · 19.2MB
glibc
py 3.103.95 runs
installs and imports cleanly · install 2.1s · import 0.000s · 19MB
17MB installed
● package 17MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

HashTrieMap
from rpds import HashTrieMap
from rpds import HashMap
HashMap is not available; use HashTrieMap instead.
HashTrieSet
from rpds import HashTrieSet
from rpds import HashSet
HashSet is not available; use HashTrieSet instead.

Demonstrates creating a HashTrieMap, inserting a key-value pair, and retrieving a value.

from rpds import HashTrieMap # Create an empty HashTrieMap map = HashTrieMap() # Insert a key-value pair map = map.set('key', 'value') # Retrieve a value value = map.get('key') print(value) # Output: 'value'
Debug
Known issues
breakingrpds-py requires Python 3.10 or higher.
fix
Ensure your Python environment is version 3.10 or higher.
affects: 0.30.0 and later
gotcharpds-py collections are immutable; modifying them returns a new instance.
fix
Assign the result of any modification to a new variable or overwrite the existing one.
affects: All versions
breaking`rpds.HashTrieMap` uses `.insert(key, value)` to add or update elements, not `.set(key, value)`. Attempting to use a non-existent method like `set()` will result in an AttributeError.
fix
Replace `.set(key, value)` with `.insert(key, value)`. Remember that `rpds` collections are immutable, so you must assign the result of `insert()` back to a variable (e.g., `map = map.insert('key', 'value')`).
affects: All versions
Errors
Common errors & fixes
ModuleNotFoundError: No module named 'rpds'
The `rpds-py` package has not been installed in the current Python environment.
fix
pip install rpds-py
ModuleNotFoundError: No module named 'rpds_py'
The `rpds-py` package exposes its functionality through the `rpds` module, not `rpds_py`.
fix
import rpds
AttributeError: 'List' object has no attribute 'sort'
`rpds.List` objects are immutable and do not have an in-place `sort()` method; instead, they provide a `sorted()` method that returns a new sorted list.
fix
new_list = my_list.sorted()
TypeError: 'PMap' object does not support item assignment
`rpds.PMap` is an immutable collection and does not support direct item assignment like mutable Python dictionaries; instead, use methods like `insert()` or `set()` which return a new PMap.
fix
new_pmap = my_pmap.insert('key', 'value')
Upgrade
Version history
2026.6.3latest on PyPI · released Jun 30, 2026
Audit
Dependencies
PyO3requiredRequired for Rust-Python interoperability
Agent activity
14 hits · last 30 days
node
10
OpenAI (training)
1
Resources