rpds-py
Python bindings to Rust's persistent data structures (rpds)
This package has a good security score with no known vulnerabilities.
Community Reviews
Robust persistent data structures with minimal security surface area
Error handling is clean and Pythonic - exceptions don't leak internal state or implementation details. Type errors are caught early with clear messages. The library doesn't do any network I/O, file operations, or dynamic code execution, so there's minimal opportunity for injection vulnerabilities. Input validation is implicit through Rust's type safety, though you still need to validate your application-level data semantics.
The main operational consideration is the dependency on Rust-compiled native extensions. You're trusting the Rust ecosystem's build toolchain and the PyO3 binding layer, but both have solid security track records. Binary wheel distribution means most users never compile anything, reducing build-time supply chain complexity.
Best for: Applications requiring thread-safe immutable collections where predictable state management and memory safety are priorities.
Avoid if: You need pure-Python solutions for restricted environments or cannot accept native extension dependencies.
Fast persistent data structures, but minimal docs and steep learning curve
The learning curve is steeper than expected because error messages are often cryptic, especially when you pass the wrong types or try operations that don't make sense for persistent structures. There's minimal community support; Stack Overflow has almost no rpds-py questions, and while GitHub issues get responses, there's no active discussion community. Debugging issues often means reading Rust rpds documentation or experimenting blindly.
For straightforward immutability needs it works fine, but once you hit edge cases or need to understand performance trade-offs between HashTrieMap vs other structures, you're largely on your own. The package feels like a direct port without much Python-specific polish or educational resources.
Best for: Performance-critical applications requiring immutable data structures where you already understand persistent data structure concepts.
Avoid if: You need comprehensive documentation, community support, or are new to persistent/immutable data structures.
Fast persistent data structures with Rust performance, minimal ceremony
From an operations perspective, this library is low-maintenance. No connection pooling or resource management concerns—it's just data structures. Error handling is predictable with standard Python exceptions. The performance characteristics are consistent under load, which matters when you're using these in concurrent contexts or with heavy workloads. One gotcha: the C extension means deployment requires compiled binaries, but wheels are available for common platforms.
Configuration is minimal (there isn't much to configure), and breaking changes have been rare in recent versions. Memory usage scales well compared to deep-copying native structures. The lack of detailed observability hooks isn't an issue since these are just data structures, but profiling shows clear wins in scenarios with frequent "mutations" on large collections.
Best for: Applications needing efficient immutable collections for concurrent processing, undo/redo systems, or functional programming patterns with performance requirements.
Avoid if: You need simple immutable structures occasionally and can tolerate native Python's copy overhead, or have strict no-compiled-extension deployment constraints.
Sign in to write a review
Sign In