qodalis-cli-server-plugin-data-explorer-postgres 1.0.0b30__py3-none-any.whl → 1.0.0b32__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.
@@ -0,0 +1,52 @@
1
+ """The PostgreSQL data explorer source's entry point (``qodalis_cli.plugins``): one source of the data explorer
2
+ (``/api/qcli/data-explorer``, the dashboard's Data explorer page, the ``data_*`` MCP tools), its connection as settings
3
+ (a ``secret``: kept server-side, never returned). Read-only by default. Nothing is added until it is configured
4
+ (then a restart): until then the plugin needs configuration."""
5
+
6
+ from __future__ import annotations
7
+
8
+ from typing import Any
9
+
10
+ from qodalis_cli_server_abstractions import CLI_PLUGIN_LOAD_ORDER, CliPluginEntryInfo
11
+ from qodalis_cli_server_abstractions.config import CliConfigSettingDefinition
12
+ from qodalis_cli_server_abstractions.data_explorer_source_entry import (
13
+ DataExplorerSourceEntry,
14
+ connection_setting,
15
+ create_data_explorer_source,
16
+ data_explorer_source_settings,
17
+ )
18
+ from qodalis_cli_server_abstractions.data_explorer_types import DataExplorerLanguage, DataExplorerOutputFormat
19
+
20
+ #: The plugin, for ``builder.add_plugin`` (the marketplace's record says it for an installed copy).
21
+ plugin = CliPluginEntryInfo(id="data-explorer-postgres", package="qodalis-cli-server-plugin-data-explorer-postgres", title="Data explorer: PostgreSQL", icon="🐘")
22
+
23
+ #: Loads after the data explorer's own entry.
24
+ order = CLI_PLUGIN_LOAD_ORDER.SOURCE
25
+
26
+
27
+ def _create(v: dict[str, Any], context: Any) -> Any:
28
+ from .postgres_provider import PostgresDataExplorerProvider
29
+
30
+ return PostgresDataExplorerProvider(str(v["connectionString"]))
31
+
32
+
33
+ ENTRY = DataExplorerSourceEntry(
34
+ title="Data explorer: PostgreSQL",
35
+ name="postgres",
36
+ description="PostgreSQL database",
37
+ language=DataExplorerLanguage.SQL,
38
+ output=DataExplorerOutputFormat.TABLE,
39
+ connection=[
40
+ connection_setting("e.g. postgresql://user:password@host:5432/database"),
41
+ ],
42
+ create=_create,
43
+ )
44
+
45
+
46
+ def settings() -> list[CliConfigSettingDefinition]:
47
+ """Its settings (code options of the same keys are their defaults)."""
48
+ return data_explorer_source_settings(ENTRY)
49
+
50
+
51
+ async def create_plugin(context: Any) -> Any:
52
+ return await create_data_explorer_source(context, ENTRY)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.5
2
2
  Name: qodalis-cli-server-plugin-data-explorer-postgres
3
- Version: 1.0.0b30
3
+ Version: 1.0.0b32
4
4
  Summary: PostgreSQL Data Explorer provider plugin for Qodalis CLI servers
5
5
  Project-URL: Homepage, https://github.com/qodalis-solutions/cli-server-python
6
6
  Project-URL: Repository, https://github.com/qodalis-solutions/cli-server-python
@@ -0,0 +1,7 @@
1
+ qodalis_cli_data_explorer_postgres/__init__.py,sha256=sw7o9T2oDKZdIquXQ3s6OT0yooEXrFSID_vpBmy-kgo,272
2
+ qodalis_cli_data_explorer_postgres/plugin.py,sha256=hpTltulQOYf_aGDzbDZjj1ycKhGk3L4GvIkX2sbm26Y,2110
3
+ qodalis_cli_data_explorer_postgres/postgres_provider.py,sha256=ehpIimpTGvp9yOX4c1As_13bpua2gFBQXQLn5wJrS-k,6368
4
+ qodalis_cli_server_plugin_data_explorer_postgres-1.0.0b32.dist-info/METADATA,sha256=LMdkXUDJomWja3a3XunEbK701pcUjqC2GlX4kuGtuL4,714
5
+ qodalis_cli_server_plugin_data_explorer_postgres-1.0.0b32.dist-info/WHEEL,sha256=2iZrJkDIkeDh0k9SikKMqFuRP-ua6mb4Ir1AsER4BEw,87
6
+ qodalis_cli_server_plugin_data_explorer_postgres-1.0.0b32.dist-info/entry_points.txt,sha256=dj7R9RBfLkZN4pr6diII26pyPjMZPlhIpM8xMW9uX84,103
7
+ qodalis_cli_server_plugin_data_explorer_postgres-1.0.0b32.dist-info/RECORD,,
@@ -0,0 +1,2 @@
1
+ [qodalis_cli.plugins]
2
+ data-explorer-postgres = qodalis_cli_data_explorer_postgres.plugin:create_plugin
@@ -1,5 +0,0 @@
1
- qodalis_cli_data_explorer_postgres/__init__.py,sha256=sw7o9T2oDKZdIquXQ3s6OT0yooEXrFSID_vpBmy-kgo,272
2
- qodalis_cli_data_explorer_postgres/postgres_provider.py,sha256=ehpIimpTGvp9yOX4c1As_13bpua2gFBQXQLn5wJrS-k,6368
3
- qodalis_cli_server_plugin_data_explorer_postgres-1.0.0b30.dist-info/METADATA,sha256=5dppbowOB-i7MvNSm7OxJNmUurBgZisvWQqqc5gAFxQ,714
4
- qodalis_cli_server_plugin_data_explorer_postgres-1.0.0b30.dist-info/WHEEL,sha256=2iZrJkDIkeDh0k9SikKMqFuRP-ua6mb4Ir1AsER4BEw,87
5
- qodalis_cli_server_plugin_data_explorer_postgres-1.0.0b30.dist-info/RECORD,,