Added
- Local and remote
keys_prefix(prefix: str) queries, with efficient ascending and descending LMDB scans.
- Literal, case-sensitive UTF-8 prefix matching. Empty prefixes select all keys; prefixes exceeding the environment key-byte limit select none.
- Immutable prefix selectors replace prior key/range selection while preserving direction and transforms.
Example
# Local
records = list(tx.shelf("data").keys_prefix("user:").items())
# Remote
records = await tx.shelf("data").keys_prefix("user:").items().query()
Upgrade notes
- Upgrade both client and server to 3.2.0 or newer for remote prefix queries. Older servers reject the new operation.
- Stored key encoding and existing APIs are unchanged. No database migration is required.
- Stored
None values are supported by prefix queries, filters and mutations.
pip install --upgrade shelfdb==3.2.0
Verification
- 182 tests passed on each of Python 3.12 and 3.14.
- Full release gate and main/tag GitHub CI passed.
- Published wheel/source hashes verified; clean PyPI installation passed local, TCP and Unix-socket prefix smoke tests, including ordering, validation, mutations and rollback.
PyPI · Documentation