Metadata-Version: 2.4
Name: oxiddb
Version: 0.8.2
Classifier: Development Status :: 4 - Beta
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: Programming Language :: Python :: Implementation :: CPython
Classifier: Operating System :: POSIX :: Linux
Classifier: Operating System :: MacOS
Classifier: Operating System :: Microsoft :: Windows
Classifier: Topic :: Database :: Database Engines/Servers
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
Classifier: Typing :: Typed
Summary: Python bindings for Oxid-DB: a neurosymbolic database combining ontology reasoning with vector search
Keywords: database,ontology,vector-search,vector-database,knowledge-graph,reasoning,owl,embeddings,neurosymbolic,semantic-search
Author-email: Vince Brand <mail@vincentbrand.com>
License-Expression: MIT
Requires-Python: >=3.9
Description-Content-Type: text/markdown; charset=UTF-8; variant=GFM
Project-URL: Documentation, https://github.com/vincentbrand/Oxid-DB/tree/main/docs
Project-URL: Homepage, https://github.com/vincentbrand/Oxid-DB
Project-URL: Issues, https://github.com/vincentbrand/Oxid-DB/issues
Project-URL: Repository, https://github.com/vincentbrand/Oxid-DB

# oxiddb

[![PyPI](https://img.shields.io/pypi/v/oxiddb.svg)](https://pypi.org/project/oxiddb/)

Python bindings for [Oxid-DB](https://github.com/vincentbrand/Oxid-DB): a neurosymbolic database combining ontology reasoning with vector search.

This is the **embedded** package: the database runs **in-process** inside your
Python program (no server, no network). If instead you want to talk to a running
Oxid-DB **server** over HTTP, use the separate remote client
[`oxiddb-client`](https://pypi.org/project/oxiddb-client/) — same project, two
delivery models. Install whichever matches how you deploy.

## Installation

```bash
pip install oxiddb
```

## Quick Start

```python
import oxiddb

# Create a database with 4-dimensional vectors
db = oxiddb.OxidDB(dim=4)

# Build ontology
db.add_subclass("Pilsner", "Beer")
db.add_subclass("Stout", "Beer")

# Insert individuals with vectors
db.insert("Heineken", "Pilsner", vector=[0.9, 0.1, 0.0, 0.0])
db.insert("Guinness", "Stout", vector=[0.1, 0.0, 0.8, 0.9])

# Run the OWL 2 EL reasoner
db.classify()

# Query using OxQL
results = db.query("FIND ?x WHERE ?x IS-A Beer NEAR ?x TO [0.9, 0.1, 0.0, 0.0] LIMIT 5")
for r in results:
    print(f"{r.iri}: {r.score:.4f}")

# Save to disk
db.save("my_database.oxd")
```

