Skip to main content

High-performance AI memory library with full-text and semantic search (Rust bindings for memvid v2)

Project description

memvid-rs (Python Bindings)

🇰🇷 한국어 (Korean) PyPI version

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 .mv2 format
  • 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 .mv2 format
  • API redesigned - MemvidEncoder/MemvidDecoder replaced with MemvidMemory
  • File format incompatible - v1 .mp4 files cannot be opened in v2

📋 Requirements

  • Python: >= 3.8
  • System: macOS, Linux, Windows

📄 License

MIT License

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

memvid_rs-2.0.0.tar.gz (257.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

memvid_rs-2.0.0-cp38-abi3-macosx_11_0_arm64.whl (3.6 MB view details)

Uploaded CPython 3.8+macOS 11.0+ ARM64

File details

Details for the file memvid_rs-2.0.0.tar.gz.

File metadata

  • Download URL: memvid_rs-2.0.0.tar.gz
  • Upload date:
  • Size: 257.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: maturin/1.10.2

File hashes

Hashes for memvid_rs-2.0.0.tar.gz
Algorithm Hash digest
SHA256 67f1d1cffc1406a0cd7b0d901c4782ce88feb28229dfe6c3fefcc33b80dff412
MD5 088db25af620f47ec3b2e1c562f92e34
BLAKE2b-256 722c6ae13b0bb02f034070195da3d1ef8b43729c6ec99ee5fe00af16c78cd937

See more details on using hashes here.

File details

Details for the file memvid_rs-2.0.0-cp38-abi3-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for memvid_rs-2.0.0-cp38-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 83ae708b0ad670b3ddd5e2d8e4a5eb6663abe7ea7b80edd2c61d34de01f9afb7
MD5 843c708c7e62229595b5cbbf37fe2d32
BLAKE2b-256 89457c63c414e88cc989d4c87d83e9b8ac1287b465378776b6394fdc83ac0173

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page