Metadata-Version: 2.4
Name: herodb-sdk
Version: 1.1.1
Summary: Official Python SDK for HeroDB - High-performance NoSQL database by Death Legion Team
Author: Death Legion Team
Keywords: herodb,nosql,database,death-legion
Description-Content-Type: text/markdown
Dynamic: author
Dynamic: description
Dynamic: description-content-type
Dynamic: keywords
Dynamic: summary

# 🐍 HeroDB Python SDK

[![PyPI version](https://img.shields.io/pypi/v/herodb-sdk.svg?style=flat-square)](https://pypi.org/project/herodb-sdk/)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg?style=flat-square)](https://opensource.org/licenses/MIT)

> **Official Python SDK for HeroDB — High-performance NoSQL for the modern web.**

HeroDB-SDK provides a robust and efficient way to interact with your HeroDB cluster directly from Python.

---

## 🚀 Quick Start

### Installation

```bash
pip install herodb-sdk
```

### Basic Usage

```python
from herodb import HeroDBClient

# Initialize and connect
client = HeroDBClient('127.0.0.1', 8080)
client.connect()

# Insert a document
client.insert({
    '_id': 'hero_1',
    'name': 'Death Legion Commander',
    'specialty': 'Massive Scale'
})

# Retrieve data
result = client.find('hero_1')
print(f\"Retrieved: {result['doc']}\")

client.close()
```

---

## 🛠 Key Features

- **High Performance**: Native TCP implementation for minimal latency.
- **Pythonic API**: Simple and intuitive methods for all CRUD operations.
- **Scalable**: Built-in support for sharded clusters via HeroDB Router.
- **JSON First**: Direct mapping between Python dictionaries and HeroDB documents.

---

## 📖 API Reference

- `HeroDBClient(host, port)`: Create a new client.
- `connect()`: Open the connection.
- `insert(doc)`: Save a dictionary as a document.
- `find(id=None)`: Search by ID or list all.
- `delete(id)`: Remove a document by ID.
- `close()`: Clean up the connection.

---

Developed with 💀 by the **Death Legion Team**.
