waveflowdb-client 1.0.6__tar.gz → 1.0.7__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.
- {waveflowdb_client-1.0.6 → waveflowdb_client-1.0.7}/LICENSE +21 -21
- waveflowdb_client-1.0.7/MANIFEST.in +3 -0
- waveflowdb_client-1.0.7/PKG-INFO +266 -0
- waveflowdb_client-1.0.7/README.md +217 -0
- {waveflowdb_client-1.0.6 → waveflowdb_client-1.0.7}/pyproject.toml +46 -27
- {waveflowdb_client-1.0.6 → waveflowdb_client-1.0.7}/setup.cfg +4 -4
- {waveflowdb_client-1.0.6 → waveflowdb_client-1.0.7}/waveflowdb_client/__init__.py +3 -3
- {waveflowdb_client-1.0.6 → waveflowdb_client-1.0.7}/waveflowdb_client/client.py +242 -66
- {waveflowdb_client-1.0.6 → waveflowdb_client-1.0.7}/waveflowdb_client/config.py +27 -0
- {waveflowdb_client-1.0.6 → waveflowdb_client-1.0.7}/waveflowdb_client/exceptions.py +1 -1
- {waveflowdb_client-1.0.6 → waveflowdb_client-1.0.7}/waveflowdb_client/extractors.py +879 -877
- {waveflowdb_client-1.0.6 → waveflowdb_client-1.0.7}/waveflowdb_client/index.py +491 -422
- {waveflowdb_client-1.0.6 → waveflowdb_client-1.0.7}/waveflowdb_client/run_utils.py +876 -835
- {waveflowdb_client-1.0.6 → waveflowdb_client-1.0.7}/waveflowdb_client/utils.py +253 -60
- waveflowdb_client-1.0.7/waveflowdb_client.egg-info/PKG-INFO +266 -0
- {waveflowdb_client-1.0.6 → waveflowdb_client-1.0.7}/waveflowdb_client.egg-info/SOURCES.txt +1 -1
- waveflowdb_client-1.0.7/waveflowdb_client.egg-info/requires.txt +16 -0
- waveflowdb_client-1.0.6/PKG-INFO +0 -785
- waveflowdb_client-1.0.6/README.md +0 -747
- waveflowdb_client-1.0.6/waveflowdb_client.egg-info/PKG-INFO +0 -785
- waveflowdb_client-1.0.6/waveflowdb_client.egg-info/requires.txt +0 -3
- {waveflowdb_client-1.0.6 → waveflowdb_client-1.0.7}/waveflowdb_client/cloud_extractors.py +0 -0
- {waveflowdb_client-1.0.6 → waveflowdb_client-1.0.7}/waveflowdb_client/models.py +0 -0
- {waveflowdb_client-1.0.6 → waveflowdb_client-1.0.7}/waveflowdb_client.egg-info/dependency_links.txt +0 -0
- {waveflowdb_client-1.0.6 → waveflowdb_client-1.0.7}/waveflowdb_client.egg-info/top_level.txt +0 -0
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
MIT License
|
|
2
|
-
|
|
3
|
-
Copyright (c) 2026 agentanalytics.ai
|
|
4
|
-
|
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
-
in the Software without restriction, including without limitation the rights
|
|
8
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
-
furnished to do so, subject to the following conditions:
|
|
11
|
-
|
|
12
|
-
The above copyright notice and this permission notice shall be included in all
|
|
13
|
-
copies or substantial portions of the Software.
|
|
14
|
-
|
|
15
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
-
SOFTWARE.
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 agentanalytics.ai
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -0,0 +1,266 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: waveflowdb_client
|
|
3
|
+
Version: 1.0.7
|
|
4
|
+
Summary: VectorLake SDK — Deterministic backend engine powering agent workflows
|
|
5
|
+
Author-email: "agentanalytics.ai" <nitin@agentanalytics.ai>
|
|
6
|
+
License: MIT License
|
|
7
|
+
|
|
8
|
+
Copyright (c) 2026 agentanalytics.ai
|
|
9
|
+
|
|
10
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
11
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
12
|
+
in the Software without restriction, including without limitation the rights
|
|
13
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
14
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
15
|
+
furnished to do so, subject to the following conditions:
|
|
16
|
+
|
|
17
|
+
The above copyright notice and this permission notice shall be included in all
|
|
18
|
+
copies or substantial portions of the Software.
|
|
19
|
+
|
|
20
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
21
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
22
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
23
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
24
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
25
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
26
|
+
SOFTWARE.
|
|
27
|
+
|
|
28
|
+
Project-URL: Homepage, https://agentanalytics.ai
|
|
29
|
+
Project-URL: Documentation, https://www.agentanalytics.ai/docs/waveflow-db
|
|
30
|
+
Keywords: vector db,VECTOR QUERY LANGUAGE,waveflowdb,agentanalytics,VQL
|
|
31
|
+
Requires-Python: >=3.8
|
|
32
|
+
Description-Content-Type: text/markdown
|
|
33
|
+
License-File: LICENSE
|
|
34
|
+
Requires-Dist: requests
|
|
35
|
+
Requires-Dist: numpy
|
|
36
|
+
Requires-Dist: tqdm
|
|
37
|
+
Requires-Dist: python-dotenv
|
|
38
|
+
Provides-Extra: documents
|
|
39
|
+
Requires-Dist: PyPDF2; extra == "documents"
|
|
40
|
+
Requires-Dist: python-docx; extra == "documents"
|
|
41
|
+
Requires-Dist: pdfspine; extra == "documents"
|
|
42
|
+
Requires-Dist: pytesseract; extra == "documents"
|
|
43
|
+
Requires-Dist: openpyxl; extra == "documents"
|
|
44
|
+
Provides-Extra: cloud-ocr
|
|
45
|
+
Requires-Dist: boto3; extra == "cloud-ocr"
|
|
46
|
+
Requires-Dist: google-cloud-vision; extra == "cloud-ocr"
|
|
47
|
+
Requires-Dist: azure-ai-documentintelligence; extra == "cloud-ocr"
|
|
48
|
+
Dynamic: license-file
|
|
49
|
+
|
|
50
|
+
<div align="center">
|
|
51
|
+
|
|
52
|
+
## WaveflowDB Client
|
|
53
|
+
|
|
54
|
+
A Python client library for [WaveflowDB](https://db.agentanalytics.ai/)
|
|
55
|
+
|
|
56
|
+
[](https://pypi.org/project/waveflowdb-client/)
|
|
57
|
+
[](https://www.agentanalytics.ai/docs/waveflow-db)
|
|
58
|
+
[]()
|
|
59
|
+
|
|
60
|
+
</div>
|
|
61
|
+
|
|
62
|
+
## Key Features
|
|
63
|
+
|
|
64
|
+
- **Semantic search:** Retrieve relevant content using natural-language queries.
|
|
65
|
+
- **VQL:** Perform targeted retrieval with structured filtering.
|
|
66
|
+
- **Document management:** Add, update/refresh, insert, and delete documents.
|
|
67
|
+
- **Document ingestion:** Support for multiple file formats and optional OCR integrations.
|
|
68
|
+
- **Reliable ingestion:** Batch processing, resumable uploads, and change detection.
|
|
69
|
+
|
|
70
|
+
## How to Use WaveflowDB
|
|
71
|
+
|
|
72
|
+
1. Create a namespace in the [WaveflowDB UI](https://db.agentanalytics.ai/) and configure your API credentials.
|
|
73
|
+
2. Upload your documents using the client. Chunking and embedding generation are handled internally.
|
|
74
|
+
3. Run a search query to retrieve relevant data chunks from your uploaded documents.
|
|
75
|
+
|
|
76
|
+
## Installation
|
|
77
|
+
```bash
|
|
78
|
+
pip install waveflowdb-client
|
|
79
|
+
|
|
80
|
+
# Optional: Install additional document processing support
|
|
81
|
+
pip install waveflowdb-client[documents]
|
|
82
|
+
```
|
|
83
|
+
## Setup Before You Begin
|
|
84
|
+
|
|
85
|
+
Before using the WaveflowDB Client, complete the following steps:
|
|
86
|
+
|
|
87
|
+
1. **Access WaveflowDB:** Visit the [WaveflowDB UI](https://db.agentanalytics.ai/).
|
|
88
|
+
2. **Generate an API key:** Create your API credentials.
|
|
89
|
+
3. **Create a namespace:** Set up a namespace to store your documents and embeddings.
|
|
90
|
+
|
|
91
|
+
For detailed instructions, refer to the [WaveflowDB Setup Guide](https://www.agentanalytics.ai/docs/waveflow-db).
|
|
92
|
+
|
|
93
|
+
**Note:** Keep your API key, registered email address, and namespace name ready before running the Quick Start example.
|
|
94
|
+
|
|
95
|
+
## Quick start
|
|
96
|
+
```python
|
|
97
|
+
from waveflowdb_client import VectorLake
|
|
98
|
+
|
|
99
|
+
# Initialize the client with your API key and email
|
|
100
|
+
client = VectorLake(
|
|
101
|
+
api_key="your-api-key", # Generate your API key from the UI
|
|
102
|
+
user_id="your-email-address",
|
|
103
|
+
host="https://waveflow-analytics.com",
|
|
104
|
+
vector_lake_path="./upload" # Local folder containing your files
|
|
105
|
+
)
|
|
106
|
+
|
|
107
|
+
# Connect to an existing namespace created in the UI
|
|
108
|
+
index = client.Index("test_namespace")
|
|
109
|
+
|
|
110
|
+
# Upload files from the configured folder
|
|
111
|
+
index.add(files=["faq.txt", "policy.txt"])
|
|
112
|
+
|
|
113
|
+
# Search for relevant information
|
|
114
|
+
results = index.query("refund policy", top_k=5)
|
|
115
|
+
print(results)
|
|
116
|
+
```
|
|
117
|
+
|
|
118
|
+
## Search and Retrieval
|
|
119
|
+
### Basic Search
|
|
120
|
+
Search your uploaded documents using a natural-language query. WaveflowDB returns relevant data chunks based on your query.
|
|
121
|
+
```python
|
|
122
|
+
results = index.query("refund policy", top_k=5)
|
|
123
|
+
print(results)
|
|
124
|
+
```
|
|
125
|
+
|
|
126
|
+
### Advanced Search: VQL - Vector Query Language
|
|
127
|
+
Use VQL when you need more control over your search, such as applying metadata filters or constructing more complex queries.
|
|
128
|
+
|
|
129
|
+
```python
|
|
130
|
+
QUERY = """SELECT TOP 5
|
|
131
|
+
WHERE QUERY IS "refund policy complaints"
|
|
132
|
+
CONTAINS {userId:ts09ab1234}"""
|
|
133
|
+
|
|
134
|
+
results = index.query(QUERY)
|
|
135
|
+
print(results)
|
|
136
|
+
```
|
|
137
|
+
For syntax details and practical examples, refer to the [VQL Documentation](docs/VQL_DOCUMENTATION.md).
|
|
138
|
+
|
|
139
|
+
## Upload Documents
|
|
140
|
+
|
|
141
|
+
Place your documents in the folder configured by vector_lake_path when initializing the client.
|
|
142
|
+
|
|
143
|
+
### Upload Specific Documents
|
|
144
|
+
```python
|
|
145
|
+
# Upload only the selected files
|
|
146
|
+
index.add(files=["faq.pdf", "policy.docx"])
|
|
147
|
+
```
|
|
148
|
+
|
|
149
|
+
### Upload All Documents
|
|
150
|
+
```python
|
|
151
|
+
# Upload all supported files from vector_lake_path
|
|
152
|
+
index.add()
|
|
153
|
+
```
|
|
154
|
+
Chunking and embedding generation are handled internally.
|
|
155
|
+
|
|
156
|
+
### Upload Text Content Directly
|
|
157
|
+
You can add text to your namespace without creating or uploading a document file. Paste the text content into the documents list and provide a unique document ID in the ids list.
|
|
158
|
+
```python
|
|
159
|
+
# Add text content directly to the namespace
|
|
160
|
+
index.add(
|
|
161
|
+
documents=[
|
|
162
|
+
"Employees are entitled to 12 days of paid sick leave per year."
|
|
163
|
+
],
|
|
164
|
+
ids=["hr_sick_leave_policy.txt"]
|
|
165
|
+
)
|
|
166
|
+
```
|
|
167
|
+
- documents: The text content you want to store and search.
|
|
168
|
+
|
|
169
|
+
- ids: A unique identifier for each text entry. Use a descriptive name, such as hr_sick_leave_policy.txt.
|
|
170
|
+
|
|
171
|
+
For multiple text entries, provide a corresponding ID for each entry. Ensure both lists contain the same number of items.
|
|
172
|
+
|
|
173
|
+
## Upload Documents with OCR
|
|
174
|
+
OCR can help extract text from documents that require optical character recognition.
|
|
175
|
+
|
|
176
|
+
Install the optional dependencies for your chosen processing method:
|
|
177
|
+
|
|
178
|
+
```bash
|
|
179
|
+
# Local document processing and OCR support
|
|
180
|
+
pip install "waveflowdb-client[documents]"
|
|
181
|
+
|
|
182
|
+
# Cloud OCR provider integrations
|
|
183
|
+
pip install "waveflowdb-client[cloud-ocr]"
|
|
184
|
+
```
|
|
185
|
+
Enable OCR when initializing the client:
|
|
186
|
+
```python
|
|
187
|
+
client = VectorLake(
|
|
188
|
+
api_key="your-api-key",
|
|
189
|
+
user_id="your-email-address",
|
|
190
|
+
host="https://waveflow-analytics.com",
|
|
191
|
+
vector_lake_path="./upload",
|
|
192
|
+
enable_ocr=True,
|
|
193
|
+
)
|
|
194
|
+
|
|
195
|
+
index = client.Index("test_namespace")
|
|
196
|
+
|
|
197
|
+
# Upload documents using the configured OCR processing
|
|
198
|
+
index.add(files=["faq.pdf", "policy.docx"])
|
|
199
|
+
```
|
|
200
|
+
Cloud OCR may also require provider-specific credentials and configuration. See the setup documentation for details.
|
|
201
|
+
|
|
202
|
+
## Delete Documents
|
|
203
|
+
|
|
204
|
+
Use `index.get()` to list documents in the current namespace and identify their chunk IDs. Documents are split into chunks with IDs in the format `{file_name}_part{chunk_number}`.
|
|
205
|
+
|
|
206
|
+
```python
|
|
207
|
+
# List documents in the current namespace
|
|
208
|
+
index.get()
|
|
209
|
+
|
|
210
|
+
# Delete specific chunks of faq.pdf
|
|
211
|
+
index.delete(ids=["faq_part1", "faq_part2"])
|
|
212
|
+
```
|
|
213
|
+
|
|
214
|
+
To delete an entire document, provide the IDs of all its chunks.
|
|
215
|
+
|
|
216
|
+
|
|
217
|
+
## Index Management and Health
|
|
218
|
+
|
|
219
|
+
Use these methods to inspect documents, view namespace details, list available namespaces, and check server health.
|
|
220
|
+
|
|
221
|
+
```python
|
|
222
|
+
# List documents in the current namespace
|
|
223
|
+
index.get()
|
|
224
|
+
|
|
225
|
+
# View statistics and metadata for the current namespace
|
|
226
|
+
index.describe_index_stats()
|
|
227
|
+
|
|
228
|
+
# List all namespaces available to your account
|
|
229
|
+
client.list_indexes()
|
|
230
|
+
|
|
231
|
+
# Check server health
|
|
232
|
+
client.health()
|
|
233
|
+
```
|
|
234
|
+
|
|
235
|
+
## Core Operations
|
|
236
|
+
|
|
237
|
+
| Operation | Purpose | Guide |
|
|
238
|
+
|---|---|---|
|
|
239
|
+
| Add documents | Upload files or add text content | [Document Management](docs/document-management.md) |
|
|
240
|
+
| Update / refresh | Reprocess existing documents | [Document Management](docs/document-management.md) |
|
|
241
|
+
| Insert documents | Insert documents at a controlled position, where supported | [Document Management](docs/document-management.md) |
|
|
242
|
+
| Search | Retrieve relevant document chunks | [Search and Retrieval](docs/search-and-retrieval.md) |
|
|
243
|
+
| Delete | Remove indexed documents | [Document Management](docs/document-management.md) |
|
|
244
|
+
|
|
245
|
+
## Documentation
|
|
246
|
+
|
|
247
|
+
- [Getting Started](docs/getting-started.md)
|
|
248
|
+
- [Configuration and Optional Dependencies](docs/configuration.md)
|
|
249
|
+
- [Document Management](docs/document-management.md)
|
|
250
|
+
- [Search and Retrieval](docs/search-and-retrieval.md)
|
|
251
|
+
- [VQL Documentation](docs/VQL_DOCUMENTATION.md)
|
|
252
|
+
- [Document Processing and OCR](docs/document-processing.md)
|
|
253
|
+
- [Advanced Ingestion](docs/advanced-ingestion.md)
|
|
254
|
+
- [Troubleshooting](docs/troubleshooting.md)
|
|
255
|
+
|
|
256
|
+
For platform documentation, visit the [WaveflowDB Documentation](https://www.agentanalytics.ai/docs/waveflow-db).
|
|
257
|
+
|
|
258
|
+
## Support & Feedback
|
|
259
|
+
|
|
260
|
+
For platform access, visit the [WaveflowDB UI](https://db.agentanalytics.ai/).
|
|
261
|
+
|
|
262
|
+
If you encounter any issues or have suggestions, feel free to [open an issue](https://github.com/agentanalytics-ai/waveflowdb-client/issues) on GitHub.
|
|
263
|
+
|
|
264
|
+
## License
|
|
265
|
+
|
|
266
|
+
Copyright © DIBR Tech Private Limited. Licensed under the MIT License.
|
|
@@ -0,0 +1,217 @@
|
|
|
1
|
+
<div align="center">
|
|
2
|
+
|
|
3
|
+
## WaveflowDB Client
|
|
4
|
+
|
|
5
|
+
A Python client library for [WaveflowDB](https://db.agentanalytics.ai/)
|
|
6
|
+
|
|
7
|
+
[](https://pypi.org/project/waveflowdb-client/)
|
|
8
|
+
[](https://www.agentanalytics.ai/docs/waveflow-db)
|
|
9
|
+
[]()
|
|
10
|
+
|
|
11
|
+
</div>
|
|
12
|
+
|
|
13
|
+
## Key Features
|
|
14
|
+
|
|
15
|
+
- **Semantic search:** Retrieve relevant content using natural-language queries.
|
|
16
|
+
- **VQL:** Perform targeted retrieval with structured filtering.
|
|
17
|
+
- **Document management:** Add, update/refresh, insert, and delete documents.
|
|
18
|
+
- **Document ingestion:** Support for multiple file formats and optional OCR integrations.
|
|
19
|
+
- **Reliable ingestion:** Batch processing, resumable uploads, and change detection.
|
|
20
|
+
|
|
21
|
+
## How to Use WaveflowDB
|
|
22
|
+
|
|
23
|
+
1. Create a namespace in the [WaveflowDB UI](https://db.agentanalytics.ai/) and configure your API credentials.
|
|
24
|
+
2. Upload your documents using the client. Chunking and embedding generation are handled internally.
|
|
25
|
+
3. Run a search query to retrieve relevant data chunks from your uploaded documents.
|
|
26
|
+
|
|
27
|
+
## Installation
|
|
28
|
+
```bash
|
|
29
|
+
pip install waveflowdb-client
|
|
30
|
+
|
|
31
|
+
# Optional: Install additional document processing support
|
|
32
|
+
pip install waveflowdb-client[documents]
|
|
33
|
+
```
|
|
34
|
+
## Setup Before You Begin
|
|
35
|
+
|
|
36
|
+
Before using the WaveflowDB Client, complete the following steps:
|
|
37
|
+
|
|
38
|
+
1. **Access WaveflowDB:** Visit the [WaveflowDB UI](https://db.agentanalytics.ai/).
|
|
39
|
+
2. **Generate an API key:** Create your API credentials.
|
|
40
|
+
3. **Create a namespace:** Set up a namespace to store your documents and embeddings.
|
|
41
|
+
|
|
42
|
+
For detailed instructions, refer to the [WaveflowDB Setup Guide](https://www.agentanalytics.ai/docs/waveflow-db).
|
|
43
|
+
|
|
44
|
+
**Note:** Keep your API key, registered email address, and namespace name ready before running the Quick Start example.
|
|
45
|
+
|
|
46
|
+
## Quick start
|
|
47
|
+
```python
|
|
48
|
+
from waveflowdb_client import VectorLake
|
|
49
|
+
|
|
50
|
+
# Initialize the client with your API key and email
|
|
51
|
+
client = VectorLake(
|
|
52
|
+
api_key="your-api-key", # Generate your API key from the UI
|
|
53
|
+
user_id="your-email-address",
|
|
54
|
+
host="https://waveflow-analytics.com",
|
|
55
|
+
vector_lake_path="./upload" # Local folder containing your files
|
|
56
|
+
)
|
|
57
|
+
|
|
58
|
+
# Connect to an existing namespace created in the UI
|
|
59
|
+
index = client.Index("test_namespace")
|
|
60
|
+
|
|
61
|
+
# Upload files from the configured folder
|
|
62
|
+
index.add(files=["faq.txt", "policy.txt"])
|
|
63
|
+
|
|
64
|
+
# Search for relevant information
|
|
65
|
+
results = index.query("refund policy", top_k=5)
|
|
66
|
+
print(results)
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
## Search and Retrieval
|
|
70
|
+
### Basic Search
|
|
71
|
+
Search your uploaded documents using a natural-language query. WaveflowDB returns relevant data chunks based on your query.
|
|
72
|
+
```python
|
|
73
|
+
results = index.query("refund policy", top_k=5)
|
|
74
|
+
print(results)
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
### Advanced Search: VQL - Vector Query Language
|
|
78
|
+
Use VQL when you need more control over your search, such as applying metadata filters or constructing more complex queries.
|
|
79
|
+
|
|
80
|
+
```python
|
|
81
|
+
QUERY = """SELECT TOP 5
|
|
82
|
+
WHERE QUERY IS "refund policy complaints"
|
|
83
|
+
CONTAINS {userId:ts09ab1234}"""
|
|
84
|
+
|
|
85
|
+
results = index.query(QUERY)
|
|
86
|
+
print(results)
|
|
87
|
+
```
|
|
88
|
+
For syntax details and practical examples, refer to the [VQL Documentation](docs/VQL_DOCUMENTATION.md).
|
|
89
|
+
|
|
90
|
+
## Upload Documents
|
|
91
|
+
|
|
92
|
+
Place your documents in the folder configured by vector_lake_path when initializing the client.
|
|
93
|
+
|
|
94
|
+
### Upload Specific Documents
|
|
95
|
+
```python
|
|
96
|
+
# Upload only the selected files
|
|
97
|
+
index.add(files=["faq.pdf", "policy.docx"])
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
### Upload All Documents
|
|
101
|
+
```python
|
|
102
|
+
# Upload all supported files from vector_lake_path
|
|
103
|
+
index.add()
|
|
104
|
+
```
|
|
105
|
+
Chunking and embedding generation are handled internally.
|
|
106
|
+
|
|
107
|
+
### Upload Text Content Directly
|
|
108
|
+
You can add text to your namespace without creating or uploading a document file. Paste the text content into the documents list and provide a unique document ID in the ids list.
|
|
109
|
+
```python
|
|
110
|
+
# Add text content directly to the namespace
|
|
111
|
+
index.add(
|
|
112
|
+
documents=[
|
|
113
|
+
"Employees are entitled to 12 days of paid sick leave per year."
|
|
114
|
+
],
|
|
115
|
+
ids=["hr_sick_leave_policy.txt"]
|
|
116
|
+
)
|
|
117
|
+
```
|
|
118
|
+
- documents: The text content you want to store and search.
|
|
119
|
+
|
|
120
|
+
- ids: A unique identifier for each text entry. Use a descriptive name, such as hr_sick_leave_policy.txt.
|
|
121
|
+
|
|
122
|
+
For multiple text entries, provide a corresponding ID for each entry. Ensure both lists contain the same number of items.
|
|
123
|
+
|
|
124
|
+
## Upload Documents with OCR
|
|
125
|
+
OCR can help extract text from documents that require optical character recognition.
|
|
126
|
+
|
|
127
|
+
Install the optional dependencies for your chosen processing method:
|
|
128
|
+
|
|
129
|
+
```bash
|
|
130
|
+
# Local document processing and OCR support
|
|
131
|
+
pip install "waveflowdb-client[documents]"
|
|
132
|
+
|
|
133
|
+
# Cloud OCR provider integrations
|
|
134
|
+
pip install "waveflowdb-client[cloud-ocr]"
|
|
135
|
+
```
|
|
136
|
+
Enable OCR when initializing the client:
|
|
137
|
+
```python
|
|
138
|
+
client = VectorLake(
|
|
139
|
+
api_key="your-api-key",
|
|
140
|
+
user_id="your-email-address",
|
|
141
|
+
host="https://waveflow-analytics.com",
|
|
142
|
+
vector_lake_path="./upload",
|
|
143
|
+
enable_ocr=True,
|
|
144
|
+
)
|
|
145
|
+
|
|
146
|
+
index = client.Index("test_namespace")
|
|
147
|
+
|
|
148
|
+
# Upload documents using the configured OCR processing
|
|
149
|
+
index.add(files=["faq.pdf", "policy.docx"])
|
|
150
|
+
```
|
|
151
|
+
Cloud OCR may also require provider-specific credentials and configuration. See the setup documentation for details.
|
|
152
|
+
|
|
153
|
+
## Delete Documents
|
|
154
|
+
|
|
155
|
+
Use `index.get()` to list documents in the current namespace and identify their chunk IDs. Documents are split into chunks with IDs in the format `{file_name}_part{chunk_number}`.
|
|
156
|
+
|
|
157
|
+
```python
|
|
158
|
+
# List documents in the current namespace
|
|
159
|
+
index.get()
|
|
160
|
+
|
|
161
|
+
# Delete specific chunks of faq.pdf
|
|
162
|
+
index.delete(ids=["faq_part1", "faq_part2"])
|
|
163
|
+
```
|
|
164
|
+
|
|
165
|
+
To delete an entire document, provide the IDs of all its chunks.
|
|
166
|
+
|
|
167
|
+
|
|
168
|
+
## Index Management and Health
|
|
169
|
+
|
|
170
|
+
Use these methods to inspect documents, view namespace details, list available namespaces, and check server health.
|
|
171
|
+
|
|
172
|
+
```python
|
|
173
|
+
# List documents in the current namespace
|
|
174
|
+
index.get()
|
|
175
|
+
|
|
176
|
+
# View statistics and metadata for the current namespace
|
|
177
|
+
index.describe_index_stats()
|
|
178
|
+
|
|
179
|
+
# List all namespaces available to your account
|
|
180
|
+
client.list_indexes()
|
|
181
|
+
|
|
182
|
+
# Check server health
|
|
183
|
+
client.health()
|
|
184
|
+
```
|
|
185
|
+
|
|
186
|
+
## Core Operations
|
|
187
|
+
|
|
188
|
+
| Operation | Purpose | Guide |
|
|
189
|
+
|---|---|---|
|
|
190
|
+
| Add documents | Upload files or add text content | [Document Management](docs/document-management.md) |
|
|
191
|
+
| Update / refresh | Reprocess existing documents | [Document Management](docs/document-management.md) |
|
|
192
|
+
| Insert documents | Insert documents at a controlled position, where supported | [Document Management](docs/document-management.md) |
|
|
193
|
+
| Search | Retrieve relevant document chunks | [Search and Retrieval](docs/search-and-retrieval.md) |
|
|
194
|
+
| Delete | Remove indexed documents | [Document Management](docs/document-management.md) |
|
|
195
|
+
|
|
196
|
+
## Documentation
|
|
197
|
+
|
|
198
|
+
- [Getting Started](docs/getting-started.md)
|
|
199
|
+
- [Configuration and Optional Dependencies](docs/configuration.md)
|
|
200
|
+
- [Document Management](docs/document-management.md)
|
|
201
|
+
- [Search and Retrieval](docs/search-and-retrieval.md)
|
|
202
|
+
- [VQL Documentation](docs/VQL_DOCUMENTATION.md)
|
|
203
|
+
- [Document Processing and OCR](docs/document-processing.md)
|
|
204
|
+
- [Advanced Ingestion](docs/advanced-ingestion.md)
|
|
205
|
+
- [Troubleshooting](docs/troubleshooting.md)
|
|
206
|
+
|
|
207
|
+
For platform documentation, visit the [WaveflowDB Documentation](https://www.agentanalytics.ai/docs/waveflow-db).
|
|
208
|
+
|
|
209
|
+
## Support & Feedback
|
|
210
|
+
|
|
211
|
+
For platform access, visit the [WaveflowDB UI](https://db.agentanalytics.ai/).
|
|
212
|
+
|
|
213
|
+
If you encounter any issues or have suggestions, feel free to [open an issue](https://github.com/agentanalytics-ai/waveflowdb-client/issues) on GitHub.
|
|
214
|
+
|
|
215
|
+
## License
|
|
216
|
+
|
|
217
|
+
Copyright © DIBR Tech Private Limited. Licensed under the MIT License.
|
|
@@ -1,27 +1,46 @@
|
|
|
1
|
-
[build-system]
|
|
2
|
-
requires = ["setuptools>=61.0", "wheel"]
|
|
3
|
-
build-backend = "setuptools.build_meta"
|
|
4
|
-
|
|
5
|
-
[project]
|
|
6
|
-
name = "waveflowdb_client"
|
|
7
|
-
version = "1.0.
|
|
8
|
-
description = "VectorLake SDK — Deterministic backend engine powering agent workflows"
|
|
9
|
-
readme = "
|
|
10
|
-
requires-python = ">=3.8"
|
|
11
|
-
license = {file = "LICENSE"}
|
|
12
|
-
|
|
13
|
-
authors = [
|
|
14
|
-
{ name = "agentanalytics.ai", email = "nitin@agentanalytics.ai" }
|
|
15
|
-
]
|
|
16
|
-
|
|
17
|
-
keywords = ["vector db", "VECTOR QUERY LANGUAGE", "waveflowdb", "agentanalytics", "VQL"]
|
|
18
|
-
|
|
19
|
-
dependencies = [
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
1
|
+
[build-system]
|
|
2
|
+
requires = ["setuptools>=61.0", "wheel"]
|
|
3
|
+
build-backend = "setuptools.build_meta"
|
|
4
|
+
|
|
5
|
+
[project]
|
|
6
|
+
name = "waveflowdb_client"
|
|
7
|
+
version = "1.0.7"
|
|
8
|
+
description = "VectorLake SDK — Deterministic backend engine powering agent workflows"
|
|
9
|
+
readme = "README.md"
|
|
10
|
+
requires-python = ">=3.8"
|
|
11
|
+
license = {file = "LICENSE"}
|
|
12
|
+
|
|
13
|
+
authors = [
|
|
14
|
+
{ name = "agentanalytics.ai", email = "nitin@agentanalytics.ai" }
|
|
15
|
+
]
|
|
16
|
+
|
|
17
|
+
keywords = ["vector db", "VECTOR QUERY LANGUAGE", "waveflowdb", "agentanalytics", "VQL"]
|
|
18
|
+
|
|
19
|
+
dependencies = [
|
|
20
|
+
"requests",
|
|
21
|
+
"numpy",
|
|
22
|
+
"tqdm",
|
|
23
|
+
"python-dotenv",
|
|
24
|
+
]
|
|
25
|
+
|
|
26
|
+
[project.optional-dependencies]
|
|
27
|
+
documents = [
|
|
28
|
+
"PyPDF2",
|
|
29
|
+
"python-docx",
|
|
30
|
+
"pdfspine",
|
|
31
|
+
"pytesseract",
|
|
32
|
+
"openpyxl",
|
|
33
|
+
]
|
|
34
|
+
|
|
35
|
+
cloud-ocr = [
|
|
36
|
+
"boto3",
|
|
37
|
+
"google-cloud-vision",
|
|
38
|
+
"azure-ai-documentintelligence",
|
|
39
|
+
]
|
|
40
|
+
|
|
41
|
+
[project.urls]
|
|
42
|
+
Homepage = "https://agentanalytics.ai"
|
|
43
|
+
Documentation = "https://www.agentanalytics.ai/docs/waveflow-db"
|
|
44
|
+
|
|
45
|
+
[tool.setuptools.packages.find]
|
|
46
|
+
include = ["waveflowdb_client*"]
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
[egg_info]
|
|
2
|
-
tag_build =
|
|
3
|
-
tag_date = 0
|
|
4
|
-
|
|
1
|
+
[egg_info]
|
|
2
|
+
tag_build =
|
|
3
|
+
tag_date = 0
|
|
4
|
+
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
"""
|
|
2
|
-
waveflowdb_client — VectorLake Python SDK v1.
|
|
2
|
+
waveflowdb_client — VectorLake Python SDK v1.0.7
|
|
3
3
|
"""
|
|
4
|
+
from __future__ import annotations
|
|
4
5
|
|
|
5
|
-
__version__ = "1.0.
|
|
6
|
+
__version__ = "1.0.7"
|
|
6
7
|
|
|
7
8
|
from .client import VectorLakeClient
|
|
8
9
|
from .config import Config
|
|
@@ -65,7 +66,6 @@ __all__ = [
|
|
|
65
66
|
# Core
|
|
66
67
|
"VectorLakeClient",
|
|
67
68
|
"Config",
|
|
68
|
-
# Idiomatic façade (Pinecone/Chroma-style)
|
|
69
69
|
"VectorLake",
|
|
70
70
|
"Index",
|
|
71
71
|
# Exceptions
|