cuiman 0.2.0__tar.gz → 0.2.1.dev1__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.
- {cuiman-0.2.0 → cuiman-0.2.1.dev1}/PKG-INFO +3 -2
- {cuiman-0.2.0 → cuiman-0.2.1.dev1}/cuiman/app/service.py +23 -3
- {cuiman-0.2.0 → cuiman-0.2.1.dev1}/pyproject.toml +3 -2
- {cuiman-0.2.0 → cuiman-0.2.1.dev1}/.gitignore +0 -0
- {cuiman-0.2.0 → cuiman-0.2.1.dev1}/LICENSE +0 -0
- {cuiman-0.2.0 → cuiman-0.2.1.dev1}/README.md +0 -0
- {cuiman-0.2.0 → cuiman-0.2.1.dev1}/cuiman/__init__.py +0 -0
- {cuiman-0.2.0 → cuiman-0.2.1.dev1}/cuiman/api/__init__.py +0 -0
- {cuiman-0.2.0 → cuiman-0.2.1.dev1}/cuiman/api/async_client.py +0 -0
- {cuiman-0.2.0 → cuiman-0.2.1.dev1}/cuiman/api/async_client_mixin.py +0 -0
- {cuiman-0.2.0 → cuiman-0.2.1.dev1}/cuiman/api/auth/__init__.py +0 -0
- {cuiman-0.2.0 → cuiman-0.2.1.dev1}/cuiman/api/auth/config.py +0 -0
- {cuiman-0.2.0 → cuiman-0.2.1.dev1}/cuiman/api/auth/login.py +0 -0
- {cuiman-0.2.0 → cuiman-0.2.1.dev1}/cuiman/api/auth/login_async.py +0 -0
- {cuiman-0.2.0 → cuiman-0.2.1.dev1}/cuiman/api/client.py +0 -0
- {cuiman-0.2.0 → cuiman-0.2.1.dev1}/cuiman/api/client_app_mixin.py +0 -0
- {cuiman-0.2.0 → cuiman-0.2.1.dev1}/cuiman/api/client_mixin.py +0 -0
- {cuiman-0.2.0 → cuiman-0.2.1.dev1}/cuiman/api/config.py +0 -0
- {cuiman-0.2.0 → cuiman-0.2.1.dev1}/cuiman/api/defaults.py +0 -0
- {cuiman-0.2.0 → cuiman-0.2.1.dev1}/cuiman/api/exceptions.py +0 -0
- {cuiman-0.2.0 → cuiman-0.2.1.dev1}/cuiman/api/ishell.py +0 -0
- {cuiman-0.2.0 → cuiman-0.2.1.dev1}/cuiman/api/jobs.py +0 -0
- {cuiman-0.2.0 → cuiman-0.2.1.dev1}/cuiman/api/opener/__init__.py +0 -0
- {cuiman-0.2.0 → cuiman-0.2.1.dev1}/cuiman/api/opener/context.py +0 -0
- {cuiman-0.2.0 → cuiman-0.2.1.dev1}/cuiman/api/opener/errors.py +0 -0
- {cuiman-0.2.0 → cuiman-0.2.1.dev1}/cuiman/api/opener/impl/__init__.py +0 -0
- {cuiman-0.2.0 → cuiman-0.2.1.dev1}/cuiman/api/opener/impl/_gpd.py +0 -0
- {cuiman-0.2.0 → cuiman-0.2.1.dev1}/cuiman/api/opener/impl/_image.py +0 -0
- {cuiman-0.2.0 → cuiman-0.2.1.dev1}/cuiman/api/opener/impl/_pd.py +0 -0
- {cuiman-0.2.0 → cuiman-0.2.1.dev1}/cuiman/api/opener/impl/_xr.py +0 -0
- {cuiman-0.2.0 → cuiman-0.2.1.dev1}/cuiman/api/opener/impl/base.py +0 -0
- {cuiman-0.2.0 → cuiman-0.2.1.dev1}/cuiman/api/opener/impl/openers.py +0 -0
- {cuiman-0.2.0 → cuiman-0.2.1.dev1}/cuiman/api/opener/opener.py +0 -0
- {cuiman-0.2.0 → cuiman-0.2.1.dev1}/cuiman/api/opener/registry.py +0 -0
- {cuiman-0.2.0 → cuiman-0.2.1.dev1}/cuiman/api/service_client.py +0 -0
- {cuiman-0.2.0 → cuiman-0.2.1.dev1}/cuiman/api/transport/__init__.py +0 -0
- {cuiman-0.2.0 → cuiman-0.2.1.dev1}/cuiman/api/transport/args.py +0 -0
- {cuiman-0.2.0 → cuiman-0.2.1.dev1}/cuiman/api/transport/httpx.py +0 -0
- {cuiman-0.2.0 → cuiman-0.2.1.dev1}/cuiman/api/transport/transport.py +0 -0
- {cuiman-0.2.0 → cuiman-0.2.1.dev1}/cuiman/app/__init__.py +0 -0
- {cuiman-0.2.0 → cuiman-0.2.1.dev1}/cuiman/app/app.py +0 -0
- {cuiman-0.2.0 → cuiman-0.2.1.dev1}/cuiman/app/display.py +0 -0
- {cuiman-0.2.0 → cuiman-0.2.1.dev1}/cuiman/app/dist/assets/index-9NSgOSt1.js +0 -0
- {cuiman-0.2.0 → cuiman-0.2.1.dev1}/cuiman/app/dist/assets/index-DKE7nU5k.css +0 -0
- {cuiman-0.2.0 → cuiman-0.2.1.dev1}/cuiman/app/dist/eozilla-small.svg +0 -0
- {cuiman-0.2.0 → cuiman-0.2.1.dev1}/cuiman/app/dist/eozilla.svg +0 -0
- {cuiman-0.2.0 → cuiman-0.2.1.dev1}/cuiman/app/dist/index.html +0 -0
- {cuiman-0.2.0 → cuiman-0.2.1.dev1}/cuiman/app/dist/privacy.md +0 -0
- {cuiman-0.2.0 → cuiman-0.2.1.dev1}/cuiman/app/notebook-display.js +0 -0
- {cuiman-0.2.0 → cuiman-0.2.1.dev1}/cuiman/app/serve.py +0 -0
- {cuiman-0.2.0 → cuiman-0.2.1.dev1}/cuiman/app/url.py +0 -0
- {cuiman-0.2.0 → cuiman-0.2.1.dev1}/cuiman/cli/__init__.py +0 -0
- {cuiman-0.2.0 → cuiman-0.2.1.dev1}/cuiman/cli/cli.py +0 -0
- {cuiman-0.2.0 → cuiman-0.2.1.dev1}/cuiman/cli/client.py +0 -0
- {cuiman-0.2.0 → cuiman-0.2.1.dev1}/cuiman/cli/config.py +0 -0
- {cuiman-0.2.0 → cuiman-0.2.1.dev1}/cuiman/cli/output.py +0 -0
- {cuiman-0.2.0 → cuiman-0.2.1.dev1}/cuiman/py.typed +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: cuiman
|
|
3
|
-
Version: 0.2.
|
|
3
|
+
Version: 0.2.1.dev1
|
|
4
4
|
Summary: Provides a client Python API, GUI, and CLI for servers compliant with OGC API - Processes
|
|
5
5
|
Project-URL: Documentation, https://eo-tools.github.io/eozilla
|
|
6
6
|
Project-URL: Repository, https://github.com/eo-tools/eozilla
|
|
@@ -27,8 +27,9 @@ Classifier: Topic :: Scientific/Engineering
|
|
|
27
27
|
Classifier: Topic :: Software Development
|
|
28
28
|
Classifier: Typing :: Typed
|
|
29
29
|
Requires-Python: >=3.10
|
|
30
|
-
Requires-Dist: gavicore>=0.2.
|
|
30
|
+
Requires-Dist: gavicore>=0.2.1.dev1
|
|
31
31
|
Requires-Dist: httpx
|
|
32
|
+
Requires-Dist: ipython
|
|
32
33
|
Requires-Dist: pydantic
|
|
33
34
|
Requires-Dist: pydantic-settings
|
|
34
35
|
Requires-Dist: pyyaml
|
|
@@ -68,15 +68,33 @@ _AUTH_TYPE_TO_APPLICABLE_KEYS: dict[str, tuple[str, ...]] = {
|
|
|
68
68
|
}
|
|
69
69
|
|
|
70
70
|
|
|
71
|
+
def _effective_auth_type(client_config: ClientConfig) -> str:
|
|
72
|
+
"""
|
|
73
|
+
Resolve the auth type to forward to the app.
|
|
74
|
+
|
|
75
|
+
``"login"`` means the *Python* client performs a username/password login
|
|
76
|
+
to obtain a token. By the time this is called (e.g. from ``show_app()``),
|
|
77
|
+
that login has already happened and ``client_config.token`` holds a
|
|
78
|
+
resolved access token — the app doesn't need to (and can't) repeat that
|
|
79
|
+
login. Forwarding ``auth_type="login"`` verbatim makes the app treat it
|
|
80
|
+
like an interactive OAuth2/PKCE login, discarding the already-valid
|
|
81
|
+
token and forcing a redundant sign-in. Once a token is resolved, forward
|
|
82
|
+
it as ``"token"`` instead, so the app connects immediately.
|
|
83
|
+
"""
|
|
84
|
+
auth_type = client_config.auth_type or "none"
|
|
85
|
+
if auth_type == "login" and client_config.token:
|
|
86
|
+
return "token"
|
|
87
|
+
return auth_type
|
|
88
|
+
|
|
89
|
+
|
|
71
90
|
def _config_to_service_options(client_config: ClientConfig) -> dict[str, Any]:
|
|
72
91
|
"""
|
|
73
92
|
Convert a ClientConfig object to a JSON-serializable dict, which includes
|
|
74
93
|
only keywords applicable to the given ``auth_config.auth_type``.
|
|
75
94
|
"""
|
|
76
95
|
auth_keys = set(AuthConfig.model_fields.keys())
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
]
|
|
96
|
+
effective_auth_type = _effective_auth_type(client_config)
|
|
97
|
+
applicable_auth_keys = _AUTH_TYPE_TO_APPLICABLE_KEYS[effective_auth_type]
|
|
80
98
|
auth_config_dict = {
|
|
81
99
|
k: v
|
|
82
100
|
for k, v in client_config.model_dump(
|
|
@@ -85,6 +103,8 @@ def _config_to_service_options(client_config: ClientConfig) -> dict[str, Any]:
|
|
|
85
103
|
).items()
|
|
86
104
|
if k not in auth_keys or k in applicable_auth_keys
|
|
87
105
|
}
|
|
106
|
+
if "auth_type" in auth_config_dict:
|
|
107
|
+
auth_config_dict["auth_type"] = effective_auth_type
|
|
88
108
|
# Additional cleanup
|
|
89
109
|
if "token_header" in auth_config_dict and client_config.use_bearer:
|
|
90
110
|
del auth_config_dict["token_header"]
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "cuiman"
|
|
7
|
-
version = "0.2.
|
|
7
|
+
version = "0.2.1.dev1"
|
|
8
8
|
description = "Provides a client Python API, GUI, and CLI for servers compliant with OGC API - Processes"
|
|
9
9
|
readme = "README.md"
|
|
10
10
|
authors = [
|
|
@@ -40,6 +40,7 @@ classifiers = [
|
|
|
40
40
|
]
|
|
41
41
|
requires-python = ">=3.10"
|
|
42
42
|
dependencies = [
|
|
43
|
+
"ipython",
|
|
43
44
|
"pydantic",
|
|
44
45
|
"pydantic-settings",
|
|
45
46
|
"pyyaml",
|
|
@@ -48,7 +49,7 @@ dependencies = [
|
|
|
48
49
|
"uri-template",
|
|
49
50
|
"httpx",
|
|
50
51
|
# local dependency
|
|
51
|
-
"gavicore >=0.2.
|
|
52
|
+
"gavicore >=0.2.1.dev1",
|
|
52
53
|
]
|
|
53
54
|
|
|
54
55
|
[project.scripts]
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|