gaard-client 0.2.2__tar.gz → 0.2.6__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.
- {gaard_client-0.2.2 → gaard_client-0.2.6}/PKG-INFO +11 -4
- {gaard_client-0.2.2 → gaard_client-0.2.6}/README.md +8 -2
- {gaard_client-0.2.2 → gaard_client-0.2.6}/pyproject.toml +3 -2
- {gaard_client-0.2.2 → gaard_client-0.2.6}/src/gaard_client/cli.py +2 -4
- gaard_client-0.2.6/src/gaard_client/cli_commands.py +49 -0
- gaard_client-0.2.6/src/gaard_client/client-web/assets/getgaard.svg +87 -0
- gaard_client-0.2.6/src/gaard_client/client-web/assets/main.js +3072 -0
- gaard_client-0.2.6/src/gaard_client/client-web/assets/styles.css +2919 -0
- {gaard_client-0.2.2 → gaard_client-0.2.6}/src/gaard_client/client-web/index.html +6 -0
- gaard_client-0.2.6/src/gaard_client/main.py +956 -0
- {gaard_client-0.2.2 → gaard_client-0.2.6}/src/gaard_client.egg-info/PKG-INFO +11 -4
- {gaard_client-0.2.2 → gaard_client-0.2.6}/src/gaard_client.egg-info/SOURCES.txt +1 -0
- {gaard_client-0.2.2 → gaard_client-0.2.6}/src/gaard_client.egg-info/requires.txt +2 -1
- gaard_client-0.2.6/tests/test_cli.py +83 -0
- gaard_client-0.2.6/tests/test_client_app.py +766 -0
- gaard_client-0.2.2/src/gaard_client/cli_commands.py +0 -21
- gaard_client-0.2.2/src/gaard_client/client-web/assets/main.js +0 -665
- gaard_client-0.2.2/src/gaard_client/client-web/assets/styles.css +0 -636
- gaard_client-0.2.2/src/gaard_client/main.py +0 -284
- gaard_client-0.2.2/tests/test_cli.py +0 -20
- gaard_client-0.2.2/tests/test_client_app.py +0 -388
- {gaard_client-0.2.2 → gaard_client-0.2.6}/setup.cfg +0 -0
- {gaard_client-0.2.2 → gaard_client-0.2.6}/src/gaard_client/__init__.py +0 -0
- {gaard_client-0.2.2 → gaard_client-0.2.6}/src/gaard_client.egg-info/dependency_links.txt +0 -0
- {gaard_client-0.2.2 → gaard_client-0.2.6}/src/gaard_client.egg-info/entry_points.txt +0 -0
- {gaard_client-0.2.2 → gaard_client-0.2.6}/src/gaard_client.egg-info/top_level.txt +0 -0
|
@@ -1,14 +1,15 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: gaard-client
|
|
3
|
-
Version: 0.2.
|
|
3
|
+
Version: 0.2.6
|
|
4
4
|
Summary: GAARD frontend web services providing client interface
|
|
5
5
|
Requires-Python: >=3.11
|
|
6
6
|
Description-Content-Type: text/markdown
|
|
7
|
-
Requires-Dist: gaard-plugin-api<0.3.0,>=0.2.
|
|
7
|
+
Requires-Dist: gaard-plugin-api<0.3.0,>=0.2.6
|
|
8
8
|
Requires-Dist: fastapi>=0.111.0
|
|
9
9
|
Requires-Dist: uvicorn[standard]>=0.30.0
|
|
10
10
|
Requires-Dist: pydantic>=2.7.0
|
|
11
11
|
Requires-Dist: httpx2>=2.5.0
|
|
12
|
+
Requires-Dist: python-multipart>=0.0.9
|
|
12
13
|
Provides-Extra: dev
|
|
13
14
|
Requires-Dist: pytest>=8.0.0; extra == "dev"
|
|
14
15
|
Requires-Dist: ruff>=0.5.0; extra == "dev"
|
|
@@ -32,7 +33,13 @@ After installation, start it with:
|
|
|
32
33
|
gaard-client start
|
|
33
34
|
```
|
|
34
35
|
|
|
35
|
-
The command accepts `--host`, `--port`, and `--
|
|
36
|
-
available at `http://localhost:8001
|
|
36
|
+
The command accepts `--host`, `--port`, `--reload`, and `--api-url`. By default the client is
|
|
37
|
+
available at `http://localhost:8001`.
|
|
38
|
+
|
|
39
|
+
Use `--api-url` to point the client server to a specific GAARD API instance:
|
|
40
|
+
|
|
41
|
+
```bash
|
|
42
|
+
gaard-client start --api-url http://localhost:8000
|
|
43
|
+
```
|
|
37
44
|
|
|
38
45
|
The older `gaard client` command remains available for compatibility.
|
|
@@ -16,7 +16,13 @@ After installation, start it with:
|
|
|
16
16
|
gaard-client start
|
|
17
17
|
```
|
|
18
18
|
|
|
19
|
-
The command accepts `--host`, `--port`, and `--
|
|
20
|
-
available at `http://localhost:8001
|
|
19
|
+
The command accepts `--host`, `--port`, `--reload`, and `--api-url`. By default the client is
|
|
20
|
+
available at `http://localhost:8001`.
|
|
21
|
+
|
|
22
|
+
Use `--api-url` to point the client server to a specific GAARD API instance:
|
|
23
|
+
|
|
24
|
+
```bash
|
|
25
|
+
gaard-client start --api-url http://localhost:8000
|
|
26
|
+
```
|
|
21
27
|
|
|
22
28
|
The older `gaard client` command remains available for compatibility.
|
|
@@ -4,17 +4,18 @@ build-backend = "setuptools.build_meta"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "gaard-client"
|
|
7
|
-
version = "0.2.
|
|
7
|
+
version = "0.2.6"
|
|
8
8
|
description = "GAARD frontend web services providing client interface"
|
|
9
9
|
readme = "README.md"
|
|
10
10
|
requires-python = ">=3.11"
|
|
11
11
|
|
|
12
12
|
dependencies = [
|
|
13
|
-
"gaard-plugin-api>=0.2.
|
|
13
|
+
"gaard-plugin-api>=0.2.6,<0.3.0",
|
|
14
14
|
"fastapi>=0.111.0",
|
|
15
15
|
"uvicorn[standard]>=0.30.0",
|
|
16
16
|
"pydantic>=2.7.0",
|
|
17
17
|
"httpx2>=2.5.0",
|
|
18
|
+
"python-multipart>=0.0.9",
|
|
18
19
|
]
|
|
19
20
|
|
|
20
21
|
[project.optional-dependencies]
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import argparse
|
|
2
2
|
from collections.abc import Sequence
|
|
3
3
|
|
|
4
|
-
from gaard_client.cli_commands import run_client
|
|
4
|
+
from gaard_client.cli_commands import add_client_server_arguments, run_client
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
def create_parser(prog: str = "gaard-client") -> argparse.ArgumentParser:
|
|
@@ -12,9 +12,7 @@ def create_parser(prog: str = "gaard-client") -> argparse.ArgumentParser:
|
|
|
12
12
|
subparsers = parser.add_subparsers(dest="command", required=True)
|
|
13
13
|
|
|
14
14
|
start_parser = subparsers.add_parser("start", help="Start the client server.")
|
|
15
|
-
start_parser
|
|
16
|
-
start_parser.add_argument("--port", type=int, default=8001)
|
|
17
|
-
start_parser.add_argument("--reload", action="store_true")
|
|
15
|
+
add_client_server_arguments(start_parser)
|
|
18
16
|
start_parser.set_defaults(func=run_client)
|
|
19
17
|
|
|
20
18
|
return parser
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
from __future__ import annotations
|
|
2
|
+
|
|
3
|
+
import os
|
|
4
|
+
from argparse import ArgumentParser, ArgumentTypeError, Namespace, _SubParsersAction
|
|
5
|
+
from urllib.parse import urlparse
|
|
6
|
+
|
|
7
|
+
import uvicorn
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
def normalize_api_url(value: str) -> str:
|
|
11
|
+
normalized = value.strip().rstrip("/")
|
|
12
|
+
parsed = urlparse(normalized)
|
|
13
|
+
if parsed.scheme not in {"http", "https"} or not parsed.netloc:
|
|
14
|
+
raise ArgumentTypeError("API URL must be an absolute http:// or https:// URL.")
|
|
15
|
+
|
|
16
|
+
return normalized
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
def add_client_server_arguments(parser: ArgumentParser) -> None:
|
|
20
|
+
parser.add_argument("--host", default="127.0.0.1")
|
|
21
|
+
parser.add_argument("--port", type=int, default=8001)
|
|
22
|
+
parser.add_argument("--reload", action="store_true")
|
|
23
|
+
parser.add_argument(
|
|
24
|
+
"--api-url",
|
|
25
|
+
"--backend-url",
|
|
26
|
+
dest="api_url",
|
|
27
|
+
type=normalize_api_url,
|
|
28
|
+
default=None,
|
|
29
|
+
help="GAARD API URL used by the client server, e.g. http://localhost:8000.",
|
|
30
|
+
)
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
def register(subparsers: _SubParsersAction[ArgumentParser]) -> None:
|
|
34
|
+
parser = subparsers.add_parser("client")
|
|
35
|
+
add_client_server_arguments(parser)
|
|
36
|
+
parser.set_defaults(func=run_client)
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
def run_client(args: Namespace) -> None:
|
|
40
|
+
api_url = getattr(args, "api_url", None)
|
|
41
|
+
if api_url:
|
|
42
|
+
os.environ["GAARD_CLIENT_BACKEND_URL"] = api_url
|
|
43
|
+
|
|
44
|
+
uvicorn.run(
|
|
45
|
+
"gaard_client.main:app",
|
|
46
|
+
host=args.host,
|
|
47
|
+
port=args.port,
|
|
48
|
+
reload=args.reload,
|
|
49
|
+
)
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
|
2
|
+
<!-- Created with Inkscape (http://www.inkscape.org/) -->
|
|
3
|
+
|
|
4
|
+
<svg
|
|
5
|
+
version="1.1"
|
|
6
|
+
id="svg1"
|
|
7
|
+
width="1672"
|
|
8
|
+
height="1672"
|
|
9
|
+
viewBox="0 0 1672 1672"
|
|
10
|
+
sodipodi:docname="getgaard.svg"
|
|
11
|
+
inkscape:version="1.4 (e7c3feb1, 2024-10-09)"
|
|
12
|
+
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
|
13
|
+
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
|
14
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
15
|
+
xmlns:svg="http://www.w3.org/2000/svg">
|
|
16
|
+
<defs
|
|
17
|
+
id="defs1" />
|
|
18
|
+
<sodipodi:namedview
|
|
19
|
+
id="namedview1"
|
|
20
|
+
pagecolor="#ffffff"
|
|
21
|
+
bordercolor="#000000"
|
|
22
|
+
borderopacity="0.25"
|
|
23
|
+
inkscape:showpageshadow="2"
|
|
24
|
+
inkscape:pageopacity="0.0"
|
|
25
|
+
inkscape:pagecheckerboard="0"
|
|
26
|
+
inkscape:deskcolor="#d1d1d1"
|
|
27
|
+
inkscape:zoom="0.17088526"
|
|
28
|
+
inkscape:cx="2182.7512"
|
|
29
|
+
inkscape:cy="111.18572"
|
|
30
|
+
inkscape:window-width="1560"
|
|
31
|
+
inkscape:window-height="771"
|
|
32
|
+
inkscape:window-x="0"
|
|
33
|
+
inkscape:window-y="25"
|
|
34
|
+
inkscape:window-maximized="0"
|
|
35
|
+
inkscape:current-layer="g1" />
|
|
36
|
+
<g
|
|
37
|
+
inkscape:groupmode="layer"
|
|
38
|
+
inkscape:label="Image"
|
|
39
|
+
id="g1">
|
|
40
|
+
<g
|
|
41
|
+
id="g6"
|
|
42
|
+
transform="matrix(1.0610508,0,0,1.0610508,-2611.1446,1006.5308)">
|
|
43
|
+
<rect
|
|
44
|
+
style="fill:#111e2f;fill-opacity:1;stroke-width:1.09542"
|
|
45
|
+
id="rect2"
|
|
46
|
+
width="1437.7893"
|
|
47
|
+
height="1437.7893"
|
|
48
|
+
x="2529.908"
|
|
49
|
+
y="-879.6134"
|
|
50
|
+
ry="320.62204" />
|
|
51
|
+
<path
|
|
52
|
+
id="rect1"
|
|
53
|
+
style="fill:#ffffff;stroke-width:1.09542"
|
|
54
|
+
d="m 3234.3408,-626.0861 c -13.6106,0.3309 -25.9368,1.0895 -34.8867,2.3418 -84.1236,11.7709 -151.8696,39.6365 -216.4922,89.0508 -88.4727,67.6513 -151.6819,174.0139 -171.4746,288.5391 -8.8934,51.4587 -8.6698,114.0636 0.5859,163.333996 8.6422,46.004504 21.2085,84.4823042 40.9121,125.273404 23.7832,49.237 50.781,87.8784 88.418,126.5547 91.8576,94.394 218.5332,143.6113 347.0449,134.8359 127.7123,-8.7209 240.4621,-72.1949 316.1836,-177.998 45.9159,-64.1567 74.5299,-138.5546 84.8711,-220.666004 2.9258,-23.231196 4.2525,-75.228896 1.9883,-77.957096 -1.5107,-1.8203 -25.8188,-2.0429 -222.8203,-2.0429 -217.2534,0 -221.1459,0.044 -222.502,2.5781 -0.885,1.6537 -1.3808,21.59 -1.3808,55.5625 0,47.4299 0.2317,53.2391 2.207,55.4218 2.1138,2.3358 8.7633,2.4375 158,2.4376 129.1634,0 155.793,0.305 155.793,1.7832 0,3.2418 -7.4812,26.672 -12.6289,39.5507 -17.8663,44.6984 -41.4198,80.6843 -74.6856,114.1075 -26.441,26.566 -51.6323,44.8176 -82.6855,59.9082 -124.9554,60.7235 -275.5308,28.7986 -373.086,-79.1016 -92.4325,-102.2344 -119.9458,-248.8362 -70.1562,-373.8106 17.3657,-43.5887 43.6592,-83.5871 76.4023,-116.2246 38.482,-38.3578 81.0392,-64.5511 132.1739,-81.3515 48.2572,-15.855 102.913,-19.5453 159.332,-10.7598 6.9666,1.0848 13.6858,2.2858 14.9316,2.6699 1.272,0.392 3.4643,-0.5013 5,-2.0371 2.6697,-2.6697 2.7364,-4.0526 2.7364,-58.0371 v -55.3027 l -3,-1.9356 c -7.5481,-4.8687 -59.9495,-7.7173 -100.7813,-6.7246 z"
|
|
55
|
+
sodipodi:nodetypes="ssssssssssssssssssssssssssscsss" />
|
|
56
|
+
<g
|
|
57
|
+
id="g5"
|
|
58
|
+
transform="translate(2457.7895,-1000.6715)"
|
|
59
|
+
style="fill:#0cc6a6;fill-opacity:1">
|
|
60
|
+
<rect
|
|
61
|
+
style="opacity:1;fill:#0cc6a6;fill-opacity:1;stroke-width:0.938067"
|
|
62
|
+
id="rect3"
|
|
63
|
+
width="72.260895"
|
|
64
|
+
height="134.18539"
|
|
65
|
+
x="936.10278"
|
|
66
|
+
y="636.39392"
|
|
67
|
+
ry="15.974472" />
|
|
68
|
+
<rect
|
|
69
|
+
style="opacity:1;fill:#0cc6a6;fill-opacity:1;stroke-width:1.20121"
|
|
70
|
+
id="rect4"
|
|
71
|
+
width="72.260895"
|
|
72
|
+
height="220.02458"
|
|
73
|
+
x="1046.6084"
|
|
74
|
+
y="550.55475"
|
|
75
|
+
ry="19.286819" />
|
|
76
|
+
<rect
|
|
77
|
+
style="opacity:1;fill:#0cc6a6;fill-opacity:1;stroke-width:1.50056"
|
|
78
|
+
id="rect5"
|
|
79
|
+
width="72.260895"
|
|
80
|
+
height="343.35675"
|
|
81
|
+
x="1159.0873"
|
|
82
|
+
y="427.22256"
|
|
83
|
+
ry="10.289478" />
|
|
84
|
+
</g>
|
|
85
|
+
</g>
|
|
86
|
+
</g>
|
|
87
|
+
</svg>
|