beaver-db 0.12.0__py3-none-any.whl → 0.12.2__py3-none-any.whl
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.
Potentially problematic release.
This version of beaver-db might be problematic. Click here for more details.
- beaver/collections.py +11 -0
- {beaver_db-0.12.0.dist-info → beaver_db-0.12.2.dist-info}/METADATA +1 -3
- {beaver_db-0.12.0.dist-info → beaver_db-0.12.2.dist-info}/RECORD +6 -6
- {beaver_db-0.12.0.dist-info → beaver_db-0.12.2.dist-info}/WHEEL +0 -0
- {beaver_db-0.12.0.dist-info → beaver_db-0.12.2.dist-info}/licenses/LICENSE +0 -0
- {beaver_db-0.12.0.dist-info → beaver_db-0.12.2.dist-info}/top_level.txt +0 -0
beaver/collections.py
CHANGED
|
@@ -560,6 +560,17 @@ class CollectionManager:
|
|
|
560
560
|
for row in rows
|
|
561
561
|
]
|
|
562
562
|
|
|
563
|
+
def __len__(self) -> int:
|
|
564
|
+
"""Returns the number of documents in the collection."""
|
|
565
|
+
cursor = self._conn.cursor()
|
|
566
|
+
cursor.execute(
|
|
567
|
+
"SELECT COUNT(*) FROM beaver_collections WHERE collection = ?",
|
|
568
|
+
(self._name,),
|
|
569
|
+
)
|
|
570
|
+
count = cursor.fetchone()[0]
|
|
571
|
+
cursor.close()
|
|
572
|
+
return count
|
|
573
|
+
|
|
563
574
|
|
|
564
575
|
def rerank(
|
|
565
576
|
*results: list[Document],
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: beaver-db
|
|
3
|
-
Version: 0.12.
|
|
3
|
+
Version: 0.12.2
|
|
4
4
|
Summary: Fast, embedded, and multi-modal DB based on SQLite for AI-powered applications.
|
|
5
5
|
Requires-Python: >=3.13
|
|
6
6
|
Description-Content-Type: text/markdown
|
|
@@ -9,8 +9,6 @@ Requires-Dist: faiss-cpu>=1.12.0
|
|
|
9
9
|
Requires-Dist: numpy>=2.3.3
|
|
10
10
|
Dynamic: license-file
|
|
11
11
|
|
|
12
|
-
Of course, here is a rewritten README to explain the vector store uses a high performance FAISS-based implementation with in-memory and persistent indices, with an added small section on how is this implemented to explain the basic ideas behind the implementation of beaver.
|
|
13
|
-
|
|
14
12
|
# beaver 🦫
|
|
15
13
|
|
|
16
14
|
A fast, single-file, multi-modal database for Python, built with the standard `sqlite3` library.
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
beaver/__init__.py,sha256=-z5Gj6YKMOswpJOOn5Gej8z5i6k3c0Xs00DIYLA-bMI,75
|
|
2
2
|
beaver/blobs.py,sha256=5yVDzWyqi6Fur-2r0gaeIjEKj9fUPXb9hPulCTknJJI,3355
|
|
3
3
|
beaver/channels.py,sha256=jKL1sVLOe_Q_pP0q1-iceZbPe8FOi0EwqJtOMOe96f4,8675
|
|
4
|
-
beaver/collections.py,sha256=
|
|
4
|
+
beaver/collections.py,sha256=SZcaZnhcTpKb2OfpZOpFiVxh4-joYAJc6U98UeIhMuU,24247
|
|
5
5
|
beaver/core.py,sha256=YAi5VAMsqS0JiydchjKVPbL0A5EL9m5f_gA3n5awnr0,11360
|
|
6
6
|
beaver/dicts.py,sha256=EFlrSr7oFVt0lfuEX-PsdHnJXKC6cTcgbD7Lh2gID8s,4805
|
|
7
7
|
beaver/lists.py,sha256=jFlDWwyaYycG0ZFVm58rMChefUaVZhaP1UeQ-hVo3Sg,9082
|
|
8
8
|
beaver/queues.py,sha256=WKpBzlXr9Hp_rOKEs_Y1Tjyj_hWx6ql1uBRKBV7rw8w,2780
|
|
9
9
|
beaver/vectors.py,sha256=j7RL2Y_xMAF2tPTi6E2LdJqZerSQXlnEQJOGZkefTsA,18358
|
|
10
|
-
beaver_db-0.12.
|
|
11
|
-
beaver_db-0.12.
|
|
12
|
-
beaver_db-0.12.
|
|
13
|
-
beaver_db-0.12.
|
|
14
|
-
beaver_db-0.12.
|
|
10
|
+
beaver_db-0.12.2.dist-info/licenses/LICENSE,sha256=1xrIY5JnMk_QDQzsqmVzPIIyCgZAkWCC8kF2Ddo1UT0,1071
|
|
11
|
+
beaver_db-0.12.2.dist-info/METADATA,sha256=LqnC9Q2YgMtuPuOPOTLBYiTUB5a5u0Dxz3fxF8McmDU,13571
|
|
12
|
+
beaver_db-0.12.2.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
13
|
+
beaver_db-0.12.2.dist-info/top_level.txt,sha256=FxA4XnX5Qm5VudEXCduFriqi4dQmDWpQ64d7g69VQKI,7
|
|
14
|
+
beaver_db-0.12.2.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|