beaver-db 0.17.1__py3-none-any.whl → 0.17.3__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/cli.py +32 -0
- {beaver_db-0.17.1.dist-info → beaver_db-0.17.3.dist-info}/METADATA +3 -2
- {beaver_db-0.17.1.dist-info → beaver_db-0.17.3.dist-info}/RECORD +6 -6
- {beaver_db-0.17.1.dist-info → beaver_db-0.17.3.dist-info}/WHEEL +0 -0
- {beaver_db-0.17.1.dist-info → beaver_db-0.17.3.dist-info}/entry_points.txt +0 -0
- {beaver_db-0.17.1.dist-info → beaver_db-0.17.3.dist-info}/licenses/LICENSE +0 -0
beaver/cli.py
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
from typing import Annotated
|
|
1
2
|
import typer
|
|
2
3
|
import rich
|
|
3
4
|
|
|
@@ -30,5 +31,36 @@ def serve(
|
|
|
30
31
|
run_server(db_path=database, host=host, port=port)
|
|
31
32
|
|
|
32
33
|
|
|
34
|
+
@app.command(
|
|
35
|
+
context_settings={"allow_extra_args": True, "ignore_unknown_options": True}
|
|
36
|
+
)
|
|
37
|
+
def client(
|
|
38
|
+
ctx: typer.Context,
|
|
39
|
+
database: Annotated[
|
|
40
|
+
str, typer.Option(help="The path to the BeaverDB database file.")
|
|
41
|
+
] = "beaver.db",
|
|
42
|
+
):
|
|
43
|
+
"""
|
|
44
|
+
Provides a command-line client to interact with the database.
|
|
45
|
+
|
|
46
|
+
All arguments after 'client' are passed directly to the database object.
|
|
47
|
+
Example: beaver client --database my.db dict my_dict get my_key
|
|
48
|
+
"""
|
|
49
|
+
try:
|
|
50
|
+
import fire
|
|
51
|
+
from .core import BeaverDB
|
|
52
|
+
except ImportError:
|
|
53
|
+
print(
|
|
54
|
+
"Error: To use the client command, please install the CLI dependencies:\n"
|
|
55
|
+
'pip install "beaver-db[cli]"'
|
|
56
|
+
)
|
|
57
|
+
raise typer.Exit(code=1)
|
|
58
|
+
|
|
59
|
+
db = BeaverDB(database)
|
|
60
|
+
# The arguments for fire are passed via ctx.args, which captures everything
|
|
61
|
+
# after the 'client' command.
|
|
62
|
+
fire.Fire(db, command=ctx.args)
|
|
63
|
+
|
|
64
|
+
|
|
33
65
|
if __name__ == "__main__":
|
|
34
66
|
app()
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: beaver-db
|
|
3
|
-
Version: 0.17.
|
|
3
|
+
Version: 0.17.3
|
|
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
|
|
@@ -10,14 +10,15 @@ Classifier: Topic :: Database
|
|
|
10
10
|
Classifier: Topic :: Software Development :: Libraries :: Application Frameworks
|
|
11
11
|
Requires-Python: >=3.13
|
|
12
12
|
Provides-Extra: cli
|
|
13
|
+
Requires-Dist: fire[cli]>=0.7.1; extra == 'cli'
|
|
13
14
|
Requires-Dist: typer>=0.19.2; extra == 'cli'
|
|
14
15
|
Provides-Extra: full
|
|
15
16
|
Requires-Dist: faiss-cpu>=1.12.0; extra == 'full'
|
|
16
17
|
Requires-Dist: fastapi[standard]>=0.118.0; extra == 'full'
|
|
18
|
+
Requires-Dist: fire[cli]>=0.7.1; extra == 'full'
|
|
17
19
|
Requires-Dist: typer>=0.19.2; extra == 'full'
|
|
18
20
|
Provides-Extra: server
|
|
19
21
|
Requires-Dist: fastapi[standard]>=0.118.0; extra == 'server'
|
|
20
|
-
Requires-Dist: typer>=0.19.2; extra == 'server'
|
|
21
22
|
Provides-Extra: vector
|
|
22
23
|
Requires-Dist: faiss-cpu>=1.12.0; extra == 'vector'
|
|
23
24
|
Description-Content-Type: text/markdown
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
beaver/__init__.py,sha256=qyEzF1Os7w4b4Hijgz0Y0R4zTrRBrHIGT1mEkZFl2YM,101
|
|
2
2
|
beaver/blobs.py,sha256=YkIEskHD6oHRaJTF0P25HrTT8LqM-REyV_UBPVQxeqQ,4055
|
|
3
3
|
beaver/channels.py,sha256=kIuwKMDBdDQObaKT23znsMXzfpKfE7pXSxvf-u4LlpY,9554
|
|
4
|
-
beaver/cli.py,sha256=
|
|
4
|
+
beaver/cli.py,sha256=lGnTocmRiJ-clKFc9WzJBFTOhZj0vgvmM8Ro4FZ5m0E,1917
|
|
5
5
|
beaver/collections.py,sha256=Wm684pGp-E89PCq9gcbbmRC9VMtTxolRVXnrxKlw2m8,24615
|
|
6
6
|
beaver/core.py,sha256=68vjuEbkJTHv4SltCLCrgs34BpLCeL602oJZ6CJ34Zo,14560
|
|
7
7
|
beaver/dicts.py,sha256=Xp8lPfQt08O8zCbptQLWQLO79OxG6uAVER6ryj3SScQ,5495
|
|
@@ -11,8 +11,8 @@ beaver/queues.py,sha256=Fr3oie63EtceSoiC8EOEDSLu1tDI8q2MYLXd8MEeC3g,6476
|
|
|
11
11
|
beaver/server.py,sha256=lmzMu51cXa1Qdezg140hmsMLCxVSq8YGX0EPQfuGidk,4043
|
|
12
12
|
beaver/types.py,sha256=WZLINf7hy6zdKdAFQK0EVMSl5vnY_KnrHXNdXgAKuPg,1582
|
|
13
13
|
beaver/vectors.py,sha256=qvI6RwUOGrhVH5d6PUmI3jKDaoDotMy0iy-bHyvmXks,18496
|
|
14
|
-
beaver_db-0.17.
|
|
15
|
-
beaver_db-0.17.
|
|
16
|
-
beaver_db-0.17.
|
|
17
|
-
beaver_db-0.17.
|
|
18
|
-
beaver_db-0.17.
|
|
14
|
+
beaver_db-0.17.3.dist-info/METADATA,sha256=AmFjsL-7D6G1mDzB9zNL9r_rSX8lmwU6EyJe6PgYF3c,18664
|
|
15
|
+
beaver_db-0.17.3.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
|
16
|
+
beaver_db-0.17.3.dist-info/entry_points.txt,sha256=bd5E2s45PoBdtdR9-ToKSdLNhmHp8naV1lWP5mOzlrc,42
|
|
17
|
+
beaver_db-0.17.3.dist-info/licenses/LICENSE,sha256=1xrIY5JnMk_QDQzsqmVzPIIyCgZAkWCC8kF2Ddo1UT0,1071
|
|
18
|
+
beaver_db-0.17.3.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|