nexura-vectorstores 0.6.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.
- nexura_vectorstores-0.6.0/.gitignore +80 -0
- nexura_vectorstores-0.6.0/LICENSE +202 -0
- nexura_vectorstores-0.6.0/NOTICE +4 -0
- nexura_vectorstores-0.6.0/PKG-INFO +173 -0
- nexura_vectorstores-0.6.0/README.md +147 -0
- nexura_vectorstores-0.6.0/pyproject.toml +49 -0
- nexura_vectorstores-0.6.0/src/nexura_vectorstores/__init__.py +20 -0
- nexura_vectorstores-0.6.0/src/nexura_vectorstores/base.py +566 -0
- nexura_vectorstores-0.6.0/src/nexura_vectorstores/chroma.py +156 -0
- nexura_vectorstores-0.6.0/src/nexura_vectorstores/elastic.py +208 -0
- nexura_vectorstores-0.6.0/src/nexura_vectorstores/filters.py +139 -0
- nexura_vectorstores-0.6.0/src/nexura_vectorstores/milvus.py +167 -0
- nexura_vectorstores-0.6.0/src/nexura_vectorstores/pinecone.py +126 -0
- nexura_vectorstores-0.6.0/src/nexura_vectorstores/py.typed +0 -0
- nexura_vectorstores-0.6.0/src/nexura_vectorstores/weaviate.py +209 -0
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
# Python
|
|
2
|
+
__pycache__/
|
|
3
|
+
*.py[cod]
|
|
4
|
+
*$py.class
|
|
5
|
+
*.so
|
|
6
|
+
.Python
|
|
7
|
+
build/
|
|
8
|
+
develop-eggs/
|
|
9
|
+
dist/
|
|
10
|
+
downloads/
|
|
11
|
+
eggs/
|
|
12
|
+
.eggs/
|
|
13
|
+
lib/
|
|
14
|
+
lib64/
|
|
15
|
+
parts/
|
|
16
|
+
sdist/
|
|
17
|
+
var/
|
|
18
|
+
wheels/
|
|
19
|
+
*.egg-info/
|
|
20
|
+
.installed.cfg
|
|
21
|
+
*.egg
|
|
22
|
+
|
|
23
|
+
# Virtual environments
|
|
24
|
+
.venv/
|
|
25
|
+
venv/
|
|
26
|
+
ENV/
|
|
27
|
+
|
|
28
|
+
# Testing and linting
|
|
29
|
+
.pytest_cache/
|
|
30
|
+
.coverage
|
|
31
|
+
htmlcov/
|
|
32
|
+
.ruff_cache/
|
|
33
|
+
.mypy_cache/
|
|
34
|
+
|
|
35
|
+
# IDE
|
|
36
|
+
.idea/
|
|
37
|
+
.vscode/
|
|
38
|
+
*.swp
|
|
39
|
+
*.swo
|
|
40
|
+
|
|
41
|
+
# Local databases and run state (never commit)
|
|
42
|
+
*.sqlite3
|
|
43
|
+
*.sqlite3-shm
|
|
44
|
+
*.sqlite3-wal
|
|
45
|
+
/:memory:
|
|
46
|
+
.agy/
|
|
47
|
+
|
|
48
|
+
# Node / Studio build output
|
|
49
|
+
node_modules/
|
|
50
|
+
studio-web/dist/
|
|
51
|
+
clients/typescript/dist/
|
|
52
|
+
studio-web/test-results/
|
|
53
|
+
studio-web/playwright-report/
|
|
54
|
+
*.tgz
|
|
55
|
+
|
|
56
|
+
# Never commit (added 2026-10-18 before the first local git commit)
|
|
57
|
+
# Local databases, trigger encryption keys and other key material
|
|
58
|
+
*.db
|
|
59
|
+
*.key
|
|
60
|
+
*.sqlite3.trigger.key
|
|
61
|
+
.env
|
|
62
|
+
.env.*
|
|
63
|
+
!.env.example
|
|
64
|
+
*.pem
|
|
65
|
+
# Local run logs at the project root (gate, suite, browser)
|
|
66
|
+
*.log
|
|
67
|
+
.*.log
|
|
68
|
+
# Autopilot scratch (backups, repros, agent prompts); history lives in oss-completion-blueprint/
|
|
69
|
+
/.autopilot/
|
|
70
|
+
# Tool caches and local agent state
|
|
71
|
+
.mypy_cache/
|
|
72
|
+
.claude/
|
|
73
|
+
.playwright-mcp/
|
|
74
|
+
# Closed edition: its own nested local git repository, never part of this one
|
|
75
|
+
/enterprise/
|
|
76
|
+
# Internal review archive from the founder; not part of the public repository
|
|
77
|
+
/codex reviews/
|
|
78
|
+
# Demo-video recorder (local only; videos go to .autopilot)
|
|
79
|
+
studio-web/demos/
|
|
80
|
+
.gstack/
|
|
@@ -0,0 +1,202 @@
|
|
|
1
|
+
|
|
2
|
+
Apache License
|
|
3
|
+
Version 2.0, January 2004
|
|
4
|
+
http://www.apache.org/licenses/
|
|
5
|
+
|
|
6
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
7
|
+
|
|
8
|
+
1. Definitions.
|
|
9
|
+
|
|
10
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
|
11
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
|
12
|
+
|
|
13
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
|
14
|
+
the copyright owner that is granting the License.
|
|
15
|
+
|
|
16
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
|
17
|
+
other entities that control, are controlled by, or are under common
|
|
18
|
+
control with that entity. For the purposes of this definition,
|
|
19
|
+
"control" means (i) the power, direct or indirect, to cause the
|
|
20
|
+
direction or management of such entity, whether by contract or
|
|
21
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
22
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
23
|
+
|
|
24
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
|
25
|
+
exercising permissions granted by this License.
|
|
26
|
+
|
|
27
|
+
"Source" form shall mean the preferred form for making modifications,
|
|
28
|
+
including but not limited to software source code, documentation
|
|
29
|
+
source, and configuration files.
|
|
30
|
+
|
|
31
|
+
"Object" form shall mean any form resulting from mechanical
|
|
32
|
+
transformation or translation of a Source form, including but
|
|
33
|
+
not limited to compiled object code, generated documentation,
|
|
34
|
+
and conversions to other media types.
|
|
35
|
+
|
|
36
|
+
"Work" shall mean the work of authorship, whether in Source or
|
|
37
|
+
Object form, made available under the License, as indicated by a
|
|
38
|
+
copyright notice that is included in or attached to the work
|
|
39
|
+
(an example is provided in the Appendix below).
|
|
40
|
+
|
|
41
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
|
42
|
+
form, that is based on (or derived from) the Work and for which the
|
|
43
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
44
|
+
represent, as a whole, an original work of authorship. For the purposes
|
|
45
|
+
of this License, Derivative Works shall not include works that remain
|
|
46
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
|
47
|
+
the Work and Derivative Works thereof.
|
|
48
|
+
|
|
49
|
+
"Contribution" shall mean any work of authorship, including
|
|
50
|
+
the original version of the Work and any modifications or additions
|
|
51
|
+
to that Work or Derivative Works thereof, that is intentionally
|
|
52
|
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
53
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
|
54
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
|
55
|
+
means any form of electronic, verbal, or written communication sent
|
|
56
|
+
to the Licensor or its representatives, including but not limited to
|
|
57
|
+
communication on electronic mailing lists, source code control systems,
|
|
58
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
|
59
|
+
Licensor for the purpose of discussing and improving the Work, but
|
|
60
|
+
excluding communication that is conspicuously marked or otherwise
|
|
61
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
|
62
|
+
|
|
63
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
64
|
+
on behalf of whom a Contribution has been received by Licensor and
|
|
65
|
+
subsequently incorporated within the Work.
|
|
66
|
+
|
|
67
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
68
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
69
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
70
|
+
copyright license to reproduce, prepare Derivative Works of,
|
|
71
|
+
publicly display, publicly perform, sublicense, and distribute the
|
|
72
|
+
Work and such Derivative Works in Source or Object form.
|
|
73
|
+
|
|
74
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
|
75
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
76
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
77
|
+
(except as stated in this section) patent license to make, have made,
|
|
78
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
79
|
+
where such license applies only to those patent claims licensable
|
|
80
|
+
by such Contributor that are necessarily infringed by their
|
|
81
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
|
82
|
+
with the Work to which such Contribution(s) was submitted. If You
|
|
83
|
+
institute patent litigation against any entity (including a
|
|
84
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
85
|
+
or a Contribution incorporated within the Work constitutes direct
|
|
86
|
+
or contributory patent infringement, then any patent licenses
|
|
87
|
+
granted to You under this License for that Work shall terminate
|
|
88
|
+
as of the date such litigation is filed.
|
|
89
|
+
|
|
90
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
|
91
|
+
Work or Derivative Works thereof in any medium, with or without
|
|
92
|
+
modifications, and in Source or Object form, provided that You
|
|
93
|
+
meet the following conditions:
|
|
94
|
+
|
|
95
|
+
(a) You must give any other recipients of the Work or
|
|
96
|
+
Derivative Works a copy of this License; and
|
|
97
|
+
|
|
98
|
+
(b) You must cause any modified files to carry prominent notices
|
|
99
|
+
stating that You changed the files; and
|
|
100
|
+
|
|
101
|
+
(c) You must retain, in the Source form of any Derivative Works
|
|
102
|
+
that You distribute, all copyright, patent, trademark, and
|
|
103
|
+
attribution notices from the Source form of the Work,
|
|
104
|
+
excluding those notices that do not pertain to any part of
|
|
105
|
+
the Derivative Works; and
|
|
106
|
+
|
|
107
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
|
108
|
+
distribution, then any Derivative Works that You distribute must
|
|
109
|
+
include a readable copy of the attribution notices contained
|
|
110
|
+
within such NOTICE file, excluding those notices that do not
|
|
111
|
+
pertain to any part of the Derivative Works, in at least one
|
|
112
|
+
of the following places: within a NOTICE text file distributed
|
|
113
|
+
as part of the Derivative Works; within the Source form or
|
|
114
|
+
documentation, if provided along with the Derivative Works; or,
|
|
115
|
+
within a display generated by the Derivative Works, if and
|
|
116
|
+
wherever such third-party notices normally appear. The contents
|
|
117
|
+
of the NOTICE file are for informational purposes only and
|
|
118
|
+
do not modify the License. You may add Your own attribution
|
|
119
|
+
notices within Derivative Works that You distribute, alongside
|
|
120
|
+
or as an addendum to the NOTICE text from the Work, provided
|
|
121
|
+
that such additional attribution notices cannot be construed
|
|
122
|
+
as modifying the License.
|
|
123
|
+
|
|
124
|
+
You may add Your own copyright statement to Your modifications and
|
|
125
|
+
may provide additional or different license terms and conditions
|
|
126
|
+
for use, reproduction, or distribution of Your modifications, or
|
|
127
|
+
for any such Derivative Works as a whole, provided Your use,
|
|
128
|
+
reproduction, and distribution of the Work otherwise complies with
|
|
129
|
+
the conditions stated in this License.
|
|
130
|
+
|
|
131
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
132
|
+
any Contribution intentionally submitted for inclusion in the Work
|
|
133
|
+
by You to the Licensor shall be under the terms and conditions of
|
|
134
|
+
this License, without any additional terms or conditions.
|
|
135
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
|
136
|
+
the terms of any separate license agreement you may have executed
|
|
137
|
+
with Licensor regarding such Contributions.
|
|
138
|
+
|
|
139
|
+
6. Trademarks. This License does not grant permission to use the trade
|
|
140
|
+
names, trademarks, service marks, or product names of the Licensor,
|
|
141
|
+
except as required for reasonable and customary use in describing the
|
|
142
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
|
143
|
+
|
|
144
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
145
|
+
agreed to in writing, Licensor provides the Work (and each
|
|
146
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
147
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
148
|
+
implied, including, without limitation, any warranties or conditions
|
|
149
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
150
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
151
|
+
appropriateness of using or redistributing the Work and assume any
|
|
152
|
+
risks associated with Your exercise of permissions under this License.
|
|
153
|
+
|
|
154
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
|
155
|
+
whether in tort (including negligence), contract, or otherwise,
|
|
156
|
+
unless required by applicable law (such as deliberate and grossly
|
|
157
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
|
158
|
+
liable to You for damages, including any direct, indirect, special,
|
|
159
|
+
incidental, or consequential damages of any character arising as a
|
|
160
|
+
result of this License or out of the use or inability to use the
|
|
161
|
+
Work (including but not limited to damages for loss of goodwill,
|
|
162
|
+
work stoppage, computer failure or malfunction, or any and all
|
|
163
|
+
other commercial damages or losses), even if such Contributor
|
|
164
|
+
has been advised of the possibility of such damages.
|
|
165
|
+
|
|
166
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
|
167
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
|
168
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
169
|
+
or other liability obligations and/or rights consistent with this
|
|
170
|
+
License. However, in accepting such obligations, You may act only
|
|
171
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
|
172
|
+
of any other Contributor, and only if You agree to indemnify,
|
|
173
|
+
defend, and hold each Contributor harmless for any liability
|
|
174
|
+
incurred by, or claims asserted against, such Contributor by reason
|
|
175
|
+
of your accepting any such warranty or additional liability.
|
|
176
|
+
|
|
177
|
+
END OF TERMS AND CONDITIONS
|
|
178
|
+
|
|
179
|
+
APPENDIX: How to apply the Apache License to your work.
|
|
180
|
+
|
|
181
|
+
To apply the Apache License to your work, attach the following
|
|
182
|
+
boilerplate notice, with the fields enclosed by brackets "[]"
|
|
183
|
+
replaced with your own identifying information. (Don't include
|
|
184
|
+
the brackets!) The text should be enclosed in the appropriate
|
|
185
|
+
comment syntax for the file format. We also recommend that a
|
|
186
|
+
file or class name and description of purpose be included on the
|
|
187
|
+
same "printed page" as the copyright notice for easier
|
|
188
|
+
identification within third-party archives.
|
|
189
|
+
|
|
190
|
+
Copyright [yyyy] [name of copyright owner]
|
|
191
|
+
|
|
192
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
193
|
+
you may not use this file except in compliance with the License.
|
|
194
|
+
You may obtain a copy of the License at
|
|
195
|
+
|
|
196
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
197
|
+
|
|
198
|
+
Unless required by applicable law or agreed to in writing, software
|
|
199
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
200
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
201
|
+
See the License for the specific language governing permissions and
|
|
202
|
+
limitations under the License.
|
|
@@ -0,0 +1,173 @@
|
|
|
1
|
+
Metadata-Version: 2.5
|
|
2
|
+
Name: nexura-vectorstores
|
|
3
|
+
Version: 0.6.0
|
|
4
|
+
Summary: HTTP vector stores for Nexura: Chroma, Pinecone, Weaviate, Milvus, Elasticsearch and OpenSearch.
|
|
5
|
+
Project-URL: Homepage, https://github.com/Liceron/nexura
|
|
6
|
+
Project-URL: Documentation, https://github.com/Liceron/nexura/blob/main/docs/knowledge.md
|
|
7
|
+
Project-URL: Source, https://github.com/Liceron/nexura
|
|
8
|
+
Project-URL: Issues, https://github.com/Liceron/nexura/issues
|
|
9
|
+
Project-URL: Changelog, https://github.com/Liceron/nexura/blob/main/CHANGELOG.md
|
|
10
|
+
Author-email: Liceron <info@liceron.in>
|
|
11
|
+
License-Expression: Apache-2.0
|
|
12
|
+
License-File: LICENSE
|
|
13
|
+
License-File: NOTICE
|
|
14
|
+
Keywords: agents,rag,retrieval,vector-store
|
|
15
|
+
Classifier: Development Status :: 3 - Alpha
|
|
16
|
+
Classifier: Intended Audience :: Developers
|
|
17
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
18
|
+
Classifier: Topic :: Database
|
|
19
|
+
Classifier: Topic :: Software Development :: Libraries :: Python Modules
|
|
20
|
+
Classifier: Typing :: Typed
|
|
21
|
+
Requires-Python: <3.13,>=3.12
|
|
22
|
+
Requires-Dist: httpx<1,>=0.27
|
|
23
|
+
Requires-Dist: nexura-agents==0.6.0
|
|
24
|
+
Requires-Dist: nexura-runtime==0.6.0
|
|
25
|
+
Description-Content-Type: text/markdown
|
|
26
|
+
|
|
27
|
+
# nexura-vectorstores
|
|
28
|
+
|
|
29
|
+
HTTP adapters for Nexura's `VectorStore` protocol: Chroma, Pinecone, Weaviate,
|
|
30
|
+
Milvus/Zilliz, Elasticsearch and OpenSearch. Version 0.6.0, Apache-2.0, Liceron.
|
|
31
|
+
This new package is source-only until a separate release; nothing was published.
|
|
32
|
+
Dependencies: `nexura-runtime==0.6.0`, `nexura-agents==0.6.0`, `httpx>=0.27,<1`.
|
|
33
|
+
No vendor SDK, automatic embedding service, Docker or hosted control plane.
|
|
34
|
+
|
|
35
|
+
Install from this checkout:
|
|
36
|
+
|
|
37
|
+
```sh
|
|
38
|
+
pip install ./packages/nexura-agents . ./packages/nexura-vectorstores
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
| Database | Import from `nexura_vectorstores` | URL argument/environment (default) | Credential argument/environment |
|
|
42
|
+
|---|---|---|---|
|
|
43
|
+
| Chroma 1.x REST v2 | `ChromaVectorStore` | `NEXURA_CHROMA_URL` (`http://localhost:8000`) | `api_key` / `NEXURA_CHROMA_API_KEY` (Bearer) |
|
|
44
|
+
| Pinecone serverless/Local | `PineconeVectorStore` | `NEXURA_PINECONE_URL` (required, index data-plane URL) | `api_key` / `NEXURA_PINECONE_API_KEY` (`Api-Key`) |
|
|
45
|
+
| Weaviate 1.2x | `WeaviateVectorStore` | `NEXURA_WEAVIATE_URL` (`http://localhost:8080`) | `api_key` / `NEXURA_WEAVIATE_API_KEY` (Bearer) |
|
|
46
|
+
| Milvus 2.4+/Zilliz | `MilvusVectorStore` | `NEXURA_MILVUS_URL` (`http://localhost:19530`) | `api_key` / `NEXURA_MILVUS_TOKEN` (Bearer) |
|
|
47
|
+
| Elasticsearch 8.x | `ElasticsearchVectorStore` | `NEXURA_ELASTICSEARCH_URL` (`http://localhost:9200`) | `api_key` / `NEXURA_ELASTICSEARCH_API_KEY` (encoded ApiKey) |
|
|
48
|
+
| OpenSearch 2.x | `OpenSearchVectorStore` | `NEXURA_OPENSEARCH_URL` (`http://localhost:9200`) | `api_key` / `NEXURA_OPENSEARCH_TOKEN` (Bearer) |
|
|
49
|
+
|
|
50
|
+
All constructors accept `url`, `api_key`, `timeout=30.0`, and either
|
|
51
|
+
`transport=httpx.MockTransport(...)` or `client=httpx.AsyncClient(...)`.
|
|
52
|
+
An injected client remains owned by the caller. `aclose()` and the async context
|
|
53
|
+
manager close clients created by the adapter. Redirects are disabled on owned
|
|
54
|
+
clients. For cluster-specific authentication (for example OpenSearch basic auth),
|
|
55
|
+
pass a configured client. Credential-bearing URLs are rejected; response and
|
|
56
|
+
transport messages are excluded from raised errors. HTTP errors expose only
|
|
57
|
+
status and a sanitized database error code.
|
|
58
|
+
|
|
59
|
+
Configured-server example (no model calls; do not run without a disposable server):
|
|
60
|
+
|
|
61
|
+
```python
|
|
62
|
+
import asyncio
|
|
63
|
+
from nexura_vectorstores import ChromaVectorStore
|
|
64
|
+
from nexura_runtime.knowledge.vector.models import VectorRecord, VectorSearchQuery
|
|
65
|
+
|
|
66
|
+
|
|
67
|
+
async def main():
|
|
68
|
+
async with ChromaVectorStore() as store:
|
|
69
|
+
await store.create_collection("demo", "documents", dimensions=2)
|
|
70
|
+
await store.upsert(
|
|
71
|
+
"demo",
|
|
72
|
+
"documents",
|
|
73
|
+
[
|
|
74
|
+
VectorRecord(
|
|
75
|
+
id="one",
|
|
76
|
+
workspace_id="demo",
|
|
77
|
+
collection_id="documents",
|
|
78
|
+
generation_id="",
|
|
79
|
+
vector=[1.0, 0.0],
|
|
80
|
+
text="Local vector example",
|
|
81
|
+
metadata={"category": "guide"},
|
|
82
|
+
)
|
|
83
|
+
],
|
|
84
|
+
)
|
|
85
|
+
hits = await store.search(
|
|
86
|
+
"demo",
|
|
87
|
+
VectorSearchQuery(
|
|
88
|
+
workspace_id="demo",
|
|
89
|
+
collection_id="documents",
|
|
90
|
+
vector=[1.0, 0.0],
|
|
91
|
+
filter={"category": "guide"},
|
|
92
|
+
top_k=1,
|
|
93
|
+
),
|
|
94
|
+
)
|
|
95
|
+
print(hits[0].text)
|
|
96
|
+
|
|
97
|
+
|
|
98
|
+
asyncio.run(main())
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
Replace the constructor with any exported class. Chroma also accepts
|
|
102
|
+
`tenant="default_tenant", database="default_database"`; these must already exist.
|
|
103
|
+
Milvus accepts `db_name="default"`.
|
|
104
|
+
Pinecone requires a pre-provisioned index; set `dimensions=...` (default 1536)
|
|
105
|
+
and `metric="cosine" | "dot_product" | "euclidean"` to its actual configuration.
|
|
106
|
+
Pinecone namespaces cannot change dimension or metric. The data plane checks
|
|
107
|
+
dimensions but does not expose the provisioned metric.
|
|
108
|
+
|
|
109
|
+
All stores support cosine, dot product and Euclidean scoring (higher is better).
|
|
110
|
+
Elasticsearch dot product uses `max_inner_product`, requiring 8.11+; older
|
|
111
|
+
servers reject the mapping explicitly. OpenSearch uses the 2.x nmslib HNSW engine.
|
|
112
|
+
Stored vectors are used to recompute canonical Nexura scores, removing vendor
|
|
113
|
+
distance/squared-distance/positive-score differences.
|
|
114
|
+
|
|
115
|
+
Every collection has a durable manifest in its own hashed workspace/collection
|
|
116
|
+
space. Each generation has a separate space (Pinecone namespace).
|
|
117
|
+
Activation replaces the manifest once, publishing the pointer and statuses
|
|
118
|
+
together. Writes are serialized within an instance. **Coordinate writers across
|
|
119
|
+
processes externally**; there is no distributed CAS/transaction across these
|
|
120
|
+
HTTP APIs. Server consistency still applies, including Pinecone's eventual
|
|
121
|
+
visibility. Acknowledged indexing is not a global visibility barrier.
|
|
122
|
+
|
|
123
|
+
Like the current Qdrant adapter, active/building generations accept upserts;
|
|
124
|
+
retired/dropped generations reject them. Deletion is allowed in all generations
|
|
125
|
+
to propagate removal, with durable tombstones or physical deletion. Unknown
|
|
126
|
+
collections/generations raise on create-generation/upsert/activation and return
|
|
127
|
+
empty results for get/count/search/delete, following Qdrant.
|
|
128
|
+
|
|
129
|
+
Filters support `$and/$or`, equality, `$eq/$ne/$in/$nin`, numeric
|
|
130
|
+
`$gt/$gte/$lt/$lte`, and substring/list `$contains`. Safe positive scalar
|
|
131
|
+
conditions use native filters; Elasticsearch/OpenSearch also push down negative
|
|
132
|
+
conditions. Containment, JSON/null equality, string ordering and negative
|
|
133
|
+
missing-field semantics use over-fetch plus `matches_filter`. Typed, hashed
|
|
134
|
+
scalar projections prevent reserved-field/path injection and schema conflicts.
|
|
135
|
+
The canonical record JSON preserves arbitrary metadata and original timestamps.
|
|
136
|
+
|
|
137
|
+
Fully native filters on Pinecone, Milvus and Elasticsearch fetch just the requested
|
|
138
|
+
top_k, so those searches can address larger indexes. Chroma and Weaviate also do
|
|
139
|
+
this for unfiltered searches. For complete post-filter results, fallback searches
|
|
140
|
+
fetch at most **10,000 candidates** including tombstones; larger candidate pools
|
|
141
|
+
fail explicitly rather than silently under-fill results. OpenSearch's nmslib
|
|
142
|
+
outer filters always use this fallback. Chroma filters also use it because
|
|
143
|
+
upserts can retain stale scalar metadata projections. Pinecone exact counts have
|
|
144
|
+
the same bound. Requested top_k above the API candidate limit is also rejected.
|
|
145
|
+
This is a correctness-first adapter, not a large-index benchmark.
|
|
146
|
+
Vendor payload/metadata limits also apply (notably Pinecone's 40 KB metadata
|
|
147
|
+
limit and Milvus VARCHAR's 65,535 byte limit), including the manifest history.
|
|
148
|
+
|
|
149
|
+
Offline verification uses independent dict-backed `httpx.MockTransport` fakes:
|
|
150
|
+
|
|
151
|
+
```sh
|
|
152
|
+
.venv/bin/python -m pytest tests/vectorstores -q -p no:cacheprovider
|
|
153
|
+
```
|
|
154
|
+
|
|
155
|
+
The same conformance suite includes opt-in live cases. Set
|
|
156
|
+
`NEXURA_TEST_CHROMA_URL`, `NEXURA_TEST_WEAVIATE_URL`, `NEXURA_TEST_MILVUS_URL`,
|
|
157
|
+
`NEXURA_TEST_ELASTICSEARCH_URL`, `NEXURA_TEST_OPENSEARCH_URL`, or
|
|
158
|
+
`NEXURA_TEST_PINECONE_URL` plus `NEXURA_TEST_PINECONE_API_KEY`.
|
|
159
|
+
Other live credentials use `NEXURA_TEST_<DATABASE>_API_KEY` or `_TOKEN`.
|
|
160
|
+
Pinecone live tests use a two-dimensional index; set
|
|
161
|
+
`NEXURA_TEST_PINECONE_METRIC` to its metric (default cosine). Other metric cases
|
|
162
|
+
skip because a single index cannot support them. Use disposable servers: test
|
|
163
|
+
collections/namespaces have unique names and are retained for inspection.
|
|
164
|
+
Live servers were not contacted during this offline implementation.
|
|
165
|
+
|
|
166
|
+
API references for independent live review:
|
|
167
|
+
[Chroma](https://docs.trychroma.com/reference/chroma-api),
|
|
168
|
+
[Pinecone](https://docs.pinecone.io/reference/api/data-plane),
|
|
169
|
+
[Weaviate](https://docs.weaviate.io/weaviate/api/rest),
|
|
170
|
+
[Milvus](https://milvus.io/api-reference/restful/v2.4.x/About.md),
|
|
171
|
+
[Elasticsearch](https://www.elastic.co/guide/en/elasticsearch/reference/8.11/dense-vector.html),
|
|
172
|
+
[OpenSearch](https://docs.opensearch.org/docs/2.19/field-types/supported-field-types/knn-vector/).
|
|
173
|
+
These links were not fetched: the assignment prohibits network access.
|
|
@@ -0,0 +1,147 @@
|
|
|
1
|
+
# nexura-vectorstores
|
|
2
|
+
|
|
3
|
+
HTTP adapters for Nexura's `VectorStore` protocol: Chroma, Pinecone, Weaviate,
|
|
4
|
+
Milvus/Zilliz, Elasticsearch and OpenSearch. Version 0.6.0, Apache-2.0, Liceron.
|
|
5
|
+
This new package is source-only until a separate release; nothing was published.
|
|
6
|
+
Dependencies: `nexura-runtime==0.6.0`, `nexura-agents==0.6.0`, `httpx>=0.27,<1`.
|
|
7
|
+
No vendor SDK, automatic embedding service, Docker or hosted control plane.
|
|
8
|
+
|
|
9
|
+
Install from this checkout:
|
|
10
|
+
|
|
11
|
+
```sh
|
|
12
|
+
pip install ./packages/nexura-agents . ./packages/nexura-vectorstores
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
| Database | Import from `nexura_vectorstores` | URL argument/environment (default) | Credential argument/environment |
|
|
16
|
+
|---|---|---|---|
|
|
17
|
+
| Chroma 1.x REST v2 | `ChromaVectorStore` | `NEXURA_CHROMA_URL` (`http://localhost:8000`) | `api_key` / `NEXURA_CHROMA_API_KEY` (Bearer) |
|
|
18
|
+
| Pinecone serverless/Local | `PineconeVectorStore` | `NEXURA_PINECONE_URL` (required, index data-plane URL) | `api_key` / `NEXURA_PINECONE_API_KEY` (`Api-Key`) |
|
|
19
|
+
| Weaviate 1.2x | `WeaviateVectorStore` | `NEXURA_WEAVIATE_URL` (`http://localhost:8080`) | `api_key` / `NEXURA_WEAVIATE_API_KEY` (Bearer) |
|
|
20
|
+
| Milvus 2.4+/Zilliz | `MilvusVectorStore` | `NEXURA_MILVUS_URL` (`http://localhost:19530`) | `api_key` / `NEXURA_MILVUS_TOKEN` (Bearer) |
|
|
21
|
+
| Elasticsearch 8.x | `ElasticsearchVectorStore` | `NEXURA_ELASTICSEARCH_URL` (`http://localhost:9200`) | `api_key` / `NEXURA_ELASTICSEARCH_API_KEY` (encoded ApiKey) |
|
|
22
|
+
| OpenSearch 2.x | `OpenSearchVectorStore` | `NEXURA_OPENSEARCH_URL` (`http://localhost:9200`) | `api_key` / `NEXURA_OPENSEARCH_TOKEN` (Bearer) |
|
|
23
|
+
|
|
24
|
+
All constructors accept `url`, `api_key`, `timeout=30.0`, and either
|
|
25
|
+
`transport=httpx.MockTransport(...)` or `client=httpx.AsyncClient(...)`.
|
|
26
|
+
An injected client remains owned by the caller. `aclose()` and the async context
|
|
27
|
+
manager close clients created by the adapter. Redirects are disabled on owned
|
|
28
|
+
clients. For cluster-specific authentication (for example OpenSearch basic auth),
|
|
29
|
+
pass a configured client. Credential-bearing URLs are rejected; response and
|
|
30
|
+
transport messages are excluded from raised errors. HTTP errors expose only
|
|
31
|
+
status and a sanitized database error code.
|
|
32
|
+
|
|
33
|
+
Configured-server example (no model calls; do not run without a disposable server):
|
|
34
|
+
|
|
35
|
+
```python
|
|
36
|
+
import asyncio
|
|
37
|
+
from nexura_vectorstores import ChromaVectorStore
|
|
38
|
+
from nexura_runtime.knowledge.vector.models import VectorRecord, VectorSearchQuery
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
async def main():
|
|
42
|
+
async with ChromaVectorStore() as store:
|
|
43
|
+
await store.create_collection("demo", "documents", dimensions=2)
|
|
44
|
+
await store.upsert(
|
|
45
|
+
"demo",
|
|
46
|
+
"documents",
|
|
47
|
+
[
|
|
48
|
+
VectorRecord(
|
|
49
|
+
id="one",
|
|
50
|
+
workspace_id="demo",
|
|
51
|
+
collection_id="documents",
|
|
52
|
+
generation_id="",
|
|
53
|
+
vector=[1.0, 0.0],
|
|
54
|
+
text="Local vector example",
|
|
55
|
+
metadata={"category": "guide"},
|
|
56
|
+
)
|
|
57
|
+
],
|
|
58
|
+
)
|
|
59
|
+
hits = await store.search(
|
|
60
|
+
"demo",
|
|
61
|
+
VectorSearchQuery(
|
|
62
|
+
workspace_id="demo",
|
|
63
|
+
collection_id="documents",
|
|
64
|
+
vector=[1.0, 0.0],
|
|
65
|
+
filter={"category": "guide"},
|
|
66
|
+
top_k=1,
|
|
67
|
+
),
|
|
68
|
+
)
|
|
69
|
+
print(hits[0].text)
|
|
70
|
+
|
|
71
|
+
|
|
72
|
+
asyncio.run(main())
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
Replace the constructor with any exported class. Chroma also accepts
|
|
76
|
+
`tenant="default_tenant", database="default_database"`; these must already exist.
|
|
77
|
+
Milvus accepts `db_name="default"`.
|
|
78
|
+
Pinecone requires a pre-provisioned index; set `dimensions=...` (default 1536)
|
|
79
|
+
and `metric="cosine" | "dot_product" | "euclidean"` to its actual configuration.
|
|
80
|
+
Pinecone namespaces cannot change dimension or metric. The data plane checks
|
|
81
|
+
dimensions but does not expose the provisioned metric.
|
|
82
|
+
|
|
83
|
+
All stores support cosine, dot product and Euclidean scoring (higher is better).
|
|
84
|
+
Elasticsearch dot product uses `max_inner_product`, requiring 8.11+; older
|
|
85
|
+
servers reject the mapping explicitly. OpenSearch uses the 2.x nmslib HNSW engine.
|
|
86
|
+
Stored vectors are used to recompute canonical Nexura scores, removing vendor
|
|
87
|
+
distance/squared-distance/positive-score differences.
|
|
88
|
+
|
|
89
|
+
Every collection has a durable manifest in its own hashed workspace/collection
|
|
90
|
+
space. Each generation has a separate space (Pinecone namespace).
|
|
91
|
+
Activation replaces the manifest once, publishing the pointer and statuses
|
|
92
|
+
together. Writes are serialized within an instance. **Coordinate writers across
|
|
93
|
+
processes externally**; there is no distributed CAS/transaction across these
|
|
94
|
+
HTTP APIs. Server consistency still applies, including Pinecone's eventual
|
|
95
|
+
visibility. Acknowledged indexing is not a global visibility barrier.
|
|
96
|
+
|
|
97
|
+
Like the current Qdrant adapter, active/building generations accept upserts;
|
|
98
|
+
retired/dropped generations reject them. Deletion is allowed in all generations
|
|
99
|
+
to propagate removal, with durable tombstones or physical deletion. Unknown
|
|
100
|
+
collections/generations raise on create-generation/upsert/activation and return
|
|
101
|
+
empty results for get/count/search/delete, following Qdrant.
|
|
102
|
+
|
|
103
|
+
Filters support `$and/$or`, equality, `$eq/$ne/$in/$nin`, numeric
|
|
104
|
+
`$gt/$gte/$lt/$lte`, and substring/list `$contains`. Safe positive scalar
|
|
105
|
+
conditions use native filters; Elasticsearch/OpenSearch also push down negative
|
|
106
|
+
conditions. Containment, JSON/null equality, string ordering and negative
|
|
107
|
+
missing-field semantics use over-fetch plus `matches_filter`. Typed, hashed
|
|
108
|
+
scalar projections prevent reserved-field/path injection and schema conflicts.
|
|
109
|
+
The canonical record JSON preserves arbitrary metadata and original timestamps.
|
|
110
|
+
|
|
111
|
+
Fully native filters on Pinecone, Milvus and Elasticsearch fetch just the requested
|
|
112
|
+
top_k, so those searches can address larger indexes. Chroma and Weaviate also do
|
|
113
|
+
this for unfiltered searches. For complete post-filter results, fallback searches
|
|
114
|
+
fetch at most **10,000 candidates** including tombstones; larger candidate pools
|
|
115
|
+
fail explicitly rather than silently under-fill results. OpenSearch's nmslib
|
|
116
|
+
outer filters always use this fallback. Chroma filters also use it because
|
|
117
|
+
upserts can retain stale scalar metadata projections. Pinecone exact counts have
|
|
118
|
+
the same bound. Requested top_k above the API candidate limit is also rejected.
|
|
119
|
+
This is a correctness-first adapter, not a large-index benchmark.
|
|
120
|
+
Vendor payload/metadata limits also apply (notably Pinecone's 40 KB metadata
|
|
121
|
+
limit and Milvus VARCHAR's 65,535 byte limit), including the manifest history.
|
|
122
|
+
|
|
123
|
+
Offline verification uses independent dict-backed `httpx.MockTransport` fakes:
|
|
124
|
+
|
|
125
|
+
```sh
|
|
126
|
+
.venv/bin/python -m pytest tests/vectorstores -q -p no:cacheprovider
|
|
127
|
+
```
|
|
128
|
+
|
|
129
|
+
The same conformance suite includes opt-in live cases. Set
|
|
130
|
+
`NEXURA_TEST_CHROMA_URL`, `NEXURA_TEST_WEAVIATE_URL`, `NEXURA_TEST_MILVUS_URL`,
|
|
131
|
+
`NEXURA_TEST_ELASTICSEARCH_URL`, `NEXURA_TEST_OPENSEARCH_URL`, or
|
|
132
|
+
`NEXURA_TEST_PINECONE_URL` plus `NEXURA_TEST_PINECONE_API_KEY`.
|
|
133
|
+
Other live credentials use `NEXURA_TEST_<DATABASE>_API_KEY` or `_TOKEN`.
|
|
134
|
+
Pinecone live tests use a two-dimensional index; set
|
|
135
|
+
`NEXURA_TEST_PINECONE_METRIC` to its metric (default cosine). Other metric cases
|
|
136
|
+
skip because a single index cannot support them. Use disposable servers: test
|
|
137
|
+
collections/namespaces have unique names and are retained for inspection.
|
|
138
|
+
Live servers were not contacted during this offline implementation.
|
|
139
|
+
|
|
140
|
+
API references for independent live review:
|
|
141
|
+
[Chroma](https://docs.trychroma.com/reference/chroma-api),
|
|
142
|
+
[Pinecone](https://docs.pinecone.io/reference/api/data-plane),
|
|
143
|
+
[Weaviate](https://docs.weaviate.io/weaviate/api/rest),
|
|
144
|
+
[Milvus](https://milvus.io/api-reference/restful/v2.4.x/About.md),
|
|
145
|
+
[Elasticsearch](https://www.elastic.co/guide/en/elasticsearch/reference/8.11/dense-vector.html),
|
|
146
|
+
[OpenSearch](https://docs.opensearch.org/docs/2.19/field-types/supported-field-types/knn-vector/).
|
|
147
|
+
These links were not fetched: the assignment prohibits network access.
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
# SPDX-License-Identifier: Apache-2.0
|
|
2
|
+
# Copyright (c) 2026 Liceron
|
|
3
|
+
[project]
|
|
4
|
+
name = "nexura-vectorstores"
|
|
5
|
+
version = "0.6.0"
|
|
6
|
+
description = "HTTP vector stores for Nexura: Chroma, Pinecone, Weaviate, Milvus, Elasticsearch and OpenSearch."
|
|
7
|
+
readme = "README.md"
|
|
8
|
+
requires-python = ">=3.12,<3.13"
|
|
9
|
+
license = "Apache-2.0"
|
|
10
|
+
license-files = ["LICENSE", "NOTICE"]
|
|
11
|
+
authors = [{ name = "Liceron", email = "info@liceron.in" }]
|
|
12
|
+
keywords = ["agents", "rag", "vector-store", "retrieval"]
|
|
13
|
+
classifiers = [
|
|
14
|
+
"Development Status :: 3 - Alpha",
|
|
15
|
+
"Intended Audience :: Developers",
|
|
16
|
+
"Programming Language :: Python :: 3.12",
|
|
17
|
+
"Topic :: Database",
|
|
18
|
+
"Topic :: Software Development :: Libraries :: Python Modules",
|
|
19
|
+
"Typing :: Typed",
|
|
20
|
+
]
|
|
21
|
+
dependencies = ["nexura-runtime==0.6.0", "nexura-agents==0.6.0", "httpx>=0.27,<1"]
|
|
22
|
+
|
|
23
|
+
[project.urls]
|
|
24
|
+
Homepage = "https://github.com/Liceron/nexura"
|
|
25
|
+
Documentation = "https://github.com/Liceron/nexura/blob/main/docs/knowledge.md"
|
|
26
|
+
Source = "https://github.com/Liceron/nexura"
|
|
27
|
+
Issues = "https://github.com/Liceron/nexura/issues"
|
|
28
|
+
Changelog = "https://github.com/Liceron/nexura/blob/main/CHANGELOG.md"
|
|
29
|
+
|
|
30
|
+
[tool.uv.sources]
|
|
31
|
+
nexura-runtime = { workspace = true }
|
|
32
|
+
nexura-agents = { workspace = true }
|
|
33
|
+
|
|
34
|
+
[build-system]
|
|
35
|
+
requires = ["hatchling"]
|
|
36
|
+
build-backend = "hatchling.build"
|
|
37
|
+
|
|
38
|
+
[tool.hatch.build.targets.wheel]
|
|
39
|
+
packages = ["src/nexura_vectorstores"]
|
|
40
|
+
|
|
41
|
+
[tool.hatch.build]
|
|
42
|
+
dev-mode-dirs = ["src"]
|
|
43
|
+
|
|
44
|
+
[tool.hatch.build.targets.sdist]
|
|
45
|
+
include = ["/src", "/README.md", "/LICENSE", "/NOTICE", "/pyproject.toml"]
|
|
46
|
+
exclude = [
|
|
47
|
+
"**/__pycache__", "**/*.pyc",
|
|
48
|
+
"**/*blueprint*/**", "**/internal/**", "**/product/**", "**/.autopilot/**",
|
|
49
|
+
]
|