Metadata-Version: 2.4
Name: smartkdb
Version: 1.0.0
Summary: SmartKDB – AI-ready embedded database engine with smart indexing and configuration UI
Author-email: Karrar <alhdrawykrar@gmail.com>
License: MIT License
        
        Copyright (c) 2025 Karrar Team
        
        Permission is hereby granted, free of charge, to any person obtaining a copy
        of this software and associated documentation files (the "Software"), to deal
        in the Software without restriction, including without limitation the rights
        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
        copies of the Software, and to permit persons to whom the Software is
        furnished to do so, subject to the following conditions:
        
        The above copyright notice and this permission notice shall be included in all
        copies or substantial portions of the Software.
        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
        SOFTWARE.
        
Project-URL: Homepage, https://github.com/karrar/smartkdb
Project-URL: Bug Tracker, https://github.com/karrar/smartkdb/issues
Keywords: embedded-database,ai-ready,smart-index,local-db,realtime-db
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Topic :: Database
Classifier: Topic :: Database :: Database Engines/Servers
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Requires-Python: >=3.9
Description-Content-Type: text/markdown
License-File: LICENSE
Dynamic: license-file

# SmartKDB

**SmartKDB** is a production-ready, AI-enhanced embedded database engine for Python. It combines the structured data model of SQL with the flexibility of NoSQL, adding a lightweight AI layer for semantic querying and automatic indexing.

## Features

- **Hybrid Data Model**: Structured tables + JSON documents.
- **AI-Powered**: 
  - **Semantic Querying**: `db.semantic_query("users", "users older than 25")`
  - **Auto-Indexing**: Automatically detects hot fields and creates indexes.
- **Built-in Management**:
  - **HTML Dashboard**: Manage your DB visually via `kdb_config.html`.
  - **CLI**: `smartkdb init`, `smartkdb status`, `smartkdb shell`.
- **Secure**: Role-Based Access Control (RBAC) with hashed passwords.
- **Zero Dependencies**: Pure Python, runs anywhere.

## Installation

```bash
pip install smartkdb
```

## Quick Start

### 1. CLI Usage
Initialize a new database:
```bash
smartkdb init mydb.kdb
```
Check status:
```bash
smartkdb status mydb.kdb
```

### 2. Python Usage
```python
from kdb import SmartKDB

# Initialize
db = SmartKDB("mydb.kdb")

# Login (Default admin/admin created by CLI init)
db.login("admin", "admin")

# Create Table
users = db.create_table("users", indexes=["age"])

# Insert
users.insert({"name": "Alice", "age": 30, "role": "engineer"})

# Semantic Query
results = db.semantic_query("users", "engineers older than 20")
print(results)
```

## Configuration Dashboard
SmartKDB includes a visual configuration tool.
1. Locate `kdb_config.html` in your package installation or download it from the repo.
2. Open it in your browser.
3. Point it to your database configuration files (export/import supported).

## License
MIT License
