cocoindex 0.1.30__cp311-cp311-macosx_11_0_arm64.whl → 0.1.32__cp311-cp311-macosx_11_0_arm64.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.
- cocoindex/_engine.cpython-311-darwin.so +0 -0
- cocoindex/cli.py +20 -3
- cocoindex/flow.py +3 -0
- cocoindex/setting.py +1 -1
- {cocoindex-0.1.30.dist-info → cocoindex-0.1.32.dist-info}/METADATA +1 -1
- {cocoindex-0.1.30.dist-info → cocoindex-0.1.32.dist-info}/RECORD +8 -8
- {cocoindex-0.1.30.dist-info → cocoindex-0.1.32.dist-info}/WHEEL +0 -0
- {cocoindex-0.1.30.dist-info → cocoindex-0.1.32.dist-info}/licenses/LICENSE +0 -0
Binary file
|
cocoindex/cli.py
CHANGED
@@ -1,7 +1,9 @@
|
|
1
|
+
import asyncio
|
1
2
|
import click
|
2
3
|
import datetime
|
3
4
|
|
4
5
|
from rich.console import Console
|
6
|
+
from rich.table import Table
|
5
7
|
|
6
8
|
from . import flow, lib, setting
|
7
9
|
from .setup import sync_setup, drop_setup, flow_names_with_setup, apply_setup_changes
|
@@ -56,11 +58,26 @@ def ls(show_all: bool):
|
|
56
58
|
@click.option("--color/--no-color", default=True)
|
57
59
|
def show(flow_name: str | None, color: bool):
|
58
60
|
"""
|
59
|
-
Show the flow spec in a readable format with colored output
|
61
|
+
Show the flow spec in a readable format with colored output,
|
62
|
+
including the schema.
|
60
63
|
"""
|
61
|
-
|
64
|
+
flow = _flow_by_name(flow_name)
|
62
65
|
console = Console(no_color=not color)
|
63
|
-
console.print(
|
66
|
+
console.print(flow._render_text())
|
67
|
+
|
68
|
+
table = Table(
|
69
|
+
title=f"Schema for Flow: {flow.name}",
|
70
|
+
show_header=True,
|
71
|
+
header_style="bold magenta"
|
72
|
+
)
|
73
|
+
table.add_column("Field", style="cyan")
|
74
|
+
table.add_column("Type", style="green")
|
75
|
+
table.add_column("Attributes", style="yellow")
|
76
|
+
|
77
|
+
for field_name, field_type, attr_str in flow._render_schema():
|
78
|
+
table.add_row(field_name, field_type, attr_str)
|
79
|
+
|
80
|
+
console.print(table)
|
64
81
|
|
65
82
|
@cli.command()
|
66
83
|
def setup():
|
cocoindex/flow.py
CHANGED
@@ -503,6 +503,9 @@ class Flow:
|
|
503
503
|
return self._format_flow(flow_dict)
|
504
504
|
except json.JSONDecodeError:
|
505
505
|
return Text(flow_spec_str)
|
506
|
+
|
507
|
+
def _render_schema(self) -> list[tuple[str, str, str]]:
|
508
|
+
return self._lazy_engine_flow().get_schema()
|
506
509
|
|
507
510
|
def __str__(self):
|
508
511
|
return str(self._render_text())
|
cocoindex/setting.py
CHANGED
@@ -47,7 +47,7 @@ class ServerSettings:
|
|
47
47
|
"""Settings for the cocoindex server."""
|
48
48
|
|
49
49
|
# The address to bind the server to.
|
50
|
-
address: str = "127.0.0.1:
|
50
|
+
address: str = "127.0.0.1:49344"
|
51
51
|
|
52
52
|
# The origins of the clients (e.g. CocoInsight UI) to allow CORS from.
|
53
53
|
cors_origins: list[str] | None = None
|
@@ -1,6 +1,6 @@
|
|
1
|
-
cocoindex-0.1.
|
2
|
-
cocoindex-0.1.
|
3
|
-
cocoindex-0.1.
|
1
|
+
cocoindex-0.1.32.dist-info/METADATA,sha256=xqTNEyXV9wQlABo-P6xNvUWvgDZW56UiGmyM-Am7o-4,8107
|
2
|
+
cocoindex-0.1.32.dist-info/WHEEL,sha256=wsVBlw9xyAuHecZeOYqJ_tA7emUKfXYOn-_180uZRi4,104
|
3
|
+
cocoindex-0.1.32.dist-info/licenses/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
|
4
4
|
cocoindex/functions.py,sha256=F79dNmGE127LaU67kF5Oqtf_tIzebFQH7MkyceMX4-s,1830
|
5
5
|
cocoindex/query.py,sha256=8_3Lb_EVjZtl2ZyJNZGX16LoKXEd-PL8OjY-zs9GQeA,3205
|
6
6
|
cocoindex/index.py,sha256=LssEOuZi6AqhwKtZM3QFeQpa9T-0ELi8G5DsrYKECvc,534
|
@@ -10,16 +10,16 @@ cocoindex/convert.py,sha256=mBUTa_Ag39_ut-yE_jc1wqS3zLjtOm6QKet-bqJ-RWc,5947
|
|
10
10
|
cocoindex/tests/__init__.py,sha256=AbpHGcgLb-kRsJGnwFEktk7uzpZOCcBY74-YBdrKVGs,1
|
11
11
|
cocoindex/tests/test_convert.py,sha256=WPRKp0jv_uSEM81RGWEAmsax-J-FtXt90mZ0yEnvGLs,11236
|
12
12
|
cocoindex/__init__.py,sha256=8atBT1HjclUOeiXd7TSzZWaqOR4x_qr5epvCKB7Z7oY,661
|
13
|
-
cocoindex/flow.py,sha256=
|
13
|
+
cocoindex/flow.py,sha256=KVbB_Ebm0IpJgZxV4BLg30fjIPmsGFhrtmQOBqCZaIk,23037
|
14
14
|
cocoindex/llm.py,sha256=_3rtahuKcqcEHPkFSwhXOSrekZyGxVApPoYtlU_chcA,348
|
15
|
-
cocoindex/setting.py,sha256=
|
15
|
+
cocoindex/setting.py,sha256=pms1blwlXIOqZIpye-rfiwzqYUCAC8oEL7mQM5A160g,2356
|
16
16
|
cocoindex/runtime.py,sha256=jqRnWkkIlAhE04gi4y0Y5bzuq9FX4j0aVNU-nengLJk,980
|
17
17
|
cocoindex/op.py,sha256=OGYRYl7gPa7X7iSU30iTrCzvqRBu7jQqfvN4vjG__dA,10730
|
18
18
|
cocoindex/sources.py,sha256=wZFU8lwSXjyofJR-syySH9fTyPnBlAPJ6-1hQNX8fGA,936
|
19
19
|
cocoindex/setup.py,sha256=W1HshwYk_K2aeLOVn_e62ZOXBO9yWsoUboRiH4SjF48,496
|
20
|
-
cocoindex/cli.py,sha256=
|
20
|
+
cocoindex/cli.py,sha256=Vh8bNZ41yLr1l_jJR1Z_b7mY-dOvN-EbiCRxDvtIsRk,8885
|
21
21
|
cocoindex/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
22
22
|
cocoindex/typing.py,sha256=BI2vPw4Iu4S3aznNJQrfM2LZU_weGYASTXF1W3ZWh_Y,8568
|
23
23
|
cocoindex/storages.py,sha256=MFMsfyOCYMggTWeWrOi82miqOXQmiUuqq828x5htBr0,2207
|
24
|
-
cocoindex/_engine.cpython-311-darwin.so,sha256=
|
25
|
-
cocoindex-0.1.
|
24
|
+
cocoindex/_engine.cpython-311-darwin.so,sha256=9pRD6kn-iCR8Z91nsx-7D0rzO652BKchgHbrzp5PrZs,56147168
|
25
|
+
cocoindex-0.1.32.dist-info/RECORD,,
|
File without changes
|
File without changes
|