gaard-client 0.1.0__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.
@@ -0,0 +1,37 @@
1
+ Metadata-Version: 2.4
2
+ Name: gaard-client
3
+ Version: 0.1.0
4
+ Summary: GAARD frontend web services providing client interface
5
+ Requires-Python: >=3.11
6
+ Description-Content-Type: text/markdown
7
+ Requires-Dist: fastapi>=0.111.0
8
+ Requires-Dist: uvicorn[standard]>=0.30.0
9
+ Requires-Dist: pydantic>=2.7.0
10
+ Requires-Dist: httpx>=0.27.0
11
+ Provides-Extra: dev
12
+ Requires-Dist: pytest>=8.0.0; extra == "dev"
13
+ Requires-Dist: ruff>=0.5.0; extra == "dev"
14
+ Requires-Dist: mypy>=1.10.0; extra == "dev"
15
+
16
+ # GAARD - Governed AI Access to Relational Data
17
+
18
+ GAARD is a self-hosted AI SQL Gateway for governed natural-language access to relational data.
19
+
20
+ GAARD allows applications and users to ask questions about relational databases using natural language while keeping SQL generation, validation, execution, prompts, connectors, and auditability under control.
21
+
22
+ For more informacion see https://github.com/pkroliszewski/gaard
23
+
24
+ # This package
25
+
26
+ `gaard-client` provides the community web client for `gaard-api`.
27
+
28
+ After installation, start it with:
29
+
30
+ ```bash
31
+ gaard-client start
32
+ ```
33
+
34
+ The command accepts `--host`, `--port`, and `--reload`. By default the client is
35
+ available at `http://localhost:8001?backendUrl=http://localhost:8000`.
36
+
37
+ The older `gaard client` command remains available for compatibility.
@@ -0,0 +1,22 @@
1
+ # GAARD - Governed AI Access to Relational Data
2
+
3
+ GAARD is a self-hosted AI SQL Gateway for governed natural-language access to relational data.
4
+
5
+ GAARD allows applications and users to ask questions about relational databases using natural language while keeping SQL generation, validation, execution, prompts, connectors, and auditability under control.
6
+
7
+ For more informacion see https://github.com/pkroliszewski/gaard
8
+
9
+ # This package
10
+
11
+ `gaard-client` provides the community web client for `gaard-api`.
12
+
13
+ After installation, start it with:
14
+
15
+ ```bash
16
+ gaard-client start
17
+ ```
18
+
19
+ The command accepts `--host`, `--port`, and `--reload`. By default the client is
20
+ available at `http://localhost:8001?backendUrl=http://localhost:8000`.
21
+
22
+ The older `gaard client` command remains available for compatibility.
@@ -0,0 +1,48 @@
1
+ [build-system]
2
+ requires = ["setuptools>=69", "wheel"]
3
+ build-backend = "setuptools.build_meta"
4
+
5
+ [project]
6
+ name = "gaard-client"
7
+ version = "0.1.0"
8
+ description = "GAARD frontend web services providing client interface"
9
+ readme = "README.md"
10
+ requires-python = ">=3.11"
11
+
12
+ dependencies = [
13
+ "fastapi>=0.111.0",
14
+ "uvicorn[standard]>=0.30.0",
15
+ "pydantic>=2.7.0",
16
+ "httpx>=0.27.0",
17
+ ]
18
+
19
+ [project.optional-dependencies]
20
+ dev = [
21
+ "pytest>=8.0.0",
22
+ "ruff>=0.5.0",
23
+ "mypy>=1.10.0",
24
+ ]
25
+
26
+ [project.scripts]
27
+ gaard-client = "gaard_client.cli:main"
28
+
29
+ [project.entry-points."gaard.commands"]
30
+ client = "gaard_client.cli_commands:register"
31
+
32
+ [tool.setuptools]
33
+ include-package-data = true
34
+
35
+ [tool.setuptools.packages.find]
36
+ where = ["src"]
37
+
38
+ [tool.setuptools.package-data]
39
+ gaard_client = [
40
+ "client-web/**/*",
41
+ ]
42
+
43
+ [tool.ruff]
44
+ line-length = 100
45
+ target-version = "py311"
46
+
47
+ [tool.pytest.ini_options]
48
+ testpaths = ["tests"]
@@ -0,0 +1,4 @@
1
+ [egg_info]
2
+ tag_build =
3
+ tag_date = 0
4
+
@@ -0,0 +1,25 @@
1
+ import argparse
2
+ from collections.abc import Sequence
3
+
4
+ from gaard_client.cli_commands import run_client
5
+
6
+
7
+ def create_parser(prog: str = "gaard-client") -> argparse.ArgumentParser:
8
+ parser = argparse.ArgumentParser(
9
+ prog=prog,
10
+ description="Run the GAARD community client.",
11
+ )
12
+ subparsers = parser.add_subparsers(dest="command", required=True)
13
+
14
+ start_parser = subparsers.add_parser("start", help="Start the client server.")
15
+ start_parser.add_argument("--host", default="127.0.0.1")
16
+ start_parser.add_argument("--port", type=int, default=8001)
17
+ start_parser.add_argument("--reload", action="store_true")
18
+ start_parser.set_defaults(func=run_client)
19
+
20
+ return parser
21
+
22
+
23
+ def main(argv: Sequence[str] | None = None) -> None:
24
+ args = create_parser().parse_args(argv)
25
+ args.func(args)
@@ -0,0 +1,18 @@
1
+ import uvicorn
2
+
3
+
4
+ def register(subparsers):
5
+ parser = subparsers.add_parser("client")
6
+ parser.add_argument("--host", default="127.0.0.1")
7
+ parser.add_argument("--port", type=int, default=8001)
8
+ parser.add_argument("--reload", action="store_true")
9
+ parser.set_defaults(func=run_client)
10
+
11
+
12
+ def run_client(args):
13
+ uvicorn.run(
14
+ "gaard_client.main:app",
15
+ host=args.host,
16
+ port=args.port,
17
+ reload=args.reload,
18
+ )