Metadata-Version: 2.4
Name: aresadb
Version: 0.1.3
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Rust
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 :: Database
Classifier: Topic :: Database :: Database Engines/Servers
Summary: High-performance multi-model database — KV, Graph, Relational, Vector
Keywords: database,graph,sql,vector-search,embedded
Author-email: Yevheniy Chuba <yevheniyc@gmail.com>
License: MIT
Requires-Python: >=3.9
Description-Content-Type: text/markdown; charset=UTF-8; variant=GFM
Project-URL: Homepage, https://github.com/yoreai/aresadb
Project-URL: Issues, https://github.com/yoreai/aresadb/issues
Project-URL: Repository, https://github.com/yoreai/aresadb

# aresadb

Python bindings for [AresaDB](https://github.com/yoreai/aresadb) — a high-performance multi-model database engine in Rust.

## Install

```bash
pip install aresadb
# or
uv add aresadb
```

## Quick Start

```python
from aresadb_python import Database

# Create a database
db = Database.create("./mydata", "demo")

# Insert data
user = db.insert("user", '{"name": "Alice", "age": 30}')
print(user.id, user.properties)

# Or use a dict directly
user2 = db.insert_dict("user", {"name": "Bob", "age": 25})

# Query with SQL
result = db.query("SELECT * FROM user WHERE age > 20")
for row in result.rows:
    print(dict(zip(result.columns, row)))

# Get by type
users = db.get_by_type("user")

# Get by ID
node = db.get(user.id)

# Delete
db.delete(user.id)

# Database status
status = db.status()
print(f"Nodes: {status.node_count}, Edges: {status.edge_count}")
```

## Vector Search

```python
# Insert with embedding
doc = db.insert_with_embedding(
    "document",
    '{"title": "ML Intro", "content": "Machine learning is..."}',
    "embedding",
    [0.9, 0.1, 0.0, 0.0]
)

# Similarity search
results = db.similarity_search(
    query_vector=[1.0, 0.0, 0.0, 0.0],
    node_type="document",
    field="embedding",
    k=10,
    metric="cosine"  # cosine, euclidean, dot, manhattan
)
for r in results:
    print(f"Node: {r.node_id}, Score: {r.score:.4f}")
```

## Graph Edges

```python
user = db.insert("user", '{"name": "Alice"}')
order = db.insert("order", '{"amount": 99.99}')

edge_id = db.create_edge(user.id, order.id, "placed")
```

## License

MIT

