Metadata-Version: 2.4
Name: ankhdb
Version: 1.0.1
Summary: The official Python SDK for AnkhDB - Real-time Multi-tenant BaaS.
Author-email: KemetSoft <yusufsameh347@gmail.com>
Project-URL: Homepage, https://github.com/ankhdb/ankhdb-python
Project-URL: Bug Tracker, https://github.com/ankhdb/ankhdb-python/issues
Classifier: Programming Language :: Python :: 3
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Requires-Python: >=3.7
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: requests>=2.28.0
Dynamic: license-file

# ankhdb

The official Python SDK for AnkhDB - A real-time, multi-tenant Backend-as-a-Service.

## Installation

```bash
pip install ankhdb
```

## Usage

### Initialize the Client

You'll need your **Project API Key** from the AnkhDB Dashboard.

```python
from ankhdb import AnkhDB

db = AnkhDB(api_key="YOUR_API_KEY", base_url="http://localhost:5000")
```

### Authentication

Manage your app's end-users seamlessly.

```python
# Register
response = db.register("user@example.com", "securepassword")

# Login
db.login("user@example.com", "securepassword")

# Logout
db.logout()
```

### Database Operations

AnkhDB uses a flexible NoSQL-on-SQL structure.

```python
# Insert a document into 'posts' collection
new_post = db.from_collection("posts").insert({
    "title": "Hello from Python",
    "content": "AnkhDB is great!"
})

# Fetch all posts
posts = db.from_collection("posts").select()

# Get by ID
my_post = db.from_collection("posts").get("doc-id")
```

## License

MIT
