icebergdb 0.1.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- icebergdb-0.1.0/PKG-INFO +111 -0
- icebergdb-0.1.0/README.md +85 -0
- icebergdb-0.1.0/iceberg/__init__.py +20 -0
- icebergdb-0.1.0/iceberg/client.py +166 -0
- icebergdb-0.1.0/icebergdb.egg-info/PKG-INFO +111 -0
- icebergdb-0.1.0/icebergdb.egg-info/SOURCES.txt +10 -0
- icebergdb-0.1.0/icebergdb.egg-info/dependency_links.txt +1 -0
- icebergdb-0.1.0/icebergdb.egg-info/requires.txt +1 -0
- icebergdb-0.1.0/icebergdb.egg-info/top_level.txt +1 -0
- icebergdb-0.1.0/pyproject.toml +32 -0
- icebergdb-0.1.0/setup.cfg +4 -0
- icebergdb-0.1.0/setup.py +61 -0
icebergdb-0.1.0/PKG-INFO
ADDED
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: icebergdb
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: Iceberg — High-performance serverless vector database for AI agents and RAG applications
|
|
5
|
+
Home-page: https://icebergdb.in
|
|
6
|
+
Author: Iceberg Data Technologies
|
|
7
|
+
Author-email: Iceberg Data Technologies <hello@icebergdb.in>
|
|
8
|
+
License: MIT
|
|
9
|
+
Project-URL: Homepage, https://icebergdb.in
|
|
10
|
+
Project-URL: Documentation, https://icebergdb.in/docs
|
|
11
|
+
Project-URL: Repository, https://github.com/icebergdb/iceberg
|
|
12
|
+
Project-URL: Issues, https://github.com/icebergdb/iceberg/issues
|
|
13
|
+
Keywords: vector database,vector search,rag,ai agents,embeddings,semantic search
|
|
14
|
+
Classifier: Development Status :: 4 - Beta
|
|
15
|
+
Classifier: Intended Audience :: Developers
|
|
16
|
+
Classifier: Topic :: Database
|
|
17
|
+
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
|
|
18
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
19
|
+
Classifier: Programming Language :: Python :: 3
|
|
20
|
+
Requires-Python: >=3.9
|
|
21
|
+
Description-Content-Type: text/markdown
|
|
22
|
+
Requires-Dist: httpx>=0.27.0
|
|
23
|
+
Dynamic: author
|
|
24
|
+
Dynamic: home-page
|
|
25
|
+
Dynamic: requires-python
|
|
26
|
+
|
|
27
|
+
<p align="center">
|
|
28
|
+
<h1 align="center">⚡ Iceberg Database</h1>
|
|
29
|
+
<p align="center"><strong>High-performance serverless vector database built for AI agents and real-time RAG.</strong></p>
|
|
30
|
+
</p>
|
|
31
|
+
|
|
32
|
+
<p align="center">
|
|
33
|
+
<a href="https://icebergdb.in"><img src="https://img.shields.io/badge/Status-Active-22c55e?style=flat-square" alt="Status"></a>
|
|
34
|
+
<a href="https://pypi.org/project/icebergdb/"><img src="https://img.shields.io/badge/pypi-v0.1.0-38bdf8?style=flat-square" alt="PyPI"></a>
|
|
35
|
+
<a href="https://python.org"><img src="https://img.shields.io/badge/python-3.9+-blue?style=flat-square" alt="Python"></a>
|
|
36
|
+
<a href="LICENSE"><img src="https://img.shields.io/badge/license-MIT-purple?style=flat-square" alt="License"></a>
|
|
37
|
+
</p>
|
|
38
|
+
|
|
39
|
+
---
|
|
40
|
+
|
|
41
|
+
## 🚀 Quick Install
|
|
42
|
+
|
|
43
|
+
```bash
|
|
44
|
+
pip install icebergdb
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
---
|
|
48
|
+
|
|
49
|
+
## ⚡ 30-Second Quickstart
|
|
50
|
+
|
|
51
|
+
```python
|
|
52
|
+
import iceberg
|
|
53
|
+
|
|
54
|
+
# 1. Connect to Iceberg (reads ICEBERG_API_KEY from environment by default)
|
|
55
|
+
db = iceberg.connect(api_key="your_api_key")
|
|
56
|
+
|
|
57
|
+
# 2. Create an isolated vector collection
|
|
58
|
+
db.create_collection("ai_agent_memory", description="Real-time context memory")
|
|
59
|
+
|
|
60
|
+
# 3. Index text documents or chunks (supports English, Hindi, and multilingual text)
|
|
61
|
+
db.index_text("ai_agent_memory", "Iceberg delivers sub-5ms vector queries with zero cold starts.")
|
|
62
|
+
db.index_text("ai_agent_memory", "Autonomous AI agents require persistent, low-latency recall memory.")
|
|
63
|
+
|
|
64
|
+
# 4. Perform hybrid semantic search
|
|
65
|
+
results = db.search("ai_agent_memory", query="low-latency agent recall", top_k=3)
|
|
66
|
+
|
|
67
|
+
for match in results:
|
|
68
|
+
print(f"[{match.score:.3f}] {match.text}")
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
---
|
|
72
|
+
|
|
73
|
+
## 📁 Uploading Documents Directly (PDF, TXT, Markdown)
|
|
74
|
+
|
|
75
|
+
```python
|
|
76
|
+
# Upload and auto-chunk entire documents in one line
|
|
77
|
+
db.upload("ai_agent_memory", "product_spec.pdf")
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
---
|
|
81
|
+
|
|
82
|
+
## 🔍 Filtered & Scoped Search
|
|
83
|
+
|
|
84
|
+
```python
|
|
85
|
+
results = db.search(
|
|
86
|
+
"ai_agent_memory",
|
|
87
|
+
query="vector benchmarks",
|
|
88
|
+
top_k=5,
|
|
89
|
+
score_threshold=0.4,
|
|
90
|
+
filters={"source": "product_spec.pdf"}
|
|
91
|
+
)
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
---
|
|
95
|
+
|
|
96
|
+
## 🌐 Cloud & Self-Hosted Endpoints
|
|
97
|
+
|
|
98
|
+
To connect to your local dev engine or dedicated cluster:
|
|
99
|
+
|
|
100
|
+
```python
|
|
101
|
+
db = iceberg.connect(
|
|
102
|
+
api_key="iceberg_secret_key",
|
|
103
|
+
base_url="http://localhost:8000" # or https://api.icebergdb.in
|
|
104
|
+
)
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
---
|
|
108
|
+
|
|
109
|
+
## 🛡️ License
|
|
110
|
+
|
|
111
|
+
MIT License © 2026 Iceberg Data Technologies.
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
<p align="center">
|
|
2
|
+
<h1 align="center">⚡ Iceberg Database</h1>
|
|
3
|
+
<p align="center"><strong>High-performance serverless vector database built for AI agents and real-time RAG.</strong></p>
|
|
4
|
+
</p>
|
|
5
|
+
|
|
6
|
+
<p align="center">
|
|
7
|
+
<a href="https://icebergdb.in"><img src="https://img.shields.io/badge/Status-Active-22c55e?style=flat-square" alt="Status"></a>
|
|
8
|
+
<a href="https://pypi.org/project/icebergdb/"><img src="https://img.shields.io/badge/pypi-v0.1.0-38bdf8?style=flat-square" alt="PyPI"></a>
|
|
9
|
+
<a href="https://python.org"><img src="https://img.shields.io/badge/python-3.9+-blue?style=flat-square" alt="Python"></a>
|
|
10
|
+
<a href="LICENSE"><img src="https://img.shields.io/badge/license-MIT-purple?style=flat-square" alt="License"></a>
|
|
11
|
+
</p>
|
|
12
|
+
|
|
13
|
+
---
|
|
14
|
+
|
|
15
|
+
## 🚀 Quick Install
|
|
16
|
+
|
|
17
|
+
```bash
|
|
18
|
+
pip install icebergdb
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
---
|
|
22
|
+
|
|
23
|
+
## ⚡ 30-Second Quickstart
|
|
24
|
+
|
|
25
|
+
```python
|
|
26
|
+
import iceberg
|
|
27
|
+
|
|
28
|
+
# 1. Connect to Iceberg (reads ICEBERG_API_KEY from environment by default)
|
|
29
|
+
db = iceberg.connect(api_key="your_api_key")
|
|
30
|
+
|
|
31
|
+
# 2. Create an isolated vector collection
|
|
32
|
+
db.create_collection("ai_agent_memory", description="Real-time context memory")
|
|
33
|
+
|
|
34
|
+
# 3. Index text documents or chunks (supports English, Hindi, and multilingual text)
|
|
35
|
+
db.index_text("ai_agent_memory", "Iceberg delivers sub-5ms vector queries with zero cold starts.")
|
|
36
|
+
db.index_text("ai_agent_memory", "Autonomous AI agents require persistent, low-latency recall memory.")
|
|
37
|
+
|
|
38
|
+
# 4. Perform hybrid semantic search
|
|
39
|
+
results = db.search("ai_agent_memory", query="low-latency agent recall", top_k=3)
|
|
40
|
+
|
|
41
|
+
for match in results:
|
|
42
|
+
print(f"[{match.score:.3f}] {match.text}")
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
---
|
|
46
|
+
|
|
47
|
+
## 📁 Uploading Documents Directly (PDF, TXT, Markdown)
|
|
48
|
+
|
|
49
|
+
```python
|
|
50
|
+
# Upload and auto-chunk entire documents in one line
|
|
51
|
+
db.upload("ai_agent_memory", "product_spec.pdf")
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
---
|
|
55
|
+
|
|
56
|
+
## 🔍 Filtered & Scoped Search
|
|
57
|
+
|
|
58
|
+
```python
|
|
59
|
+
results = db.search(
|
|
60
|
+
"ai_agent_memory",
|
|
61
|
+
query="vector benchmarks",
|
|
62
|
+
top_k=5,
|
|
63
|
+
score_threshold=0.4,
|
|
64
|
+
filters={"source": "product_spec.pdf"}
|
|
65
|
+
)
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
---
|
|
69
|
+
|
|
70
|
+
## 🌐 Cloud & Self-Hosted Endpoints
|
|
71
|
+
|
|
72
|
+
To connect to your local dev engine or dedicated cluster:
|
|
73
|
+
|
|
74
|
+
```python
|
|
75
|
+
db = iceberg.connect(
|
|
76
|
+
api_key="iceberg_secret_key",
|
|
77
|
+
base_url="http://localhost:8000" # or https://api.icebergdb.in
|
|
78
|
+
)
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
---
|
|
82
|
+
|
|
83
|
+
## 🛡️ License
|
|
84
|
+
|
|
85
|
+
MIT License © 2026 Iceberg Data Technologies.
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
from .client import Client, SearchResult, IcebergError
|
|
2
|
+
from typing import Optional
|
|
3
|
+
|
|
4
|
+
__version__ = "0.1.0"
|
|
5
|
+
__all__ = ["Client", "SearchResult", "IcebergError", "connect"]
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
def connect(
|
|
9
|
+
api_key: Optional[str] = None,
|
|
10
|
+
base_url: Optional[str] = None,
|
|
11
|
+
timeout: float = 30.0,
|
|
12
|
+
) -> Client:
|
|
13
|
+
"""
|
|
14
|
+
Connect to Iceberg Vector Database.
|
|
15
|
+
|
|
16
|
+
Example:
|
|
17
|
+
import iceberg
|
|
18
|
+
db = iceberg.connect(api_key="your_key")
|
|
19
|
+
"""
|
|
20
|
+
return Client(api_key=api_key, base_url=base_url, timeout=timeout)
|
|
@@ -0,0 +1,166 @@
|
|
|
1
|
+
import os
|
|
2
|
+
import httpx
|
|
3
|
+
from typing import Optional, List, Dict, Any
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
class IcebergError(Exception):
|
|
7
|
+
pass
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
class SearchResult:
|
|
11
|
+
def __init__(self, data: dict):
|
|
12
|
+
self.text: str = data.get("text", "")
|
|
13
|
+
self.score: float = data.get("score", 0.0)
|
|
14
|
+
self.metadata: dict = data.get("metadata", {})
|
|
15
|
+
|
|
16
|
+
def __repr__(self):
|
|
17
|
+
return f"SearchResult(score={self.score:.3f}, text={self.text[:60]!r})"
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
class Client:
|
|
21
|
+
"""
|
|
22
|
+
Iceberg API Client
|
|
23
|
+
|
|
24
|
+
Usage:
|
|
25
|
+
import iceberg
|
|
26
|
+
|
|
27
|
+
client = iceberg.connect(api_key="your_api_key")
|
|
28
|
+
|
|
29
|
+
# Create a collection
|
|
30
|
+
client.create_collection("my_docs")
|
|
31
|
+
|
|
32
|
+
# Index text
|
|
33
|
+
client.index_text("my_docs", "Your document text here")
|
|
34
|
+
|
|
35
|
+
# Upload a PDF
|
|
36
|
+
client.upload("my_docs", "document.pdf")
|
|
37
|
+
|
|
38
|
+
# Search
|
|
39
|
+
results = client.search("my_docs", "your query")
|
|
40
|
+
for r in results:
|
|
41
|
+
print(r.score, r.text)
|
|
42
|
+
"""
|
|
43
|
+
|
|
44
|
+
def __init__(
|
|
45
|
+
self,
|
|
46
|
+
api_key: Optional[str] = None,
|
|
47
|
+
base_url: Optional[str] = None,
|
|
48
|
+
timeout: float = 30.0,
|
|
49
|
+
):
|
|
50
|
+
self.api_key = api_key or os.environ.get("ICEBERG_API_KEY", "")
|
|
51
|
+
resolved_url = base_url or os.environ.get("ICEBERG_API_URL", "https://api.icebergdb.in")
|
|
52
|
+
self.base_url = resolved_url.rstrip("/")
|
|
53
|
+
|
|
54
|
+
headers = {}
|
|
55
|
+
if self.api_key:
|
|
56
|
+
headers["X-API-Key"] = self.api_key
|
|
57
|
+
|
|
58
|
+
self._client = httpx.Client(
|
|
59
|
+
headers=headers,
|
|
60
|
+
timeout=timeout,
|
|
61
|
+
)
|
|
62
|
+
|
|
63
|
+
def _get(self, path: str, **kwargs):
|
|
64
|
+
r = self._client.get(f"{self.base_url}{path}", **kwargs)
|
|
65
|
+
self._raise(r)
|
|
66
|
+
return r.json()
|
|
67
|
+
|
|
68
|
+
def _post(self, path: str, **kwargs):
|
|
69
|
+
r = self._client.post(f"{self.base_url}{path}", **kwargs)
|
|
70
|
+
self._raise(r)
|
|
71
|
+
return r.json()
|
|
72
|
+
|
|
73
|
+
def _delete(self, path: str):
|
|
74
|
+
r = self._client.delete(f"{self.base_url}{path}")
|
|
75
|
+
self._raise(r)
|
|
76
|
+
return r.json()
|
|
77
|
+
|
|
78
|
+
def _raise(self, r: httpx.Response):
|
|
79
|
+
if r.status_code >= 400:
|
|
80
|
+
try:
|
|
81
|
+
detail = r.json().get("detail", r.text)
|
|
82
|
+
except Exception:
|
|
83
|
+
detail = r.text
|
|
84
|
+
raise IcebergError(f"HTTP {r.status_code}: {detail}")
|
|
85
|
+
|
|
86
|
+
# ── Collections ──────────────────────────────────────────────────────────
|
|
87
|
+
|
|
88
|
+
def create_collection(self, name: str, description: str = "") -> dict:
|
|
89
|
+
"""Create a new vector collection."""
|
|
90
|
+
return self._post("/collections", json={"name": name, "description": description})
|
|
91
|
+
|
|
92
|
+
def list_collections(self) -> list[str]:
|
|
93
|
+
"""List all collection names."""
|
|
94
|
+
return self._get("/collections").get("collections", [])
|
|
95
|
+
|
|
96
|
+
def delete_collection(self, name: str) -> dict:
|
|
97
|
+
"""Delete a collection and all its vectors."""
|
|
98
|
+
return self._delete(f"/collections/{name}")
|
|
99
|
+
|
|
100
|
+
def collection_info(self, name: str) -> dict:
|
|
101
|
+
"""Get info about a collection (vector count, status)."""
|
|
102
|
+
return self._get(f"/collections/{name}")
|
|
103
|
+
|
|
104
|
+
# ── Indexing ──────────────────────────────────────────────────────────────
|
|
105
|
+
|
|
106
|
+
def index_text(self, collection: str, text: str, source: str = "sdk") -> dict:
|
|
107
|
+
"""
|
|
108
|
+
Index plain text into a collection.
|
|
109
|
+
The text is automatically chunked and embedded.
|
|
110
|
+
"""
|
|
111
|
+
return self._post("/documents/text", data={
|
|
112
|
+
"collection": collection,
|
|
113
|
+
"text": text,
|
|
114
|
+
"source": source,
|
|
115
|
+
})
|
|
116
|
+
|
|
117
|
+
def upload(self, collection: str, file_path: str) -> dict:
|
|
118
|
+
"""Upload and index a file (PDF, TXT, MD)."""
|
|
119
|
+
with open(file_path, "rb") as f:
|
|
120
|
+
filename = file_path.split("/")[-1].split("\\")[-1]
|
|
121
|
+
r = self._client.post(
|
|
122
|
+
f"{self.base_url}/documents/upload",
|
|
123
|
+
data={"collection": collection},
|
|
124
|
+
files={"file": (filename, f)},
|
|
125
|
+
)
|
|
126
|
+
self._raise(r)
|
|
127
|
+
return r.json()
|
|
128
|
+
|
|
129
|
+
# ── Search ────────────────────────────────────────────────────────────────
|
|
130
|
+
|
|
131
|
+
def search(
|
|
132
|
+
self,
|
|
133
|
+
collection: str,
|
|
134
|
+
query: str,
|
|
135
|
+
top_k: int = 5,
|
|
136
|
+
score_threshold: float = 0.3,
|
|
137
|
+
filters: Optional[dict] = None,
|
|
138
|
+
) -> list[SearchResult]:
|
|
139
|
+
"""Semantic search in a collection."""
|
|
140
|
+
payload = {
|
|
141
|
+
"collection": collection,
|
|
142
|
+
"query": query,
|
|
143
|
+
"top_k": top_k,
|
|
144
|
+
"score_threshold": score_threshold,
|
|
145
|
+
}
|
|
146
|
+
if filters:
|
|
147
|
+
payload["filters"] = filters
|
|
148
|
+
|
|
149
|
+
data = self._post("/search", json=payload)
|
|
150
|
+
return [SearchResult(r) for r in data.get("results", [])]
|
|
151
|
+
|
|
152
|
+
# ── Usage ─────────────────────────────────────────────────────────────────
|
|
153
|
+
|
|
154
|
+
def usage_stats(self) -> dict:
|
|
155
|
+
"""Get usage statistics for your account."""
|
|
156
|
+
return self._get("/usage/stats")
|
|
157
|
+
|
|
158
|
+
def close(self):
|
|
159
|
+
"""Close the HTTP client."""
|
|
160
|
+
self._client.close()
|
|
161
|
+
|
|
162
|
+
def __enter__(self):
|
|
163
|
+
return self
|
|
164
|
+
|
|
165
|
+
def __exit__(self, *args):
|
|
166
|
+
self.close()
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: icebergdb
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: Iceberg — High-performance serverless vector database for AI agents and RAG applications
|
|
5
|
+
Home-page: https://icebergdb.in
|
|
6
|
+
Author: Iceberg Data Technologies
|
|
7
|
+
Author-email: Iceberg Data Technologies <hello@icebergdb.in>
|
|
8
|
+
License: MIT
|
|
9
|
+
Project-URL: Homepage, https://icebergdb.in
|
|
10
|
+
Project-URL: Documentation, https://icebergdb.in/docs
|
|
11
|
+
Project-URL: Repository, https://github.com/icebergdb/iceberg
|
|
12
|
+
Project-URL: Issues, https://github.com/icebergdb/iceberg/issues
|
|
13
|
+
Keywords: vector database,vector search,rag,ai agents,embeddings,semantic search
|
|
14
|
+
Classifier: Development Status :: 4 - Beta
|
|
15
|
+
Classifier: Intended Audience :: Developers
|
|
16
|
+
Classifier: Topic :: Database
|
|
17
|
+
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
|
|
18
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
19
|
+
Classifier: Programming Language :: Python :: 3
|
|
20
|
+
Requires-Python: >=3.9
|
|
21
|
+
Description-Content-Type: text/markdown
|
|
22
|
+
Requires-Dist: httpx>=0.27.0
|
|
23
|
+
Dynamic: author
|
|
24
|
+
Dynamic: home-page
|
|
25
|
+
Dynamic: requires-python
|
|
26
|
+
|
|
27
|
+
<p align="center">
|
|
28
|
+
<h1 align="center">⚡ Iceberg Database</h1>
|
|
29
|
+
<p align="center"><strong>High-performance serverless vector database built for AI agents and real-time RAG.</strong></p>
|
|
30
|
+
</p>
|
|
31
|
+
|
|
32
|
+
<p align="center">
|
|
33
|
+
<a href="https://icebergdb.in"><img src="https://img.shields.io/badge/Status-Active-22c55e?style=flat-square" alt="Status"></a>
|
|
34
|
+
<a href="https://pypi.org/project/icebergdb/"><img src="https://img.shields.io/badge/pypi-v0.1.0-38bdf8?style=flat-square" alt="PyPI"></a>
|
|
35
|
+
<a href="https://python.org"><img src="https://img.shields.io/badge/python-3.9+-blue?style=flat-square" alt="Python"></a>
|
|
36
|
+
<a href="LICENSE"><img src="https://img.shields.io/badge/license-MIT-purple?style=flat-square" alt="License"></a>
|
|
37
|
+
</p>
|
|
38
|
+
|
|
39
|
+
---
|
|
40
|
+
|
|
41
|
+
## 🚀 Quick Install
|
|
42
|
+
|
|
43
|
+
```bash
|
|
44
|
+
pip install icebergdb
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
---
|
|
48
|
+
|
|
49
|
+
## ⚡ 30-Second Quickstart
|
|
50
|
+
|
|
51
|
+
```python
|
|
52
|
+
import iceberg
|
|
53
|
+
|
|
54
|
+
# 1. Connect to Iceberg (reads ICEBERG_API_KEY from environment by default)
|
|
55
|
+
db = iceberg.connect(api_key="your_api_key")
|
|
56
|
+
|
|
57
|
+
# 2. Create an isolated vector collection
|
|
58
|
+
db.create_collection("ai_agent_memory", description="Real-time context memory")
|
|
59
|
+
|
|
60
|
+
# 3. Index text documents or chunks (supports English, Hindi, and multilingual text)
|
|
61
|
+
db.index_text("ai_agent_memory", "Iceberg delivers sub-5ms vector queries with zero cold starts.")
|
|
62
|
+
db.index_text("ai_agent_memory", "Autonomous AI agents require persistent, low-latency recall memory.")
|
|
63
|
+
|
|
64
|
+
# 4. Perform hybrid semantic search
|
|
65
|
+
results = db.search("ai_agent_memory", query="low-latency agent recall", top_k=3)
|
|
66
|
+
|
|
67
|
+
for match in results:
|
|
68
|
+
print(f"[{match.score:.3f}] {match.text}")
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
---
|
|
72
|
+
|
|
73
|
+
## 📁 Uploading Documents Directly (PDF, TXT, Markdown)
|
|
74
|
+
|
|
75
|
+
```python
|
|
76
|
+
# Upload and auto-chunk entire documents in one line
|
|
77
|
+
db.upload("ai_agent_memory", "product_spec.pdf")
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
---
|
|
81
|
+
|
|
82
|
+
## 🔍 Filtered & Scoped Search
|
|
83
|
+
|
|
84
|
+
```python
|
|
85
|
+
results = db.search(
|
|
86
|
+
"ai_agent_memory",
|
|
87
|
+
query="vector benchmarks",
|
|
88
|
+
top_k=5,
|
|
89
|
+
score_threshold=0.4,
|
|
90
|
+
filters={"source": "product_spec.pdf"}
|
|
91
|
+
)
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
---
|
|
95
|
+
|
|
96
|
+
## 🌐 Cloud & Self-Hosted Endpoints
|
|
97
|
+
|
|
98
|
+
To connect to your local dev engine or dedicated cluster:
|
|
99
|
+
|
|
100
|
+
```python
|
|
101
|
+
db = iceberg.connect(
|
|
102
|
+
api_key="iceberg_secret_key",
|
|
103
|
+
base_url="http://localhost:8000" # or https://api.icebergdb.in
|
|
104
|
+
)
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
---
|
|
108
|
+
|
|
109
|
+
## 🛡️ License
|
|
110
|
+
|
|
111
|
+
MIT License © 2026 Iceberg Data Technologies.
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
httpx>=0.27.0
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
iceberg
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
[build-system]
|
|
2
|
+
requires = ["setuptools>=61.0", "wheel"]
|
|
3
|
+
build-backend = "setuptools.build_meta"
|
|
4
|
+
|
|
5
|
+
[project]
|
|
6
|
+
name = "icebergdb"
|
|
7
|
+
version = "0.1.0"
|
|
8
|
+
description = "Iceberg — High-performance serverless vector database for AI agents and RAG applications"
|
|
9
|
+
readme = "README.md"
|
|
10
|
+
requires-python = ">=3.9"
|
|
11
|
+
license = { text = "MIT" }
|
|
12
|
+
authors = [
|
|
13
|
+
{ name = "Iceberg Data Technologies", email = "hello@icebergdb.in" }
|
|
14
|
+
]
|
|
15
|
+
keywords = ["vector database", "vector search", "rag", "ai agents", "embeddings", "semantic search"]
|
|
16
|
+
classifiers = [
|
|
17
|
+
"Development Status :: 4 - Beta",
|
|
18
|
+
"Intended Audience :: Developers",
|
|
19
|
+
"Topic :: Database",
|
|
20
|
+
"Topic :: Scientific/Engineering :: Artificial Intelligence",
|
|
21
|
+
"License :: OSI Approved :: MIT License",
|
|
22
|
+
"Programming Language :: Python :: 3",
|
|
23
|
+
]
|
|
24
|
+
dependencies = [
|
|
25
|
+
"httpx>=0.27.0",
|
|
26
|
+
]
|
|
27
|
+
|
|
28
|
+
[project.urls]
|
|
29
|
+
Homepage = "https://icebergdb.in"
|
|
30
|
+
Documentation = "https://icebergdb.in/docs"
|
|
31
|
+
Repository = "https://github.com/icebergdb/iceberg"
|
|
32
|
+
Issues = "https://github.com/icebergdb/iceberg/issues"
|
icebergdb-0.1.0/setup.py
ADDED
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import os
|
|
2
|
+
from setuptools import setup, find_packages
|
|
3
|
+
|
|
4
|
+
here = os.path.abspath(os.path.dirname(__file__))
|
|
5
|
+
readme_path = os.path.join(here, "README.md")
|
|
6
|
+
long_description = ""
|
|
7
|
+
if os.path.exists(readme_path):
|
|
8
|
+
with open(readme_path, encoding="utf-8") as f:
|
|
9
|
+
long_description = f.read()
|
|
10
|
+
|
|
11
|
+
setup(
|
|
12
|
+
name="icebergdb",
|
|
13
|
+
version="0.1.0",
|
|
14
|
+
description="Iceberg — High-performance serverless vector database for AI agents and RAG applications",
|
|
15
|
+
long_description=long_description,
|
|
16
|
+
long_description_content_type="text/markdown",
|
|
17
|
+
author="Iceberg Data Technologies",
|
|
18
|
+
author_email="hello@icebergdb.in",
|
|
19
|
+
url="https://icebergdb.in",
|
|
20
|
+
project_urls={
|
|
21
|
+
"Documentation": "https://icebergdb.in/docs",
|
|
22
|
+
"Source": "https://github.com/icebergdb/iceberg",
|
|
23
|
+
"Bug Tracker": "https://github.com/icebergdb/iceberg/issues",
|
|
24
|
+
},
|
|
25
|
+
license="MIT",
|
|
26
|
+
packages=find_packages(),
|
|
27
|
+
python_requires=">=3.9",
|
|
28
|
+
install_requires=[
|
|
29
|
+
"httpx>=0.27.0",
|
|
30
|
+
],
|
|
31
|
+
extras_require={
|
|
32
|
+
"dev": [
|
|
33
|
+
"pytest>=8.0.0",
|
|
34
|
+
"build>=1.0.0",
|
|
35
|
+
"twine>=5.0.0",
|
|
36
|
+
],
|
|
37
|
+
},
|
|
38
|
+
keywords=[
|
|
39
|
+
"vector database",
|
|
40
|
+
"vector search",
|
|
41
|
+
"rag",
|
|
42
|
+
"ai agents",
|
|
43
|
+
"embeddings",
|
|
44
|
+
"semantic search",
|
|
45
|
+
"llm",
|
|
46
|
+
],
|
|
47
|
+
classifiers=[
|
|
48
|
+
"Development Status :: 4 - Beta",
|
|
49
|
+
"Intended Audience :: Developers",
|
|
50
|
+
"Intended Audience :: Science/Research",
|
|
51
|
+
"Topic :: Database",
|
|
52
|
+
"Topic :: Scientific/Engineering :: Artificial Intelligence",
|
|
53
|
+
"License :: OSI Approved :: MIT License",
|
|
54
|
+
"Programming Language :: Python :: 3",
|
|
55
|
+
"Programming Language :: Python :: 3.9",
|
|
56
|
+
"Programming Language :: Python :: 3.10",
|
|
57
|
+
"Programming Language :: Python :: 3.11",
|
|
58
|
+
"Programming Language :: Python :: 3.12",
|
|
59
|
+
"Operating System :: OS Independent",
|
|
60
|
+
],
|
|
61
|
+
)
|