beaver-db 0.20.2__tar.gz → 0.21.1__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.
Potentially problematic release.
This version of beaver-db might be problematic. Click here for more details.
- beaver_db-0.20.2/README.md → beaver_db-0.21.1/PKG-INFO +23 -8
- beaver_db-0.20.2/PKG-INFO → beaver_db-0.21.1/README.md +1 -33
- {beaver_db-0.20.2 → beaver_db-0.21.1}/beaver/__init__.py +1 -1
- beaver_db-0.21.1/issues/14-deprecate-fire-based-cli-and-build-a-feature-rich-typer-and-rich-cli.md +114 -0
- {beaver_db-0.20.2 → beaver_db-0.21.1}/pyproject.toml +6 -3
- beaver_db-0.21.1/uv.lock +929 -0
- beaver_db-0.20.2/uv.lock +0 -881
- {beaver_db-0.20.2 → beaver_db-0.21.1}/.dockerignore +0 -0
- {beaver_db-0.20.2 → beaver_db-0.21.1}/.gitignore +0 -0
- {beaver_db-0.20.2 → beaver_db-0.21.1}/.python-version +0 -0
- {beaver_db-0.20.2 → beaver_db-0.21.1}/LICENSE +0 -0
- {beaver_db-0.20.2 → beaver_db-0.21.1}/beaver/blobs.py +0 -0
- {beaver_db-0.20.2 → beaver_db-0.21.1}/beaver/channels.py +0 -0
- {beaver_db-0.20.2 → beaver_db-0.21.1}/beaver/cli.py +0 -0
- {beaver_db-0.20.2 → beaver_db-0.21.1}/beaver/client.py +0 -0
- {beaver_db-0.20.2 → beaver_db-0.21.1}/beaver/collections.py +0 -0
- {beaver_db-0.20.2 → beaver_db-0.21.1}/beaver/core.py +0 -0
- {beaver_db-0.20.2 → beaver_db-0.21.1}/beaver/dicts.py +0 -0
- {beaver_db-0.20.2 → beaver_db-0.21.1}/beaver/lists.py +0 -0
- {beaver_db-0.20.2 → beaver_db-0.21.1}/beaver/locks.py +0 -0
- {beaver_db-0.20.2 → beaver_db-0.21.1}/beaver/logs.py +0 -0
- {beaver_db-0.20.2 → beaver_db-0.21.1}/beaver/queues.py +0 -0
- {beaver_db-0.20.2 → beaver_db-0.21.1}/beaver/server.py +0 -0
- {beaver_db-0.20.2 → beaver_db-0.21.1}/beaver/types.py +0 -0
- {beaver_db-0.20.2 → beaver_db-0.21.1}/beaver/vectors.py +0 -0
- {beaver_db-0.20.2 → beaver_db-0.21.1}/design.md +0 -0
- {beaver_db-0.20.2 → beaver_db-0.21.1}/dockerfile +0 -0
- {beaver_db-0.20.2 → beaver_db-0.21.1}/docs/.gitignore +0 -0
- {beaver_db-0.20.2 → beaver_db-0.21.1}/docs/.quarto/cites/index.json +0 -0
- {beaver_db-0.20.2 → beaver_db-0.21.1}/docs/.quarto/idx/dev-architecture.qmd.json +0 -0
- {beaver_db-0.20.2 → beaver_db-0.21.1}/docs/.quarto/idx/dev-concurrency.qmd.json +0 -0
- {beaver_db-0.20.2 → beaver_db-0.21.1}/docs/.quarto/idx/dev-contributing.qmd.json +0 -0
- {beaver_db-0.20.2 → beaver_db-0.21.1}/docs/.quarto/idx/dev-search.qmd.json +0 -0
- {beaver_db-0.20.2 → beaver_db-0.21.1}/docs/.quarto/idx/guide-collections.qmd.json +0 -0
- {beaver_db-0.20.2 → beaver_db-0.21.1}/docs/.quarto/idx/guide-concurrency.qmd.json +0 -0
- {beaver_db-0.20.2 → beaver_db-0.21.1}/docs/.quarto/idx/guide-deployment.qmd.json +0 -0
- {beaver_db-0.20.2 → beaver_db-0.21.1}/docs/.quarto/idx/guide-dicts-blobs.qmd.json +0 -0
- {beaver_db-0.20.2 → beaver_db-0.21.1}/docs/.quarto/idx/guide-lists-queues.qmd.json +0 -0
- {beaver_db-0.20.2 → beaver_db-0.21.1}/docs/.quarto/idx/guide-realtime.qmd.json +0 -0
- {beaver_db-0.20.2 → beaver_db-0.21.1}/docs/.quarto/idx/index.qmd.json +0 -0
- {beaver_db-0.20.2 → beaver_db-0.21.1}/docs/.quarto/idx/quickstart.qmd.json +0 -0
- {beaver_db-0.20.2 → beaver_db-0.21.1}/docs/.quarto/project-cache/08c652dc55400ed7625e092b14557eff +0 -0
- {beaver_db-0.20.2 → beaver_db-0.21.1}/docs/.quarto/project-cache/78e7cce51608b23bc20ef50628d80ee9 +0 -0
- {beaver_db-0.20.2 → beaver_db-0.21.1}/docs/.quarto/project-cache/deno-kv-file +0 -0
- {beaver_db-0.20.2 → beaver_db-0.21.1}/docs/.quarto/project-cache/efb0c620c38ca7c31075f463c90f647b +0 -0
- {beaver_db-0.20.2 → beaver_db-0.21.1}/docs/.quarto/xref/1e84074e +0 -0
- {beaver_db-0.20.2 → beaver_db-0.21.1}/docs/.quarto/xref/41b07c8e +0 -0
- {beaver_db-0.20.2 → beaver_db-0.21.1}/docs/.quarto/xref/4a9bbebe +0 -0
- {beaver_db-0.20.2 → beaver_db-0.21.1}/docs/.quarto/xref/57337df9 +0 -0
- {beaver_db-0.20.2 → beaver_db-0.21.1}/docs/.quarto/xref/674e8fe6 +0 -0
- {beaver_db-0.20.2 → beaver_db-0.21.1}/docs/.quarto/xref/6a721ef9 +0 -0
- {beaver_db-0.20.2 → beaver_db-0.21.1}/docs/.quarto/xref/807a23ea +0 -0
- {beaver_db-0.20.2 → beaver_db-0.21.1}/docs/.quarto/xref/9c486562 +0 -0
- {beaver_db-0.20.2 → beaver_db-0.21.1}/docs/.quarto/xref/INDEX +0 -0
- {beaver_db-0.20.2 → beaver_db-0.21.1}/docs/.quarto/xref/b2f009dd +0 -0
- {beaver_db-0.20.2 → beaver_db-0.21.1}/docs/.quarto/xref/c40f73a8 +0 -0
- {beaver_db-0.20.2 → beaver_db-0.21.1}/docs/.quarto/xref/cf0735bd +0 -0
- {beaver_db-0.20.2 → beaver_db-0.21.1}/docs/.quarto/xref/d7f66f00 +0 -0
- {beaver_db-0.20.2 → beaver_db-0.21.1}/docs/.quarto/xref/f22e8d4c +0 -0
- {beaver_db-0.20.2 → beaver_db-0.21.1}/docs/.quarto/xref/f9d58622 +0 -0
- {beaver_db-0.20.2 → beaver_db-0.21.1}/docs/.quarto/xref/fa9f9ca6 +0 -0
- {beaver_db-0.20.2 → beaver_db-0.21.1}/docs/_book/BeaverDB--The-Complete-Guide.pdf +0 -0
- {beaver_db-0.20.2 → beaver_db-0.21.1}/docs/_book/dev-architecture.html +0 -0
- {beaver_db-0.20.2 → beaver_db-0.21.1}/docs/_book/dev-concurrency.html +0 -0
- {beaver_db-0.20.2 → beaver_db-0.21.1}/docs/_book/dev-contributing.html +0 -0
- {beaver_db-0.20.2 → beaver_db-0.21.1}/docs/_book/dev-search.html +0 -0
- {beaver_db-0.20.2 → beaver_db-0.21.1}/docs/_book/guide-collections.html +0 -0
- {beaver_db-0.20.2 → beaver_db-0.21.1}/docs/_book/guide-concurrency.html +0 -0
- {beaver_db-0.20.2 → beaver_db-0.21.1}/docs/_book/guide-deployment.html +0 -0
- {beaver_db-0.20.2 → beaver_db-0.21.1}/docs/_book/guide-dicts-blobs.html +0 -0
- {beaver_db-0.20.2 → beaver_db-0.21.1}/docs/_book/guide-lists-queues.html +0 -0
- {beaver_db-0.20.2 → beaver_db-0.21.1}/docs/_book/guide-realtime.html +0 -0
- {beaver_db-0.20.2 → beaver_db-0.21.1}/docs/_book/index.html +0 -0
- {beaver_db-0.20.2 → beaver_db-0.21.1}/docs/_book/logo.png +0 -0
- {beaver_db-0.20.2 → beaver_db-0.21.1}/docs/_book/quickstart.html +0 -0
- {beaver_db-0.20.2 → beaver_db-0.21.1}/docs/_book/search.json +0 -0
- {beaver_db-0.20.2 → beaver_db-0.21.1}/docs/_book/site_libs/bootstrap/bootstrap-5d653dd4d7566aed16f42eb06e547978.min.css +0 -0
- {beaver_db-0.20.2 → beaver_db-0.21.1}/docs/_book/site_libs/bootstrap/bootstrap-icons.css +0 -0
- {beaver_db-0.20.2 → beaver_db-0.21.1}/docs/_book/site_libs/bootstrap/bootstrap-icons.woff +0 -0
- {beaver_db-0.20.2 → beaver_db-0.21.1}/docs/_book/site_libs/bootstrap/bootstrap.min.js +0 -0
- {beaver_db-0.20.2 → beaver_db-0.21.1}/docs/_book/site_libs/clipboard/clipboard.min.js +0 -0
- {beaver_db-0.20.2 → beaver_db-0.21.1}/docs/_book/site_libs/quarto-html/anchor.min.js +0 -0
- {beaver_db-0.20.2 → beaver_db-0.21.1}/docs/_book/site_libs/quarto-html/popper.min.js +0 -0
- {beaver_db-0.20.2 → beaver_db-0.21.1}/docs/_book/site_libs/quarto-html/quarto-syntax-highlighting-de070a7b0ab54f8780927367ac907214.css +0 -0
- {beaver_db-0.20.2 → beaver_db-0.21.1}/docs/_book/site_libs/quarto-html/quarto.js +0 -0
- {beaver_db-0.20.2 → beaver_db-0.21.1}/docs/_book/site_libs/quarto-html/tabsets/tabsets.js +0 -0
- {beaver_db-0.20.2 → beaver_db-0.21.1}/docs/_book/site_libs/quarto-html/tippy.css +0 -0
- {beaver_db-0.20.2 → beaver_db-0.21.1}/docs/_book/site_libs/quarto-html/tippy.umd.min.js +0 -0
- {beaver_db-0.20.2 → beaver_db-0.21.1}/docs/_book/site_libs/quarto-nav/quarto-nav.js +0 -0
- {beaver_db-0.20.2 → beaver_db-0.21.1}/docs/_book/site_libs/quarto-search/autocomplete.umd.js +0 -0
- {beaver_db-0.20.2 → beaver_db-0.21.1}/docs/_book/site_libs/quarto-search/fuse.min.js +0 -0
- {beaver_db-0.20.2 → beaver_db-0.21.1}/docs/_book/site_libs/quarto-search/quarto-search.js +0 -0
- {beaver_db-0.20.2 → beaver_db-0.21.1}/docs/_quarto.yml +0 -0
- {beaver_db-0.20.2 → beaver_db-0.21.1}/docs/cover.png +0 -0
- {beaver_db-0.20.2 → beaver_db-0.21.1}/docs/dev-architecture.qmd +0 -0
- {beaver_db-0.20.2 → beaver_db-0.21.1}/docs/dev-concurrency.qmd +0 -0
- {beaver_db-0.20.2 → beaver_db-0.21.1}/docs/dev-contributing.qmd +0 -0
- {beaver_db-0.20.2 → beaver_db-0.21.1}/docs/dev-search.qmd +0 -0
- {beaver_db-0.20.2 → beaver_db-0.21.1}/docs/guide-collections.qmd +0 -0
- {beaver_db-0.20.2 → beaver_db-0.21.1}/docs/guide-concurrency.qmd +0 -0
- {beaver_db-0.20.2 → beaver_db-0.21.1}/docs/guide-deployment.qmd +0 -0
- {beaver_db-0.20.2 → beaver_db-0.21.1}/docs/guide-dicts-blobs.qmd +0 -0
- {beaver_db-0.20.2 → beaver_db-0.21.1}/docs/guide-lists-queues.qmd +0 -0
- {beaver_db-0.20.2 → beaver_db-0.21.1}/docs/guide-realtime.qmd +0 -0
- {beaver_db-0.20.2 → beaver_db-0.21.1}/docs/index.qmd +0 -0
- {beaver_db-0.20.2 → beaver_db-0.21.1}/docs/logo.png +0 -0
- {beaver_db-0.20.2 → beaver_db-0.21.1}/docs/quickstart.qmd +0 -0
- {beaver_db-0.20.2 → beaver_db-0.21.1}/examples/async_pubsub.py +0 -0
- {beaver_db-0.20.2 → beaver_db-0.21.1}/examples/blobs.py +0 -0
- {beaver_db-0.20.2 → beaver_db-0.21.1}/examples/cache.py +0 -0
- {beaver_db-0.20.2 → beaver_db-0.21.1}/examples/fts.py +0 -0
- {beaver_db-0.20.2 → beaver_db-0.21.1}/examples/fuzzy.py +0 -0
- {beaver_db-0.20.2 → beaver_db-0.21.1}/examples/general_test.py +0 -0
- {beaver_db-0.20.2 → beaver_db-0.21.1}/examples/graph.py +0 -0
- {beaver_db-0.20.2 → beaver_db-0.21.1}/examples/kvstore.py +0 -0
- {beaver_db-0.20.2 → beaver_db-0.21.1}/examples/list.py +0 -0
- {beaver_db-0.20.2 → beaver_db-0.21.1}/examples/locks.py +0 -0
- {beaver_db-0.20.2 → beaver_db-0.21.1}/examples/logs.py +0 -0
- {beaver_db-0.20.2 → beaver_db-0.21.1}/examples/pqueue.py +0 -0
- {beaver_db-0.20.2 → beaver_db-0.21.1}/examples/producer_consumer.py +0 -0
- {beaver_db-0.20.2 → beaver_db-0.21.1}/examples/publisher.py +0 -0
- {beaver_db-0.20.2 → beaver_db-0.21.1}/examples/pubsub.py +0 -0
- {beaver_db-0.20.2 → beaver_db-0.21.1}/examples/rerank.py +0 -0
- {beaver_db-0.20.2 → beaver_db-0.21.1}/examples/stress_vectors.py +0 -0
- {beaver_db-0.20.2 → beaver_db-0.21.1}/examples/subscriber.py +0 -0
- {beaver_db-0.20.2 → beaver_db-0.21.1}/examples/textual_chat.css +0 -0
- {beaver_db-0.20.2 → beaver_db-0.21.1}/examples/textual_chat.py +0 -0
- {beaver_db-0.20.2 → beaver_db-0.21.1}/examples/type_hints.py +0 -0
- {beaver_db-0.20.2 → beaver_db-0.21.1}/examples/vector.py +0 -0
- {beaver_db-0.20.2 → beaver_db-0.21.1}/issues/13-refactor-adopt-pydantic-deprecate-beavermodel-and-refactor-document-to-be-generic.md +0 -0
- {beaver_db-0.20.2 → beaver_db-0.21.1}/issues/2-comprehensive-async-wrappers.md +0 -0
- {beaver_db-0.20.2 → beaver_db-0.21.1}/issues/6-drop-in-replacement-for-beaver-rest-server-client.md +0 -0
- {beaver_db-0.20.2 → beaver_db-0.21.1}/issues/7-replace-faiss-with-simpler-linear-numpy-vectorial-search.md +0 -0
- {beaver_db-0.20.2 → beaver_db-0.21.1}/issues/closed/1-refactor-vector-store-to-use-faiss.md +0 -0
- {beaver_db-0.20.2 → beaver_db-0.21.1}/issues/closed/10-expose-dblock-functionality-on-all-high-level-data-managers.md +0 -0
- {beaver_db-0.20.2 → beaver_db-0.21.1}/issues/closed/11-a-new-issue-for-gabriel.md +0 -0
- {beaver_db-0.20.2 → beaver_db-0.21.1}/issues/closed/12-add-dump-method-for-json-export-to-all-data-managers.md +0 -0
- {beaver_db-0.20.2 → beaver_db-0.21.1}/issues/closed/5-add-dblock-for-inter-process-synchronization.md +0 -0
- {beaver_db-0.20.2 → beaver_db-0.21.1}/issues/closed/8-first-class-synchronization-primitive.md +0 -0
- {beaver_db-0.20.2 → beaver_db-0.21.1}/issues/closed/9-type-safe-wrappers-based-on-pydantic-compatible-models.md +0 -0
- {beaver_db-0.20.2 → beaver_db-0.21.1}/logo.png +0 -0
- {beaver_db-0.20.2 → beaver_db-0.21.1}/makefile +0 -0
|
@@ -1,3 +1,25 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: beaver-db
|
|
3
|
+
Version: 0.21.1
|
|
4
|
+
Summary: Fast, embedded, and multi-modal DB based on SQLite for AI-powered applications.
|
|
5
|
+
License-File: LICENSE
|
|
6
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
7
|
+
Classifier: Operating System :: OS Independent
|
|
8
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
9
|
+
Classifier: Topic :: Database
|
|
10
|
+
Classifier: Topic :: Software Development :: Libraries :: Application Frameworks
|
|
11
|
+
Requires-Python: >=3.13
|
|
12
|
+
Requires-Dist: rich>=14.2.0
|
|
13
|
+
Requires-Dist: typer>=0.20.0
|
|
14
|
+
Provides-Extra: full
|
|
15
|
+
Requires-Dist: faiss-cpu>=1.12.0; extra == 'full'
|
|
16
|
+
Requires-Dist: fastapi[standard]>=0.118.0; extra == 'full'
|
|
17
|
+
Provides-Extra: server
|
|
18
|
+
Requires-Dist: fastapi[standard]>=0.118.0; extra == 'server'
|
|
19
|
+
Provides-Extra: vector
|
|
20
|
+
Requires-Dist: faiss-cpu>=1.12.0; extra == 'vector'
|
|
21
|
+
Description-Content-Type: text/markdown
|
|
22
|
+
|
|
1
23
|
<div style="text-align: center;">
|
|
2
24
|
<img src="https://github.com/syalia-srl/beaver/blob/main/logo.png?raw=true" width="256px">
|
|
3
25
|
</div>
|
|
@@ -456,15 +478,8 @@ For more in-depth examples, check out the scripts in the `examples/` directory:
|
|
|
456
478
|
|
|
457
479
|
`beaver` is roughly feature-complete, but there are still some features and improvements planned for future releases, mostly directed to improving developer experience.
|
|
458
480
|
|
|
459
|
-
These are some of the features and improvements planned for future releases:
|
|
460
|
-
|
|
461
|
-
- **[Issue #2](https://github.com/syalia-srl/beaver/issues/2) Comprehensive async wrappers**: Extend the async support with on-demand wrappers for all data structures, not just channels.
|
|
462
|
-
- **[Issue #6](https://github.com/syalia-srl/beaver/issues/6) Drop-in replacement for Beaver REST server client**: Implement a `BeaverClient` class that acts as a drop-in replacement for `BeaverDB` but works against the REST API server.
|
|
463
|
-
- **[Issue #7](https://github.com/syalia-srl/beaver/issues/7) Replace `faiss` with simpler, linear `numpy` vectorial search**: Investigate removing the heavy `faiss` dependency in favor of a pure `numpy` implementation to improve installation simplicity, accepting a trade-off in search performance for O(1) installation.
|
|
464
|
-
- **[Issue #9](https://github.com/syalia-srl/beaver/issues/9) Type-safe wrappers based on Pydantic-compatible models**: Enhance the built-in `Model` to handle recursive and embedded types and provide Pydantic compatibility.
|
|
465
|
-
|
|
466
|
-
|
|
467
481
|
If you think of something that would make `beaver` more useful for your use case, please open an issue and/or submit a pull request.
|
|
482
|
+
|
|
468
483
|
## License
|
|
469
484
|
|
|
470
485
|
This project is licensed under the MIT License.
|
|
@@ -1,28 +1,3 @@
|
|
|
1
|
-
Metadata-Version: 2.4
|
|
2
|
-
Name: beaver-db
|
|
3
|
-
Version: 0.20.2
|
|
4
|
-
Summary: Fast, embedded, and multi-modal DB based on SQLite for AI-powered applications.
|
|
5
|
-
License-File: LICENSE
|
|
6
|
-
Classifier: License :: OSI Approved :: MIT License
|
|
7
|
-
Classifier: Operating System :: OS Independent
|
|
8
|
-
Classifier: Programming Language :: Python :: 3.13
|
|
9
|
-
Classifier: Topic :: Database
|
|
10
|
-
Classifier: Topic :: Software Development :: Libraries :: Application Frameworks
|
|
11
|
-
Requires-Python: >=3.13
|
|
12
|
-
Provides-Extra: cli
|
|
13
|
-
Requires-Dist: fire[cli]>=0.7.1; extra == 'cli'
|
|
14
|
-
Requires-Dist: typer>=0.19.2; extra == 'cli'
|
|
15
|
-
Provides-Extra: full
|
|
16
|
-
Requires-Dist: faiss-cpu>=1.12.0; extra == 'full'
|
|
17
|
-
Requires-Dist: fastapi[standard]>=0.118.0; extra == 'full'
|
|
18
|
-
Requires-Dist: fire[cli]>=0.7.1; extra == 'full'
|
|
19
|
-
Requires-Dist: typer>=0.19.2; extra == 'full'
|
|
20
|
-
Provides-Extra: server
|
|
21
|
-
Requires-Dist: fastapi[standard]>=0.118.0; extra == 'server'
|
|
22
|
-
Provides-Extra: vector
|
|
23
|
-
Requires-Dist: faiss-cpu>=1.12.0; extra == 'vector'
|
|
24
|
-
Description-Content-Type: text/markdown
|
|
25
|
-
|
|
26
1
|
<div style="text-align: center;">
|
|
27
2
|
<img src="https://github.com/syalia-srl/beaver/blob/main/logo.png?raw=true" width="256px">
|
|
28
3
|
</div>
|
|
@@ -481,15 +456,8 @@ For more in-depth examples, check out the scripts in the `examples/` directory:
|
|
|
481
456
|
|
|
482
457
|
`beaver` is roughly feature-complete, but there are still some features and improvements planned for future releases, mostly directed to improving developer experience.
|
|
483
458
|
|
|
484
|
-
These are some of the features and improvements planned for future releases:
|
|
485
|
-
|
|
486
|
-
- **[Issue #2](https://github.com/syalia-srl/beaver/issues/2) Comprehensive async wrappers**: Extend the async support with on-demand wrappers for all data structures, not just channels.
|
|
487
|
-
- **[Issue #6](https://github.com/syalia-srl/beaver/issues/6) Drop-in replacement for Beaver REST server client**: Implement a `BeaverClient` class that acts as a drop-in replacement for `BeaverDB` but works against the REST API server.
|
|
488
|
-
- **[Issue #7](https://github.com/syalia-srl/beaver/issues/7) Replace `faiss` with simpler, linear `numpy` vectorial search**: Investigate removing the heavy `faiss` dependency in favor of a pure `numpy` implementation to improve installation simplicity, accepting a trade-off in search performance for O(1) installation.
|
|
489
|
-
- **[Issue #9](https://github.com/syalia-srl/beaver/issues/9) Type-safe wrappers based on Pydantic-compatible models**: Enhance the built-in `Model` to handle recursive and embedded types and provide Pydantic compatibility.
|
|
490
|
-
|
|
491
|
-
|
|
492
459
|
If you think of something that would make `beaver` more useful for your use case, please open an issue and/or submit a pull request.
|
|
460
|
+
|
|
493
461
|
## License
|
|
494
462
|
|
|
495
463
|
This project is licensed under the MIT License.
|
beaver_db-0.21.1/issues/14-deprecate-fire-based-cli-and-build-a-feature-rich-typer-and-rich-cli.md
ADDED
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
---
|
|
2
|
+
number: 14
|
|
3
|
+
title: Deprecate `fire`-based CLI and build a feature-rich `typer` and `rich` CLI
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
### 1. Justification
|
|
7
|
+
|
|
8
|
+
The current `beaver client` command is a thin wrapper that uses `python-fire` to directly expose the methods of the `BeaverDB` object. While this was simple to implement, it provides a poor developer experience for several reasons:
|
|
9
|
+
|
|
10
|
+
* **Low-Level Interface:** It's method-centric, not user-centric. A user must know the exact Python method and signature (e.g., `db.dict("name").set("key", "value")`) rather than a friendly command (`beaver dict set <name> <key> <value>`).
|
|
11
|
+
* **Poor Output:** It returns raw Python object representations or simple strings, not well-formatted, human-readable output like tables or pretty-printed JSON.
|
|
12
|
+
* **No Interactivity:** It is incapable of handling stateful or blocking operations, which are some of BeaverDB's most powerful features (e.g., `db.log().live()`, `db.channel().subscribe()`).
|
|
13
|
+
* **Limited Shell Integration:** It's difficult to use for complex scripting, such as piping file contents to a blob or wrapping a shell command in a database lock.
|
|
14
|
+
|
|
15
|
+
This feature proposes **deprecating and removing `python-fire`** entirely. We will replace the `beaver client` command with a full-featured, custom-built CLI using `typer` (which we already use for `serve`) and `rich` (already used for errors).
|
|
16
|
+
|
|
17
|
+
### 2. Alignment with Philosophy
|
|
18
|
+
|
|
19
|
+
This refactor strongly supports our guiding principles:
|
|
20
|
+
|
|
21
|
+
* **Simplicity and Pythonic API:** This extends "simplicity" to the terminal. A good CLI abstracts away internal method calls into intuitive, task-oriented commands.
|
|
22
|
+
* **Developer Experience:** This is a massive improvement to the developer experience, making BeaverDB far more useful for administration, debugging, and shell scripting.
|
|
23
|
+
* **Minimal & Optional Dependencies:** We will remove the `fire` dependency and replace it with `rich`, which is already a `typer` dependency, resulting in a cleaner and more powerful `[cli]` extra.
|
|
24
|
+
|
|
25
|
+
### 3. Proposed Command Structure
|
|
26
|
+
|
|
27
|
+
The `beaver client` sub-command will be removed. The main `beaver` app will host the data commands directly. All commands that output data will use `rich` for formatting (e.g., `rich.print_json`, `rich.table.Table`).
|
|
28
|
+
|
|
29
|
+
```sh
|
|
30
|
+
# The database path will be a top-level option, e.g.:
|
|
31
|
+
# beaver --database my.db <command>
|
|
32
|
+
|
|
33
|
+
# --- Dicts ---
|
|
34
|
+
# Get a value, pretty-print JSON if it's a structure
|
|
35
|
+
beaver dict <name> get <key>
|
|
36
|
+
# Set a value (with JSON parsing for values starting with { or [)
|
|
37
|
+
beaver dict <name> set <key> <value>
|
|
38
|
+
# Delete a key
|
|
39
|
+
beaver dict <name> del <key>
|
|
40
|
+
# List all keys
|
|
41
|
+
beaver dict <name> keys
|
|
42
|
+
# Dump the whole dictionary as JSON
|
|
43
|
+
beaver dict <name> dump
|
|
44
|
+
|
|
45
|
+
# --- Lists ---
|
|
46
|
+
beaver list <name> push <value>
|
|
47
|
+
beaver list <name> pop
|
|
48
|
+
beaver list <name> deque
|
|
49
|
+
beaver list <name> show # Renders the list in a rich.table
|
|
50
|
+
beaver list <name> dump
|
|
51
|
+
|
|
52
|
+
# --- Queues ---
|
|
53
|
+
beaver queue <name> put <priority> <value>
|
|
54
|
+
beaver queue <name> get --timeout 5 --block # Get an item
|
|
55
|
+
beaver queue <name> peek # View next item without popping
|
|
56
|
+
beaver queue <name> show # Renders queue in a rich.table
|
|
57
|
+
|
|
58
|
+
# --- Channels (Interactive) ---
|
|
59
|
+
beaver channel <name> publish <message>
|
|
60
|
+
beaver channel <name> listen # Runs a live loop printing messages
|
|
61
|
+
|
|
62
|
+
# --- Logs (Interactive) ---
|
|
63
|
+
beaver log <name> write <json_data>
|
|
64
|
+
beaver log <name> tail --window 30s # Runs a live loop printing aggregated data
|
|
65
|
+
|
|
66
|
+
# --- Blobs (File I/O) ---
|
|
67
|
+
beaver blob <store> put <key> <file_path> # Read from file
|
|
68
|
+
beaver blob <store> get <key> <output_file_path> # Write to file
|
|
69
|
+
beaver blob <store> del <key>
|
|
70
|
+
beaver blob <store> list # List all blob keys
|
|
71
|
+
|
|
72
|
+
# --- Collections ---
|
|
73
|
+
beaver collection <name> index <json_or_file_path> # Index a new document
|
|
74
|
+
beaver collection <name> drop <doc_id>
|
|
75
|
+
beaver collection <name> match <query> --on "field" --fuzzy 2
|
|
76
|
+
beaver collection <name> search <vector_json>
|
|
77
|
+
beaver collection <name> connect <source_id> <target_id> <label>
|
|
78
|
+
|
|
79
|
+
# --- Locks (Shell Integration) ---
|
|
80
|
+
# Wraps an arbitrary shell command in a BeaverDB lock
|
|
81
|
+
beaver lock <lock_name> --timeout 10 -- bash -c "run_script.sh"
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
### 4. High-Level Roadmap
|
|
85
|
+
|
|
86
|
+
1. **Phase 1: Foundation & Dependency Swap**
|
|
87
|
+
|
|
88
|
+
* Update `pyproject.toml`: Remove `fire` from `[project.optional-dependencies].cli`. Add `rich` as a dependency for the `cli` extra.
|
|
89
|
+
* Refactor `beaver/cli.py`: Remove the `client` command, the `fire` import, and the `context_settings` that allowed `fire` to work.
|
|
90
|
+
* Create new files (`beaver/cli/dict_commands.py`, `beaver/cli/list_commands.py`, etc.) and register them with the main `typer` app.
|
|
91
|
+
* Add a global `db` instance that is initialized from the `--database` option.
|
|
92
|
+
|
|
93
|
+
2. **Phase 2: Stateless "CRUD" Commands**
|
|
94
|
+
|
|
95
|
+
* Implement the simple, stateless commands: `dict get/set/del/keys`, `list push/pop/deque`, `queue put/peek`, `channel publish`, `log write`.
|
|
96
|
+
* Implement `dict dump` and `list dump` using the new `.dump()` methods.
|
|
97
|
+
* Use `rich.print()` and `rich.print_json()` for all output.
|
|
98
|
+
|
|
99
|
+
3. **Phase 3: File I/O Commands**
|
|
100
|
+
|
|
101
|
+
* Implement `blob put` (reading from a `typer.Argument` path) and `blob get` (writing to a `typer.Argument` path).
|
|
102
|
+
* Implement `collection index` to optionally read `Document` JSON from a file.
|
|
103
|
+
|
|
104
|
+
4. **Phase 4: Stateful & Interactive Commands**
|
|
105
|
+
|
|
106
|
+
* Implement `channel listen` by creating a loop that calls `listener.listen()` and prints new messages.
|
|
107
|
+
* Implement `log tail` by iterating over the `logs.live()` generator and using `rich.Live` to update a table in place.
|
|
108
|
+
* Implement `queue get --block`.
|
|
109
|
+
|
|
110
|
+
5. **Phase 5: Shell Integration (`lock`)**
|
|
111
|
+
|
|
112
|
+
* Implement the `beaver lock` command. This command will need to use `typer.Context` and `ctx.args` to capture the raw command to be executed.
|
|
113
|
+
* The command logic will wrap a `subprocess.run(command_args)` call inside a `with db.lock(...):` block.
|
|
114
|
+
* The exit code of the subprocess will be propagated as the exit code of the `beaver` command.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[project]
|
|
2
2
|
name = "beaver-db"
|
|
3
|
-
version = "0.
|
|
3
|
+
version = "0.21.1"
|
|
4
4
|
description = "Fast, embedded, and multi-modal DB based on SQLite for AI-powered applications."
|
|
5
5
|
readme = "README.md"
|
|
6
6
|
requires-python = ">=3.13"
|
|
@@ -11,6 +11,10 @@ classifiers = [
|
|
|
11
11
|
"Topic :: Database",
|
|
12
12
|
"Topic :: Software Development :: Libraries :: Application Frameworks",
|
|
13
13
|
]
|
|
14
|
+
dependencies = [
|
|
15
|
+
"rich>=14.2.0",
|
|
16
|
+
"typer>=0.20.0",
|
|
17
|
+
]
|
|
14
18
|
|
|
15
19
|
[project.scripts]
|
|
16
20
|
beaver = "beaver.cli:app"
|
|
@@ -25,8 +29,7 @@ packages = ["beaver"]
|
|
|
25
29
|
[project.optional-dependencies]
|
|
26
30
|
vector = ["faiss-cpu>=1.12.0"]
|
|
27
31
|
server = ["fastapi[standard]>=0.118.0"]
|
|
28
|
-
|
|
29
|
-
full = ["beaver-db[server]", "beaver-db[vector]", "beaver-db[cli]"]
|
|
32
|
+
full = ["beaver-db[server]", "beaver-db[vector]"]
|
|
30
33
|
|
|
31
34
|
[dependency-groups]
|
|
32
35
|
dev = ["textual>=6.1.0"]
|