Metadata-Version: 2.4
Name: diskannpy-rust
Version: 0.49.1
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: Science/Research
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Rust
Classifier: Programming Language :: Python :: Implementation :: CPython
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
Requires-Dist: numpy>=1.26.0
Requires-Dist: scikit-learn>=1.4.0 ; extra == 'test'
Provides-Extra: test
Summary: Python bindings for DiskANN approximate nearest neighbor search library
Keywords: approximate-nearest-neighbor,vector-search,diskann,ann
Author: Microsoft Corporation
License: MIT
Requires-Python: >=3.9
Description-Content-Type: text/markdown; charset=UTF-8; variant=GFM
Project-URL: Documentation, https://github.com/microsoft/DiskANN
Project-URL: Homepage, https://github.com/microsoft/DiskANN
Project-URL: Issues, https://github.com/microsoft/DiskANN/issues
Project-URL: Repository, https://github.com/microsoft/DiskANN

# DiskAnnPy

Python bindings for DiskANN, providing efficient vector quantization and approximate nearest neighbor search.

## Installation

### Prerequisites

- Python 3.9+
- Rust toolchain (install via [rustup](https://rustup.rs/))
- [maturin](https://www.maturin.rs/) (`pip install maturin`)

### Building from Source

Navigate to `diskann/DiskAnnPy`:

#### Linux

```bash
# Create and activate virtual environment
python -m venv venv
source venv/bin/activate

# Install build dependencies
pip install maturin numpy

# Option 1: Build wheel (creates .whl in DiskANN/target/wheels)
maturin build -r

# Option 2: Build and install directly into active environment
maturin develop -r
```

#### Windows

```powershell
# Create and activate virtual environment
python -m venv venv
venv\Scripts\activate

# Install build dependencies
pip install maturin numpy

# Option 1: Build wheel (creates .whl in DiskANN\target\wheels)
maturin build -r

# Option 2: Build and install directly into active environment
maturin develop -r
```

### Running Tests

Once installed, run the Python tests from the `DiskAnnPy` directory:

```bash
python -m unittest discover tests
```

## Quantizers

See [src/quantization/README.md](src/quantization/README.md) for documentation on the vector quantization APIs.
