honua-admin 0.1.7__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,30 @@
1
+ .venv/
2
+ .pytest_cache/
3
+ __pycache__/
4
+ *.py[cod]
5
+ *.egg-info/
6
+ .coverage
7
+ coverage.xml
8
+ htmlcov/
9
+ build/
10
+ dist/
11
+ packages/*/dist/
12
+ release-smoke-results.json
13
+ staging-smoke-results.json
14
+ staging-smoke-junit.xml
15
+ # Fetched shared conformance fixture bundles + lane outputs
16
+ conformance-fixtures-*/
17
+ conformance-junit.xml
18
+ conformance-summary.md
19
+ conformance-server.log
20
+ .honua-gp/
21
+ packages/honua-gp/eval-results.json
22
+ packages/honua-gp/eval-results.xml
23
+ packages/honua-gp/eval/.audit/
24
+
25
+ # Generated MkDocs static site output
26
+ /site/
27
+ .serena/
28
+
29
+ # Local commit-message scratch files
30
+ .git-msg-*.txt
@@ -0,0 +1,75 @@
1
+ # Changelog
2
+
3
+ ## [0.1.7](https://github.com/honua-io/honua-sdk-python/compare/python-admin-v0.1.6...python-admin-v0.1.7) (2026-08-05)
4
+
5
+
6
+ ### Bug Fixes
7
+
8
+ * address SDK quality audit backlog ([#165](https://github.com/honua-io/honua-sdk-python/issues/165)) ([9993c62](https://github.com/honua-io/honua-sdk-python/commit/9993c62fbe6bbd69627b47a8c5274d10099cb007))
9
+ * **admin:** await async auth applier in async admin client ([#150](https://github.com/honua-io/honua-sdk-python/issues/150)) ([47fbbbf](https://github.com/honua-io/honua-sdk-python/commit/47fbbbf8b4e93fd9b47997d862f85dbdd06cf8e6))
10
+
11
+
12
+ ### Documentation
13
+
14
+ * pre-PyPI README refresh for release-frozen long_descriptions ([#190](https://github.com/honua-io/honua-sdk-python/issues/190)) ([217dbb3](https://github.com/honua-io/honua-sdk-python/commit/217dbb38cc051e3fcbfd44cf9712e7826d96160c))
15
+ * README refresh follow-ups - honest install docs and Alpha classifiers ([#187](https://github.com/honua-io/honua-sdk-python/issues/187)) ([af82420](https://github.com/honua-io/honua-sdk-python/commit/af82420932564eb14cb26d5de856b0571b97ce01))
16
+
17
+ ## [0.1.6](https://github.com/honua-io/honua-sdk-python/compare/python-admin-v0.1.5...python-admin-v0.1.6) (2026-06-28)
18
+
19
+
20
+ ### Performance
21
+
22
+ * **sdk:** fix conversion, pagination-memory, and transport-reuse lifecycle issues ([#142](https://github.com/honua-io/honua-sdk-python/issues/142)) ([52db7f9](https://github.com/honua-io/honua-sdk-python/commit/52db7f924c52994a6a32036df7c67219442b2806)), closes [#131](https://github.com/honua-io/honua-sdk-python/issues/131)
23
+
24
+ ## [0.1.5](https://github.com/honua-io/honua-sdk-python/compare/python-admin-v0.1.4...python-admin-v0.1.5) (2026-06-27)
25
+
26
+
27
+ ### Bug Fixes
28
+
29
+ * round-1 audit fixes — geocoding base path, limit=0 crash, gRPC M-only geometry, conformance probes, license text ([#138](https://github.com/honua-io/honua-sdk-python/issues/138)) ([e4644c8](https://github.com/honua-io/honua-sdk-python/commit/e4644c837cb66b54867278d284de7205f7de9bcf))
30
+
31
+ ## [0.1.4](https://github.com/honua-io/honua-sdk-python/compare/python-admin-v0.1.3...python-admin-v0.1.4) (2026-06-10)
32
+
33
+
34
+ ### Features
35
+
36
+ * add styleId-keyed OGC styles client ([#90](https://github.com/honua-io/honua-sdk-python/issues/90)) ([#91](https://github.com/honua-io/honua-sdk-python/issues/91)) ([0b4069c](https://github.com/honua-io/honua-sdk-python/commit/0b4069c61dd1086b97926b2f06e0a569d34cd7e0))
37
+
38
+ ## [0.1.3](https://github.com/honua-io/honua-sdk-python/compare/python-admin-v0.1.2...python-admin-v0.1.3) (2026-05-31)
39
+
40
+
41
+ ### Features
42
+
43
+ * add ArcPy migration scanner ([#59](https://github.com/honua-io/honua-sdk-python/issues/59)) ([#60](https://github.com/honua-io/honua-sdk-python/issues/60)) ([7813832](https://github.com/honua-io/honua-sdk-python/commit/78138322b235e9a31504c794db2bbde18d445a15))
44
+ * Demo: geospatial ETL pipeline and analyst notebook for Python SDK ([#14](https://github.com/honua-io/honua-sdk-python/issues/14)) ([ec132a2](https://github.com/honua-io/honua-sdk-python/commit/ec132a286cd136f869873f300c57c219eaf4ee22))
45
+ * Python SDK notebooks/examples and staging integration tests (#honua-sdk-python-3) ([e1fdd84](https://github.com/honua-io/honua-sdk-python/commit/e1fdd84cf5001c79780a412b20fb7a6eef8dd5d0))
46
+ * **scenes:** Python scene + elevation + offline-package clients (honua-server[#1198](https://github.com/honua-io/honua-sdk-python/issues/1198)) ([#71](https://github.com/honua-io/honua-sdk-python/issues/71)) ([6a518c1](https://github.com/honua-io/honua-sdk-python/commit/6a518c1f703623283d7c08349917b67f343054f4))
47
+
48
+ ## [0.1.1](https://github.com/honua-io/honua-sdk-python/compare/python-admin-v0.1.0...python-admin-v0.1.1) (2026-04-28)
49
+
50
+
51
+ ### Features
52
+
53
+ * Demo: geospatial ETL pipeline and analyst notebook for Python SDK ([#14](https://github.com/honua-io/honua-sdk-python/issues/14)) ([ec132a2](https://github.com/honua-io/honua-sdk-python/commit/ec132a286cd136f869873f300c57c219eaf4ee22))
54
+ * Python SDK notebooks/examples and staging integration tests (#honua-sdk-python-3) ([e1fdd84](https://github.com/honua-io/honua-sdk-python/commit/e1fdd84cf5001c79780a412b20fb7a6eef8dd5d0))
55
+
56
+ ## [0.1.0](https://github.com/honua-io/honua-sdk-python/compare/python-admin-v0.0.2...python-admin-v0.1.0) (2026-04-28)
57
+
58
+
59
+ ### Features
60
+
61
+ * add package-scoped compatibility gate coverage and release validation for admin packaging ([#28](https://github.com/honua-io/honua-sdk-python/pull/28))
62
+ * stabilize the shared SDK/admin utility boundary and update admin to depend on the matching SDK release floor ([#41](https://github.com/honua-io/honua-sdk-python/pull/41))
63
+
64
+
65
+ ### Bug Fixes
66
+
67
+ * fix SDK/admin review findings before the 0.1.0 packaging pass ([#29](https://github.com/honua-io/honua-sdk-python/pull/29))
68
+
69
+ ## [0.0.2](https://github.com/honua-io/honua-sdk-python/compare/python-admin-v0.0.1...python-admin-v0.0.2) (2026-04-25)
70
+
71
+
72
+ ### Features
73
+
74
+ * Demo: geospatial ETL pipeline and analyst notebook for Python SDK ([#14](https://github.com/honua-io/honua-sdk-python/issues/14)) ([ec132a2](https://github.com/honua-io/honua-sdk-python/commit/ec132a286cd136f869873f300c57c219eaf4ee22))
75
+ * Python SDK notebooks/examples and staging integration tests (#honua-sdk-python-3) ([e1fdd84](https://github.com/honua-io/honua-sdk-python/commit/e1fdd84cf5001c79780a412b20fb7a6eef8dd5d0))
@@ -0,0 +1,201 @@
1
+ Apache License
2
+ Version 2.0, January 2004
3
+ http://www.apache.org/licenses/
4
+
5
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6
+
7
+ 1. Definitions.
8
+
9
+ "License" shall mean the terms and conditions for use, reproduction,
10
+ and distribution as defined by Sections 1 through 9 of this document.
11
+
12
+ "Licensor" shall mean the copyright owner or entity authorized by
13
+ the copyright owner that is granting the License.
14
+
15
+ "Legal Entity" shall mean the union of the acting entity and all
16
+ other entities that control, are controlled by, or are under common
17
+ control with that entity. For the purposes of this definition,
18
+ "control" means (i) the power, direct or indirect, to cause the
19
+ direction or management of such entity, whether by contract or
20
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
21
+ outstanding shares, or (iii) beneficial ownership of such entity.
22
+
23
+ "You" (or "Your") shall mean an individual or Legal Entity
24
+ exercising permissions granted by this License.
25
+
26
+ "Source" form shall mean the preferred form for making modifications,
27
+ including but not limited to software source code, documentation
28
+ source, and configuration files.
29
+
30
+ "Object" form shall mean any form resulting from mechanical
31
+ transformation or translation of a Source form, including but
32
+ not limited to compiled object code, generated documentation,
33
+ and conversions to other media types.
34
+
35
+ "Work" shall mean the work of authorship, whether in Source or
36
+ Object form, made available under the License, as indicated by a
37
+ copyright notice that is included in or attached to the work
38
+ (an example is provided in the Appendix below).
39
+
40
+ "Derivative Works" shall mean any work, whether in Source or Object
41
+ form, that is based on (or derived from) the Work and for which the
42
+ editorial revisions, annotations, elaborations, or other modifications
43
+ represent, as a whole, an original work of authorship. For the purposes
44
+ of this License, Derivative Works shall not include works that remain
45
+ separable from, or merely link (or bind by name) to the interfaces of,
46
+ the Work and Derivative Works thereof.
47
+
48
+ "Contribution" shall mean any work of authorship, including
49
+ the original version of the Work and any modifications or additions
50
+ to that Work or Derivative Works thereof, that is intentionally
51
+ submitted to Licensor for inclusion in the Work by the copyright owner
52
+ or by an individual or Legal Entity authorized to submit on behalf of
53
+ the copyright owner. For the purposes of this definition, "submitted"
54
+ means any form of electronic, verbal, or written communication sent
55
+ to the Licensor or its representatives, including but not limited to
56
+ communication on electronic mailing lists, source code control systems,
57
+ and issue tracking systems that are managed by, or on behalf of, the
58
+ Licensor for the purpose of discussing and improving the Work, but
59
+ excluding communication that is conspicuously marked or otherwise
60
+ designated in writing by the copyright owner as "Not a Contribution."
61
+
62
+ "Contributor" shall mean Licensor and any individual or Legal Entity
63
+ on behalf of whom a Contribution has been received by Licensor and
64
+ subsequently incorporated within the Work.
65
+
66
+ 2. Grant of Copyright License. Subject to the terms and conditions of
67
+ this License, each Contributor hereby grants to You a perpetual,
68
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
69
+ copyright license to reproduce, prepare Derivative Works of,
70
+ publicly display, publicly perform, sublicense, and distribute the
71
+ Work and such Derivative Works in Source or Object form.
72
+
73
+ 3. Grant of Patent License. Subject to the terms and conditions of
74
+ this License, each Contributor hereby grants to You a perpetual,
75
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
76
+ (except as stated in this section) patent license to make, have made,
77
+ use, offer to sell, sell, import, and otherwise transfer the Work,
78
+ where such license applies only to those patent claims licensable
79
+ by such Contributor that are necessarily infringed by their
80
+ Contribution(s) alone or by combination of their Contribution(s)
81
+ with the Work to which such Contribution(s) was submitted. If You
82
+ institute patent litigation against any entity (including a
83
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
84
+ or a Contribution incorporated within the Work constitutes direct
85
+ or contributory patent infringement, then any patent licenses
86
+ granted to You under this License for that Work shall terminate
87
+ as of the date such litigation is filed.
88
+
89
+ 4. Redistribution. You may reproduce and distribute copies of the
90
+ Work or Derivative Works thereof in any medium, with or without
91
+ modifications, and in Source or Object form, provided that You
92
+ meet the following conditions:
93
+
94
+ (a) You must give any other recipients of the Work or
95
+ Derivative Works a copy of this License; and
96
+
97
+ (b) You must cause any modified files to carry prominent notices
98
+ stating that You changed the files; and
99
+
100
+ (c) You must retain, in the Source form of any Derivative Works
101
+ that You distribute, all copyright, patent, trademark, and
102
+ attribution notices from the Source form of the Work,
103
+ excluding those notices that do not pertain to any part of
104
+ the Derivative Works; and
105
+
106
+ (d) If the Work includes a "NOTICE" text file as part of its
107
+ distribution, then any Derivative Works that You distribute must
108
+ include a readable copy of the attribution notices contained
109
+ within such NOTICE file, excluding those notices that do not
110
+ pertain to any part of the Derivative Works, in at least one
111
+ of the following places: within a NOTICE text file distributed
112
+ as part of the Derivative Works; within the Source form or
113
+ documentation, if provided along with the Derivative Works; or,
114
+ within a display generated by the Derivative Works, if and
115
+ wherever such third-party notices normally appear. The contents
116
+ of the NOTICE file are for informational purposes only and
117
+ do not modify the License. You may add Your own attribution
118
+ notices within Derivative Works that You distribute, alongside
119
+ or as an addendum to the NOTICE text from the Work, provided
120
+ that such additional attribution notices cannot be construed
121
+ as modifying the License.
122
+
123
+ You may add Your own copyright statement to Your modifications and
124
+ may provide additional or different license terms and conditions
125
+ for use, reproduction, or distribution of Your modifications, or
126
+ for any such Derivative Works as a whole, provided Your use,
127
+ reproduction, and distribution of the Work otherwise complies with
128
+ the conditions stated in this License.
129
+
130
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
131
+ any Contribution intentionally submitted for inclusion in the Work
132
+ by You to the Licensor shall be under the terms and conditions of
133
+ this License, without any additional terms or conditions.
134
+ Notwithstanding the above, nothing herein shall supersede or modify
135
+ the terms of any separate license agreement you may have executed
136
+ with Licensor regarding such Contributions.
137
+
138
+ 6. Trademarks. This License does not grant permission to use the trade
139
+ names, trademarks, service marks, or product names of the Licensor,
140
+ except as required for reasonable and customary use in describing the
141
+ origin of the Work and reproducing the content of the NOTICE file.
142
+
143
+ 7. Disclaimer of Warranty. Unless required by applicable law or
144
+ agreed to in writing, Licensor provides the Work (and each
145
+ Contributor provides its Contributions) on an "AS IS" BASIS,
146
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
147
+ implied, including, without limitation, any warranties or conditions
148
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
149
+ PARTICULAR PURPOSE. You are solely responsible for determining the
150
+ appropriateness of using or redistributing the Work and assume any
151
+ risks associated with Your exercise of permissions under this License.
152
+
153
+ 8. Limitation of Liability. In no event and under no legal theory,
154
+ whether in tort (including negligence), contract, or otherwise,
155
+ unless required by applicable law (such as deliberate and grossly
156
+ negligent acts) or agreed to in writing, shall any Contributor be
157
+ liable to You for damages, including any direct, indirect, special,
158
+ incidental, or consequential damages of any character arising as a
159
+ result of this License or out of the use or inability to use the
160
+ Work (including but not limited to damages for loss of goodwill,
161
+ work stoppage, computer failure or malfunction, or any and all
162
+ other commercial damages or losses), even if such Contributor
163
+ has been advised of the possibility of such damages.
164
+
165
+ 9. Accepting Warranty or Additional Liability. While redistributing
166
+ the Work or Derivative Works thereof, You may choose to offer,
167
+ and charge a fee for, acceptance of support, warranty, indemnity,
168
+ or other liability obligations and/or rights consistent with this
169
+ License. However, in accepting such obligations, You may act only
170
+ on Your own behalf and on Your sole responsibility, not on behalf
171
+ of any other Contributor, and only if You agree to indemnify,
172
+ defend, and hold each Contributor harmless for any liability
173
+ incurred by, or claims asserted against, such Contributor by reason
174
+ of your accepting any such warranty or additional liability.
175
+
176
+ END OF TERMS AND CONDITIONS
177
+
178
+ APPENDIX: How to apply the Apache License to your work.
179
+
180
+ To apply the Apache License to your work, attach the following
181
+ boilerplate notice, with the fields enclosed by brackets "[]"
182
+ replaced with your own identifying information. (Don't include
183
+ the brackets!) The text should be enclosed in the appropriate
184
+ comment syntax for the file format. We also recommend that a
185
+ file or class name and description of purpose be included on the
186
+ same "printed page" as the copyright notice for easier
187
+ identification within third-party archives.
188
+
189
+ Copyright 2026 Honua
190
+
191
+ Licensed under the Apache License, Version 2.0 (the "License");
192
+ you may not use this file except in compliance with the License.
193
+ You may obtain a copy of the License at
194
+
195
+ http://www.apache.org/licenses/LICENSE-2.0
196
+
197
+ Unless required by applicable law or agreed to in writing, software
198
+ distributed under the License is distributed on an "AS IS" BASIS,
199
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
200
+ See the License for the specific language governing permissions and
201
+ limitations under the License.
@@ -0,0 +1,146 @@
1
+ Metadata-Version: 2.4
2
+ Name: honua-admin
3
+ Version: 0.1.7
4
+ Summary: Admin / control-plane client for Honua geospatial server
5
+ Project-URL: Homepage, https://honua.io
6
+ Project-URL: Documentation, https://honua-io.github.io/honua-sdk-python/latest/
7
+ Project-URL: Repository, https://github.com/honua-io/honua-sdk-python
8
+ Project-URL: Issues, https://github.com/honua-io/honua-sdk-python/issues
9
+ Author: Honua
10
+ License-Expression: Apache-2.0
11
+ License-File: LICENSE
12
+ Keywords: admin,control-plane,geospatial,gis,honua
13
+ Classifier: Development Status :: 3 - Alpha
14
+ Classifier: Intended Audience :: Developers
15
+ Classifier: License :: OSI Approved :: Apache Software License
16
+ Classifier: Operating System :: OS Independent
17
+ Classifier: Programming Language :: Python :: 3
18
+ Classifier: Programming Language :: Python :: 3.11
19
+ Classifier: Programming Language :: Python :: 3.12
20
+ Classifier: Programming Language :: Python :: 3.13
21
+ Classifier: Topic :: Scientific/Engineering :: GIS
22
+ Classifier: Typing :: Typed
23
+ Requires-Python: >=3.11
24
+ Requires-Dist: honua-sdk<0.2,>=0.1.1
25
+ Description-Content-Type: text/markdown
26
+
27
+ # honua-admin
28
+
29
+ Admin / control-plane client for
30
+ [Honua Server](https://github.com/honua-io/honua-server), the multi-protocol
31
+ geospatial server behind [Honua](https://honua.io) -- inspect and configure
32
+ services, connections, layers, styles, and metadata resources from Python,
33
+ and manage server state declaratively through manifests. Sync
34
+ (`HonuaAdminClient`) and async (`AsyncHonuaAdminClient`) clients included.
35
+
36
+ > **Status: Alpha (`0.x`).** APIs may change before 1.0. Breaking changes to
37
+ > the public API are gated by a
38
+ > [compatibility snapshot](https://github.com/honua-io/honua-sdk-python/blob/trunk/docs/compatibility.md),
39
+ > and the client checks server compatibility at runtime via
40
+ > `check_compatibility()`.
41
+
42
+ ## What it does
43
+
44
+ - **Compatibility-first**: `check_compatibility()` and
45
+ `get_capability_flags()` read the server's `/api/v1/admin/capabilities`
46
+ contract, so callers can gate control-plane calls on what the connected
47
+ server actually supports (`manifest_apply`, `manifest_dry_run`,
48
+ `metadata_resources`, ...).
49
+ - **Services**: `list_services()`, `get_service_settings()`,
50
+ `update_protocols()`, `update_mapserver_settings()`.
51
+ - **Layers and data**: `list_layers()`, `publish_layer()`,
52
+ `set_layer_enabled()` / `set_service_layers_enabled()`, and
53
+ `discover_tables()` for source-database table discovery.
54
+ - **Connections**: typed CRUD plus `test_connection()` /
55
+ `test_draft_connection()`, `validate_encryption()`, and
56
+ `rotate_encryption_key()`.
57
+ - **Styles**: OGC Styles API (`list_styles()`, `get_stylesheet()`,
58
+ `update_style()`) and per-layer styles (`get_layer_style()`,
59
+ `update_layer_style()`).
60
+ - **Metadata resources**: typed CRUD over the server's metadata catalog.
61
+ - **Manifests as declarative state**: `get_manifest()` exports the server's
62
+ metadata state; `apply_manifest()` applies a manifest with dry-run and
63
+ prune options and idempotency-key support.
64
+ - **ArcGIS migration tooling**: `scan_migration_source()` drives the
65
+ server-side migration inventory scanner
66
+ (`POST /api/v1/admin/import/scan`), and the offline
67
+ `scan_arcpy_script()` / `scan_arcpy_source()` helpers inventory ArcPy
68
+ scripts without a server or an `arcpy` install.
69
+ - Reuses `honua-sdk`'s retry transport, auth providers, and
70
+ `HonuaHttpError` envelopes, so data-plane and control-plane code share one
71
+ error-handling surface.
72
+
73
+ ## Install
74
+
75
+ ```bash
76
+ pip install honua-admin
77
+ ```
78
+
79
+ Installs a compatible `honua-sdk` automatically (shared HTTP, auth, and
80
+ error utilities). Requires Python 3.11+.
81
+
82
+ The supported server baseline and release gate policy are documented in the
83
+ monorepo
84
+ [compatibility guide](https://github.com/honua-io/honua-sdk-python/blob/trunk/docs/compatibility.md).
85
+
86
+ ## Minimal Example
87
+
88
+ ```python
89
+ from honua_admin import HonuaAdminClient
90
+
91
+ with HonuaAdminClient("https://your-honua-server.com", api_key="honua-api-key") as admin:
92
+ compatibility = admin.check_compatibility()
93
+ if not compatibility.supported:
94
+ raise RuntimeError("; ".join(compatibility.reasons))
95
+
96
+ services = admin.list_services()
97
+ for svc in services:
98
+ print(f"{svc.service_name}: {svc.layer_count} layers")
99
+ ```
100
+
101
+ Always use the `with HonuaAdminClient(...) as admin:` form -- it guarantees
102
+ the underlying `httpx` connections are returned to the pool on exit, even when
103
+ a request raises. The same `auth_provider=` argument the data-plane client
104
+ accepts (e.g. `RefreshableBearerTokenProvider`) works here unchanged.
105
+
106
+ ### Async
107
+
108
+ ```python
109
+ from honua_admin import AsyncHonuaAdminClient
110
+
111
+ async with AsyncHonuaAdminClient(
112
+ "https://your-honua-server.com",
113
+ api_key="honua-api-key",
114
+ ) as admin:
115
+ compatibility = await admin.check_compatibility()
116
+ if not compatibility.supported:
117
+ raise RuntimeError("; ".join(compatibility.reasons))
118
+
119
+ services = await admin.list_services()
120
+ for svc in services:
121
+ print(f"{svc.service_name}: {svc.layer_count} layers")
122
+ ```
123
+
124
+ The async client mirrors the sync method surface (CRUD helpers, manifest
125
+ operations, migration scans, capability checks) and shares the same retry
126
+ transport, auth providers, and `HonuaHttpError` envelopes.
127
+
128
+ ## Documentation
129
+
130
+ Rendered docs site:
131
+ [honua-io.github.io/honua-sdk-python](https://honua-io.github.io/honua-sdk-python/latest/).
132
+ Platform docs: [honua.io](https://honua.io) and
133
+ [honua.gitbook.io/honuaio](https://honua.gitbook.io/honuaio/).
134
+
135
+ - [Compatibility policy](https://github.com/honua-io/honua-sdk-python/blob/trunk/docs/compatibility.md)
136
+ - [Authentication](https://github.com/honua-io/honua-sdk-python/blob/trunk/docs/auth.md)
137
+ - [Monorepo README](https://github.com/honua-io/honua-sdk-python) -- install matrix and package overview
138
+
139
+ Related: [honua-sdk](https://github.com/honua-io/honua-sdk-python/tree/trunk/packages/honua-sdk)
140
+ (the data-plane client this package builds on),
141
+ [honua-sdk-js](https://github.com/honua-io/honua-sdk-js) (JS/TS SDKs + MCP server),
142
+ [honua-sdk-dotnet](https://github.com/honua-io/honua-sdk-dotnet) (.NET SDKs).
143
+
144
+ ## License
145
+
146
+ Apache-2.0
@@ -0,0 +1,120 @@
1
+ # honua-admin
2
+
3
+ Admin / control-plane client for
4
+ [Honua Server](https://github.com/honua-io/honua-server), the multi-protocol
5
+ geospatial server behind [Honua](https://honua.io) -- inspect and configure
6
+ services, connections, layers, styles, and metadata resources from Python,
7
+ and manage server state declaratively through manifests. Sync
8
+ (`HonuaAdminClient`) and async (`AsyncHonuaAdminClient`) clients included.
9
+
10
+ > **Status: Alpha (`0.x`).** APIs may change before 1.0. Breaking changes to
11
+ > the public API are gated by a
12
+ > [compatibility snapshot](https://github.com/honua-io/honua-sdk-python/blob/trunk/docs/compatibility.md),
13
+ > and the client checks server compatibility at runtime via
14
+ > `check_compatibility()`.
15
+
16
+ ## What it does
17
+
18
+ - **Compatibility-first**: `check_compatibility()` and
19
+ `get_capability_flags()` read the server's `/api/v1/admin/capabilities`
20
+ contract, so callers can gate control-plane calls on what the connected
21
+ server actually supports (`manifest_apply`, `manifest_dry_run`,
22
+ `metadata_resources`, ...).
23
+ - **Services**: `list_services()`, `get_service_settings()`,
24
+ `update_protocols()`, `update_mapserver_settings()`.
25
+ - **Layers and data**: `list_layers()`, `publish_layer()`,
26
+ `set_layer_enabled()` / `set_service_layers_enabled()`, and
27
+ `discover_tables()` for source-database table discovery.
28
+ - **Connections**: typed CRUD plus `test_connection()` /
29
+ `test_draft_connection()`, `validate_encryption()`, and
30
+ `rotate_encryption_key()`.
31
+ - **Styles**: OGC Styles API (`list_styles()`, `get_stylesheet()`,
32
+ `update_style()`) and per-layer styles (`get_layer_style()`,
33
+ `update_layer_style()`).
34
+ - **Metadata resources**: typed CRUD over the server's metadata catalog.
35
+ - **Manifests as declarative state**: `get_manifest()` exports the server's
36
+ metadata state; `apply_manifest()` applies a manifest with dry-run and
37
+ prune options and idempotency-key support.
38
+ - **ArcGIS migration tooling**: `scan_migration_source()` drives the
39
+ server-side migration inventory scanner
40
+ (`POST /api/v1/admin/import/scan`), and the offline
41
+ `scan_arcpy_script()` / `scan_arcpy_source()` helpers inventory ArcPy
42
+ scripts without a server or an `arcpy` install.
43
+ - Reuses `honua-sdk`'s retry transport, auth providers, and
44
+ `HonuaHttpError` envelopes, so data-plane and control-plane code share one
45
+ error-handling surface.
46
+
47
+ ## Install
48
+
49
+ ```bash
50
+ pip install honua-admin
51
+ ```
52
+
53
+ Installs a compatible `honua-sdk` automatically (shared HTTP, auth, and
54
+ error utilities). Requires Python 3.11+.
55
+
56
+ The supported server baseline and release gate policy are documented in the
57
+ monorepo
58
+ [compatibility guide](https://github.com/honua-io/honua-sdk-python/blob/trunk/docs/compatibility.md).
59
+
60
+ ## Minimal Example
61
+
62
+ ```python
63
+ from honua_admin import HonuaAdminClient
64
+
65
+ with HonuaAdminClient("https://your-honua-server.com", api_key="honua-api-key") as admin:
66
+ compatibility = admin.check_compatibility()
67
+ if not compatibility.supported:
68
+ raise RuntimeError("; ".join(compatibility.reasons))
69
+
70
+ services = admin.list_services()
71
+ for svc in services:
72
+ print(f"{svc.service_name}: {svc.layer_count} layers")
73
+ ```
74
+
75
+ Always use the `with HonuaAdminClient(...) as admin:` form -- it guarantees
76
+ the underlying `httpx` connections are returned to the pool on exit, even when
77
+ a request raises. The same `auth_provider=` argument the data-plane client
78
+ accepts (e.g. `RefreshableBearerTokenProvider`) works here unchanged.
79
+
80
+ ### Async
81
+
82
+ ```python
83
+ from honua_admin import AsyncHonuaAdminClient
84
+
85
+ async with AsyncHonuaAdminClient(
86
+ "https://your-honua-server.com",
87
+ api_key="honua-api-key",
88
+ ) as admin:
89
+ compatibility = await admin.check_compatibility()
90
+ if not compatibility.supported:
91
+ raise RuntimeError("; ".join(compatibility.reasons))
92
+
93
+ services = await admin.list_services()
94
+ for svc in services:
95
+ print(f"{svc.service_name}: {svc.layer_count} layers")
96
+ ```
97
+
98
+ The async client mirrors the sync method surface (CRUD helpers, manifest
99
+ operations, migration scans, capability checks) and shares the same retry
100
+ transport, auth providers, and `HonuaHttpError` envelopes.
101
+
102
+ ## Documentation
103
+
104
+ Rendered docs site:
105
+ [honua-io.github.io/honua-sdk-python](https://honua-io.github.io/honua-sdk-python/latest/).
106
+ Platform docs: [honua.io](https://honua.io) and
107
+ [honua.gitbook.io/honuaio](https://honua.gitbook.io/honuaio/).
108
+
109
+ - [Compatibility policy](https://github.com/honua-io/honua-sdk-python/blob/trunk/docs/compatibility.md)
110
+ - [Authentication](https://github.com/honua-io/honua-sdk-python/blob/trunk/docs/auth.md)
111
+ - [Monorepo README](https://github.com/honua-io/honua-sdk-python) -- install matrix and package overview
112
+
113
+ Related: [honua-sdk](https://github.com/honua-io/honua-sdk-python/tree/trunk/packages/honua-sdk)
114
+ (the data-plane client this package builds on),
115
+ [honua-sdk-js](https://github.com/honua-io/honua-sdk-js) (JS/TS SDKs + MCP server),
116
+ [honua-sdk-dotnet](https://github.com/honua-io/honua-sdk-dotnet) (.NET SDKs).
117
+
118
+ ## License
119
+
120
+ Apache-2.0