beaver-db 0.16.4__py3-none-any.whl → 0.16.6__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/channels.py +10 -0
- {beaver_db-0.16.4.dist-info → beaver_db-0.16.6.dist-info}/METADATA +16 -7
- {beaver_db-0.16.4.dist-info → beaver_db-0.16.6.dist-info}/RECORD +5 -6
- {beaver_db-0.16.4.dist-info → beaver_db-0.16.6.dist-info}/WHEEL +1 -2
- beaver_db-0.16.4.dist-info/top_level.txt +0 -1
- {beaver_db-0.16.4.dist-info → beaver_db-0.16.6.dist-info}/licenses/LICENSE +0 -0
beaver/channels.py
CHANGED
|
@@ -190,6 +190,16 @@ class ChannelManager[T]:
|
|
|
190
190
|
|
|
191
191
|
self._listeners.clear()
|
|
192
192
|
|
|
193
|
+
def prune(self):
|
|
194
|
+
"""
|
|
195
|
+
Cleans the log history for the channel effectively
|
|
196
|
+
deleting all previous logs.
|
|
197
|
+
|
|
198
|
+
Useful for reducing the database once logs are not needed.
|
|
199
|
+
"""
|
|
200
|
+
with self._conn:
|
|
201
|
+
self._conn.execute("DELETE FROM beaver_pubsub_log WHERE channel_name = ?", (self._name,))
|
|
202
|
+
|
|
193
203
|
def _polling_loop(self):
|
|
194
204
|
"""
|
|
195
205
|
The main loop for the background thread.
|
|
@@ -1,16 +1,17 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: beaver-db
|
|
3
|
-
Version: 0.16.
|
|
3
|
+
Version: 0.16.6
|
|
4
4
|
Summary: Fast, embedded, and multi-modal DB based on SQLite for AI-powered applications.
|
|
5
|
-
|
|
5
|
+
License-File: LICENSE
|
|
6
6
|
Classifier: License :: OSI Approved :: MIT License
|
|
7
7
|
Classifier: Operating System :: OS Independent
|
|
8
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
8
9
|
Classifier: Topic :: Database
|
|
9
10
|
Classifier: Topic :: Software Development :: Libraries :: Application Frameworks
|
|
10
11
|
Requires-Python: >=3.13
|
|
12
|
+
Provides-Extra: faiss
|
|
13
|
+
Requires-Dist: faiss-cpu>=1.12.0; extra == 'faiss'
|
|
11
14
|
Description-Content-Type: text/markdown
|
|
12
|
-
License-File: LICENSE
|
|
13
|
-
Dynamic: license-file
|
|
14
15
|
|
|
15
16
|
# beaver 🦫
|
|
16
17
|
|
|
@@ -29,11 +30,11 @@ A fast, single-file, multi-modal database for Python, built with the standard `s
|
|
|
29
30
|
|
|
30
31
|
`beaver` is built with a minimalistic philosophy for small, local use cases where a full-blown database server would be overkill.
|
|
31
32
|
|
|
32
|
-
- **Minimalistic**:
|
|
33
|
+
- **Minimalistic**: The core library has zero external dependencies. Vector search capabilities, which require `numpy` and `faiss-cpu`, are available as an optional feature.
|
|
33
34
|
- **Schemaless**: Flexible data storage without rigid schemas across all modalities.
|
|
34
35
|
- **Synchronous, Multi-Process, and Thread-Safe**: Designed for simplicity and safety in multi-threaded and multi-process environments.
|
|
35
36
|
- **Built for Local Applications**: Perfect for local AI tools, RAG prototypes, chatbots, and desktop utilities that need persistent, structured data without network overhead.
|
|
36
|
-
- **Fast by Default**: It's built on SQLite, which is famously fast and reliable for local applications. Vector search is accelerated with a high-performance, persistent `faiss` index.
|
|
37
|
+
- **Fast by Default**: It's built on SQLite, which is famously fast and reliable for local applications. Vector search is an optional feature accelerated with a high-performance, persistent `faiss` index.
|
|
37
38
|
- **Standard Relational Interface**: While `beaver` provides high-level features, you can always use the same SQLite file for normal relational tasks with standard SQL.
|
|
38
39
|
|
|
39
40
|
## Core Features
|
|
@@ -44,7 +45,7 @@ A fast, single-file, multi-modal database for Python, built with the standard `s
|
|
|
44
45
|
- **Persistent Priority Queue**: A high-performance, persistent priority queue perfect for task orchestration across multiple processes. Also with optional async support.
|
|
45
46
|
- **Time-Indexed Log for Monitoring**: A specialized data structure for structured, time-series logs. Query historical data by time range or create a live, aggregated view of the most recent events for real-time dashboards.
|
|
46
47
|
- **Simple Blob Storage**: A dictionary-like interface for storing medium-sized binary files (like PDFs or images) directly in the database, ensuring transactional integrity with your other data.
|
|
47
|
-
- **High-Performance Vector Storage & Search**: Store vector embeddings and perform fast
|
|
48
|
+
- **High-Performance Vector Storage & Search (Optional)**: Store vector embeddings and perform fast approximate nearest neighbor searches using a `faiss`-based hybrid index.
|
|
48
49
|
- **Full-Text and Fuzzy Search**: Automatically index and search through document metadata using SQLite's powerful FTS5 engine, enhanced with optional fuzzy search for typo-tolerant matching.
|
|
49
50
|
- **Knowledge Graph**: Create relationships between documents and traverse the graph to find neighbors or perform multi-hop walks.
|
|
50
51
|
- **Single-File & Portable**: All data is stored in a single SQLite file, making it incredibly easy to move, back up, or embed in your application.
|
|
@@ -69,10 +70,18 @@ This hybrid approach allows BeaverDB to provide a vector search experience that
|
|
|
69
70
|
|
|
70
71
|
## Installation
|
|
71
72
|
|
|
73
|
+
Install the core, dependency-free library:
|
|
74
|
+
|
|
72
75
|
```bash
|
|
73
76
|
pip install beaver-db
|
|
74
77
|
```
|
|
75
78
|
|
|
79
|
+
If you want vector search capabilities, install the `faiss` extra:
|
|
80
|
+
|
|
81
|
+
```bash
|
|
82
|
+
pip install "beaver-db[faiss]"
|
|
83
|
+
```
|
|
84
|
+
|
|
76
85
|
## Quickstart
|
|
77
86
|
|
|
78
87
|
Get up and running in 30 seconds. This example showcases a dictionary, a list, and full-text search in a single script.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
beaver/__init__.py,sha256=qyEzF1Os7w4b4Hijgz0Y0R4zTrRBrHIGT1mEkZFl2YM,101
|
|
2
2
|
beaver/blobs.py,sha256=5cmcvlJLY9jaftIRuNbdEryZxI47sw_pYpysYli23NY,3996
|
|
3
|
-
beaver/channels.py,sha256=
|
|
3
|
+
beaver/channels.py,sha256=VBXJDw_be-bSY76kRVzFdMZFoy4CepSMwJACc9NJgpc,9658
|
|
4
4
|
beaver/collections.py,sha256=860bYpchokjleDIebJaNU1jcGTCMIbg0t4MasEVVbOk,24486
|
|
5
5
|
beaver/core.py,sha256=t_UzpqcbF2U8BjmQ9aIWTvUzPuVuOLcPzTrZQ2htjn4,13706
|
|
6
6
|
beaver/dicts.py,sha256=1BQ9A_cMkJ7l5ayWbDG-4Wi3WtQ-9BKd7Wj_CB7dGlU,5410
|
|
@@ -9,8 +9,7 @@ beaver/logs.py,sha256=mlJizZU0emlqLwuNeBJSPlict35Vyi35L4eIl5orv-M,9673
|
|
|
9
9
|
beaver/queues.py,sha256=IQoeNhcYrVZTuH_4bWhtiEa-EYbFx_2iVKkR254XPnE,5953
|
|
10
10
|
beaver/types.py,sha256=bR1bfLgemcySy9mnVL_hxAtog4wN8EmgfF2OonOWjQA,1464
|
|
11
11
|
beaver/vectors.py,sha256=grwiRdusa39s-J9c8nK8LO7duhuYTaLR2Az6wHKs4rU,18487
|
|
12
|
-
beaver_db-0.16.
|
|
13
|
-
beaver_db-0.16.
|
|
14
|
-
beaver_db-0.16.
|
|
15
|
-
beaver_db-0.16.
|
|
16
|
-
beaver_db-0.16.4.dist-info/RECORD,,
|
|
12
|
+
beaver_db-0.16.6.dist-info/METADATA,sha256=8SDSyQv8WgaEmMXIzWLvSr8EoQjj82457-rdINHnprY,18068
|
|
13
|
+
beaver_db-0.16.6.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
|
14
|
+
beaver_db-0.16.6.dist-info/licenses/LICENSE,sha256=1xrIY5JnMk_QDQzsqmVzPIIyCgZAkWCC8kF2Ddo1UT0,1071
|
|
15
|
+
beaver_db-0.16.6.dist-info/RECORD,,
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
beaver
|
|
File without changes
|