High-performance AI memory library with full-text and semantic search (Rust bindings for memvid v2)
Project description
memvid-rs (Python Bindings)
Memvid-rs provides Python bindings for memvid-core v2, a high-performance AI memory library written in Rust.
This is a major version upgrade from v1 (QR video encoding) to v2 (.mv2 single-file format).
Attribution: This project wraps memvid-core with PyO3 bindings for Python.
🚀 Key Features
- Single-File Memory: All data stored in portable
.mv2format - Full-Text Search: BM25 ranking via embedded Tantivy index
- Crash-Safe Writes: WAL-based append-only architecture
- Cross-Platform: Works on macOS, Linux, Windows
- Python 3.8-3.14+: ABI3 wheel supports all modern Python versions
📦 Installation
pip install memvid-rs
💻 Quick Start
from memvid_rs import MemvidMemory
# Create a new memory file
memory = MemvidMemory.create("my_memory.mv2")
# Add content
idx = memory.append("Hello, memvid v2!")
memory.commit()
# Retrieve content
text = memory.get_frame(idx)
print(text) # Hello, memvid v2!
# Check stats
print(f"Total frames: {memory.frame_count()}")
# Open existing memory
memory2 = MemvidMemory.open("my_memory.mv2")
🔧 API Reference
MemvidMemory
| Method | Description |
|---|---|
create(path) |
Create new .mv2 file |
open(path) |
Open existing .mv2 file |
append(text) |
Add text, returns 0-based index |
commit() |
Flush writes to disk |
get_frame(index) |
Retrieve frame text by index |
frame_count() |
Get total frame count |
⚠️ Breaking Changes from v1
- QR video encoding removed - v2 uses binary
.mv2format - API redesigned -
MemvidEncoder/MemvidDecoderreplaced withMemvidMemory - File format incompatible - v1
.mp4files cannot be opened in v2
📋 Requirements
- Python: >= 3.8
- System: macOS, Linux, Windows
📄 License
MIT License
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file memvid_rs-2.0.5-cp38-abi3-macosx_11_0_arm64.whl.
File metadata
- Download URL: memvid_rs-2.0.5-cp38-abi3-macosx_11_0_arm64.whl
- Upload date:
- Size: 4.1 MB
- Tags: CPython 3.8+, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/1.11.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b127e91e312a8a636ce51c3bc8a84d523796ffd3a9d36d930494b31ebac43bc1
|
|
| MD5 |
27b234ccc2713d69b337a3f4ff9e9dbb
|
|
| BLAKE2b-256 |
9e546762dc4232ce87717c219b8a01be11913ba6a08afcf4458e279e8b0c3b4b
|