beaver-db 0.17.2__py3-none-any.whl → 0.17.4__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 CHANGED
@@ -1,34 +1,29 @@
1
- from typing import Annotated
2
1
  import typer
3
2
  import rich
3
+ from typing_extensions import Annotated
4
4
 
5
5
  app = typer.Typer()
6
6
 
7
7
 
8
8
  @app.command()
9
9
  def serve(
10
- database: str = typer.Option(
11
- "beaver.db", "--database", "-d", help="Path to the database file."
12
- ),
13
- host: str = typer.Option(
14
- "127.0.0.1", "--host", "-h", help="The host to bind the server to."
15
- ),
16
- port: int = typer.Option(
17
- 8000, "--port", "-p", help="The port to run the server on."
18
- ),
10
+ database: Annotated[
11
+ str, typer.Option(help="The path to the BeaverDB database file.")
12
+ ] = "beaver.db",
13
+ host: Annotated[str, typer.Option(help="The host to bind the server to.")] = "127.0.0.1",
14
+ port: Annotated[int, typer.Option(help="The port to run the server on.")] = 8000,
19
15
  ):
20
- """
21
- Starts a RESTful API server for a BeaverDB instance.
22
- """
16
+ """Starts a REST API server for the BeaverDB database."""
23
17
  try:
24
- from .server import serve as run_server
25
- except ImportError as e:
26
- rich.print(f"[red]Error: {e}[/]")
27
- rich.print('[yellow]Please install the server dependencies with `pip install "beaver-db[server]"`[/]')
18
+ from . import server
19
+ except ImportError:
20
+ rich.print(
21
+ "[red]Error:[/] To use the serve command, please install the server dependencies:\n"
22
+ 'pip install "beaver-db[server]"'
23
+ )
28
24
  raise typer.Exit(code=1)
29
25
 
30
- rich.print(f"[blue]Starting server for database at '{database}' on http://{host}:{port}[/]")
31
- run_server(db_path=database, host=host, port=port)
26
+ server.serve(database, host=host, port=port)
32
27
 
33
28
 
34
29
  @app.command(
@@ -50,8 +45,8 @@ def client(
50
45
  import fire
51
46
  from .core import BeaverDB
52
47
  except ImportError:
53
- print(
54
- "Error: To use the client command, please install the CLI dependencies:\n"
48
+ rich.print(
49
+ "[red]Error:[/] To use the client command, please install the CLI dependencies:\n"
55
50
  'pip install "beaver-db[cli]"'
56
51
  )
57
52
  raise typer.Exit(code=1)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: beaver-db
3
- Version: 0.17.2
3
+ Version: 0.17.4
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,12 +10,12 @@ 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: python-fire[cli]>=0.1.0; extra == 'cli'
13
+ Requires-Dist: fire[cli]>=0.7.1; extra == 'cli'
14
14
  Requires-Dist: typer>=0.19.2; extra == 'cli'
15
15
  Provides-Extra: full
16
16
  Requires-Dist: faiss-cpu>=1.12.0; extra == 'full'
17
17
  Requires-Dist: fastapi[standard]>=0.118.0; extra == 'full'
18
- Requires-Dist: python-fire[cli]>=0.1.0; extra == 'full'
18
+ Requires-Dist: fire[cli]>=0.7.1; extra == 'full'
19
19
  Requires-Dist: typer>=0.19.2; extra == 'full'
20
20
  Provides-Extra: server
21
21
  Requires-Dist: fastapi[standard]>=0.118.0; extra == 'server'
@@ -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=lGnTocmRiJ-clKFc9WzJBFTOhZj0vgvmM8Ro4FZ5m0E,1917
4
+ beaver/cli.py,sha256=Q61OYGrsWzERKy69NbttlSLUh1JunPlDSAd__LeKxhM,1789
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.2.dist-info/METADATA,sha256=AD_YwtBXuRqHoZ2CYW2CoiV7zg6MPWIKHMTBj_xW0vw,18678
15
- beaver_db-0.17.2.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
16
- beaver_db-0.17.2.dist-info/entry_points.txt,sha256=bd5E2s45PoBdtdR9-ToKSdLNhmHp8naV1lWP5mOzlrc,42
17
- beaver_db-0.17.2.dist-info/licenses/LICENSE,sha256=1xrIY5JnMk_QDQzsqmVzPIIyCgZAkWCC8kF2Ddo1UT0,1071
18
- beaver_db-0.17.2.dist-info/RECORD,,
14
+ beaver_db-0.17.4.dist-info/METADATA,sha256=VXJYu_d3IK1Mc4lnYWU6gsJl100LbKmvv5q6qDUs7S0,18664
15
+ beaver_db-0.17.4.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
16
+ beaver_db-0.17.4.dist-info/entry_points.txt,sha256=bd5E2s45PoBdtdR9-ToKSdLNhmHp8naV1lWP5mOzlrc,42
17
+ beaver_db-0.17.4.dist-info/licenses/LICENSE,sha256=1xrIY5JnMk_QDQzsqmVzPIIyCgZAkWCC8kF2Ddo1UT0,1071
18
+ beaver_db-0.17.4.dist-info/RECORD,,