zeronetworks 0.0.5__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.
Files changed (164) hide show
  1. zeronetworks-0.0.5/PKG-INFO +587 -0
  2. zeronetworks-0.0.5/README.md +575 -0
  3. zeronetworks-0.0.5/pyproject.toml +56 -0
  4. zeronetworks-0.0.5/setup.cfg +4 -0
  5. zeronetworks-0.0.5/src/zeronetworks/__init__.py +17 -0
  6. zeronetworks-0.0.5/src/zeronetworks/_hooks/__init__.py +5 -0
  7. zeronetworks-0.0.5/src/zeronetworks/_hooks/registration.py +13 -0
  8. zeronetworks-0.0.5/src/zeronetworks/_hooks/sdkhooks.py +76 -0
  9. zeronetworks-0.0.5/src/zeronetworks/_hooks/types.py +112 -0
  10. zeronetworks-0.0.5/src/zeronetworks/_version.py +15 -0
  11. zeronetworks-0.0.5/src/zeronetworks/ae_exclusions.py +1977 -0
  12. zeronetworks-0.0.5/src/zeronetworks/assets.py +207 -0
  13. zeronetworks-0.0.5/src/zeronetworks/basesdk.py +399 -0
  14. zeronetworks-0.0.5/src/zeronetworks/errors/__init__.py +39 -0
  15. zeronetworks-0.0.5/src/zeronetworks/errors/error.py +28 -0
  16. zeronetworks-0.0.5/src/zeronetworks/errors/no_response_error.py +17 -0
  17. zeronetworks-0.0.5/src/zeronetworks/errors/responsevalidationerror.py +27 -0
  18. zeronetworks-0.0.5/src/zeronetworks/errors/zeronetworksdefaulterror.py +40 -0
  19. zeronetworks-0.0.5/src/zeronetworks/errors/zeronetworkserror.py +30 -0
  20. zeronetworks-0.0.5/src/zeronetworks/groups_custom.py +1457 -0
  21. zeronetworks-0.0.5/src/zeronetworks/httpclient.py +125 -0
  22. zeronetworks-0.0.5/src/zeronetworks/internal_access_policy_sdk.py +973 -0
  23. zeronetworks-0.0.5/src/zeronetworks/mfa_inbound.py +1221 -0
  24. zeronetworks-0.0.5/src/zeronetworks/mfa_outbound.py +1209 -0
  25. zeronetworks-0.0.5/src/zeronetworks/models/__init__.py +643 -0
  26. zeronetworks-0.0.5/src/zeronetworks/models/actiontype.py +14 -0
  27. zeronetworks-0.0.5/src/zeronetworks/models/aeexclusion.py +573 -0
  28. zeronetworks-0.0.5/src/zeronetworks/models/aeexclusionrulebody.py +129 -0
  29. zeronetworks-0.0.5/src/zeronetworks/models/aeexclusionruleresponse.py +32 -0
  30. zeronetworks-0.0.5/src/zeronetworks/models/aeexclusionsinbound_deleteop.py +21 -0
  31. zeronetworks-0.0.5/src/zeronetworks/models/aeexclusionsinbound_getop.py +21 -0
  32. zeronetworks-0.0.5/src/zeronetworks/models/aeexclusionsinbound_updateop.py +30 -0
  33. zeronetworks-0.0.5/src/zeronetworks/models/aeexclusionsoutbound_deleteop.py +21 -0
  34. zeronetworks-0.0.5/src/zeronetworks/models/aeexclusionsoutbound_getop.py +21 -0
  35. zeronetworks-0.0.5/src/zeronetworks/models/aeexclusionsoutbound_updateop.py +30 -0
  36. zeronetworks-0.0.5/src/zeronetworks/models/asset.py +1019 -0
  37. zeronetworks-0.0.5/src/zeronetworks/models/assetidsearch.py +38 -0
  38. zeronetworks-0.0.5/src/zeronetworks/models/assets_searchop.py +37 -0
  39. zeronetworks-0.0.5/src/zeronetworks/models/assetstatus.py +39 -0
  40. zeronetworks-0.0.5/src/zeronetworks/models/assettype.py +374 -0
  41. zeronetworks-0.0.5/src/zeronetworks/models/createdby.py +116 -0
  42. zeronetworks-0.0.5/src/zeronetworks/models/customgroup.py +133 -0
  43. zeronetworks-0.0.5/src/zeronetworks/models/customgroupbody.py +50 -0
  44. zeronetworks-0.0.5/src/zeronetworks/models/customgroupmembers_listop.py +21 -0
  45. zeronetworks-0.0.5/src/zeronetworks/models/customgroupmembersbody.py +23 -0
  46. zeronetworks-0.0.5/src/zeronetworks/models/customgroupresponse.py +32 -0
  47. zeronetworks-0.0.5/src/zeronetworks/models/customgroups_deleteop.py +21 -0
  48. zeronetworks-0.0.5/src/zeronetworks/models/customgroups_getop.py +21 -0
  49. zeronetworks-0.0.5/src/zeronetworks/models/customgroups_updateop.py +30 -0
  50. zeronetworks-0.0.5/src/zeronetworks/models/customgroupsmembers_addop.py +33 -0
  51. zeronetworks-0.0.5/src/zeronetworks/models/customgroupsmembers_deleteop.py +33 -0
  52. zeronetworks-0.0.5/src/zeronetworks/models/deploymentsclustersource.py +26 -0
  53. zeronetworks-0.0.5/src/zeronetworks/models/emptyresponse.py +13 -0
  54. zeronetworks-0.0.5/src/zeronetworks/models/enforcementmethod.py +24 -0
  55. zeronetworks-0.0.5/src/zeronetworks/models/enforcementsource.py +39 -0
  56. zeronetworks-0.0.5/src/zeronetworks/models/groupconditions.py +72 -0
  57. zeronetworks-0.0.5/src/zeronetworks/models/groupmemberslist.py +38 -0
  58. zeronetworks-0.0.5/src/zeronetworks/models/healthissue.py +214 -0
  59. zeronetworks-0.0.5/src/zeronetworks/models/healthstate.py +87 -0
  60. zeronetworks-0.0.5/src/zeronetworks/models/identityprotectioncategory.py +26 -0
  61. zeronetworks-0.0.5/src/zeronetworks/models/identityprotectionstate.py +41 -0
  62. zeronetworks-0.0.5/src/zeronetworks/models/idnamepair.py +38 -0
  63. zeronetworks-0.0.5/src/zeronetworks/models/inactivereason.py +26 -0
  64. zeronetworks-0.0.5/src/zeronetworks/models/inboundrule_deleteop.py +21 -0
  65. zeronetworks-0.0.5/src/zeronetworks/models/inboundrule_getop.py +21 -0
  66. zeronetworks-0.0.5/src/zeronetworks/models/inboundrule_updateop.py +29 -0
  67. zeronetworks-0.0.5/src/zeronetworks/models/internalaccesspolicy.py +164 -0
  68. zeronetworks-0.0.5/src/zeronetworks/models/internalaccesspolicy_deleteop.py +21 -0
  69. zeronetworks-0.0.5/src/zeronetworks/models/internalaccesspolicy_getop.py +21 -0
  70. zeronetworks-0.0.5/src/zeronetworks/models/internalaccesspolicy_updateop.py +31 -0
  71. zeronetworks-0.0.5/src/zeronetworks/models/internalaccesspolicybody.py +105 -0
  72. zeronetworks-0.0.5/src/zeronetworks/models/internalaccesspolicyitem.py +32 -0
  73. zeronetworks-0.0.5/src/zeronetworks/models/ipsecopt.py +25 -0
  74. zeronetworks-0.0.5/src/zeronetworks/models/mfainboundpolicies_deleteop.py +21 -0
  75. zeronetworks-0.0.5/src/zeronetworks/models/mfainboundpolicies_getop.py +21 -0
  76. zeronetworks-0.0.5/src/zeronetworks/models/mfainboundpolicies_updateop.py +33 -0
  77. zeronetworks-0.0.5/src/zeronetworks/models/mfamethods.py +28 -0
  78. zeronetworks-0.0.5/src/zeronetworks/models/mfaoutboundpolicies_deleteop.py +21 -0
  79. zeronetworks-0.0.5/src/zeronetworks/models/mfaoutboundpolicies_getop.py +21 -0
  80. zeronetworks-0.0.5/src/zeronetworks/models/mfaoutboundpolicies_updateop.py +33 -0
  81. zeronetworks-0.0.5/src/zeronetworks/models/ostype.py +23 -0
  82. zeronetworks-0.0.5/src/zeronetworks/models/otlocation.py +46 -0
  83. zeronetworks-0.0.5/src/zeronetworks/models/outboundrestrictionmode.py +24 -0
  84. zeronetworks-0.0.5/src/zeronetworks/models/outboundrule_deleteop.py +21 -0
  85. zeronetworks-0.0.5/src/zeronetworks/models/outboundrule_getop.py +21 -0
  86. zeronetworks-0.0.5/src/zeronetworks/models/outboundrule_updateop.py +29 -0
  87. zeronetworks-0.0.5/src/zeronetworks/models/portslist.py +562 -0
  88. zeronetworks-0.0.5/src/zeronetworks/models/protectionstate.py +52 -0
  89. zeronetworks-0.0.5/src/zeronetworks/models/protocol.py +528 -0
  90. zeronetworks-0.0.5/src/zeronetworks/models/protocoltypemfa.py +15 -0
  91. zeronetworks-0.0.5/src/zeronetworks/models/purduelevel.py +27 -0
  92. zeronetworks-0.0.5/src/zeronetworks/models/reactivepolicy.py +293 -0
  93. zeronetworks-0.0.5/src/zeronetworks/models/reactivepolicycontext.py +22 -0
  94. zeronetworks-0.0.5/src/zeronetworks/models/reactivepolicyinboundbody.py +205 -0
  95. zeronetworks-0.0.5/src/zeronetworks/models/reactivepolicyitem.py +32 -0
  96. zeronetworks-0.0.5/src/zeronetworks/models/reactivepolicyoutboundbody.py +207 -0
  97. zeronetworks-0.0.5/src/zeronetworks/models/reactivepolicyresponse.py +32 -0
  98. zeronetworks-0.0.5/src/zeronetworks/models/reactivepolicystate.py +18 -0
  99. zeronetworks-0.0.5/src/zeronetworks/models/rpcrule.py +239 -0
  100. zeronetworks-0.0.5/src/zeronetworks/models/rpcrule_deleteop.py +21 -0
  101. zeronetworks-0.0.5/src/zeronetworks/models/rpcrule_getop.py +21 -0
  102. zeronetworks-0.0.5/src/zeronetworks/models/rpcrule_updateop.py +30 -0
  103. zeronetworks-0.0.5/src/zeronetworks/models/rpcrulebody.py +132 -0
  104. zeronetworks-0.0.5/src/zeronetworks/models/rpcruleresponse.py +32 -0
  105. zeronetworks-0.0.5/src/zeronetworks/models/rule.py +567 -0
  106. zeronetworks-0.0.5/src/zeronetworks/models/ruleaction.py +20 -0
  107. zeronetworks-0.0.5/src/zeronetworks/models/rulebody.py +170 -0
  108. zeronetworks-0.0.5/src/zeronetworks/models/ruleclass.py +28 -0
  109. zeronetworks-0.0.5/src/zeronetworks/models/rulecontext.py +104 -0
  110. zeronetworks-0.0.5/src/zeronetworks/models/ruledirection.py +20 -0
  111. zeronetworks-0.0.5/src/zeronetworks/models/ruleduration.py +30 -0
  112. zeronetworks-0.0.5/src/zeronetworks/models/ruleitem.py +32 -0
  113. zeronetworks-0.0.5/src/zeronetworks/models/ruleresponse.py +32 -0
  114. zeronetworks-0.0.5/src/zeronetworks/models/rulereviewmode.py +20 -0
  115. zeronetworks-0.0.5/src/zeronetworks/models/rulereviewreason.py +62 -0
  116. zeronetworks-0.0.5/src/zeronetworks/models/rulestate.py +28 -0
  117. zeronetworks-0.0.5/src/zeronetworks/models/rulesuggestiontype.py +20 -0
  118. zeronetworks-0.0.5/src/zeronetworks/models/security.py +42 -0
  119. zeronetworks-0.0.5/src/zeronetworks/models/source.py +77 -0
  120. zeronetworks-0.0.5/src/zeronetworks/models/srcuserslist.py +34 -0
  121. zeronetworks-0.0.5/src/zeronetworks/models/state.py +245 -0
  122. zeronetworks-0.0.5/src/zeronetworks/models/userrole.py +44 -0
  123. zeronetworks-0.0.5/src/zeronetworks/py.typed +1 -0
  124. zeronetworks-0.0.5/src/zeronetworks/rules_inbound.py +1083 -0
  125. zeronetworks-0.0.5/src/zeronetworks/rules_outbound.py +1083 -0
  126. zeronetworks-0.0.5/src/zeronetworks/rules_rpc.py +1019 -0
  127. zeronetworks-0.0.5/src/zeronetworks/sdk.py +219 -0
  128. zeronetworks-0.0.5/src/zeronetworks/sdkconfiguration.py +50 -0
  129. zeronetworks-0.0.5/src/zeronetworks/types/__init__.py +21 -0
  130. zeronetworks-0.0.5/src/zeronetworks/types/basemodel.py +77 -0
  131. zeronetworks-0.0.5/src/zeronetworks/utils/__init__.py +178 -0
  132. zeronetworks-0.0.5/src/zeronetworks/utils/annotations.py +79 -0
  133. zeronetworks-0.0.5/src/zeronetworks/utils/datetimes.py +23 -0
  134. zeronetworks-0.0.5/src/zeronetworks/utils/dynamic_imports.py +54 -0
  135. zeronetworks-0.0.5/src/zeronetworks/utils/enums.py +134 -0
  136. zeronetworks-0.0.5/src/zeronetworks/utils/eventstreaming.py +309 -0
  137. zeronetworks-0.0.5/src/zeronetworks/utils/forms.py +234 -0
  138. zeronetworks-0.0.5/src/zeronetworks/utils/headers.py +136 -0
  139. zeronetworks-0.0.5/src/zeronetworks/utils/logger.py +27 -0
  140. zeronetworks-0.0.5/src/zeronetworks/utils/metadata.py +119 -0
  141. zeronetworks-0.0.5/src/zeronetworks/utils/queryparams.py +217 -0
  142. zeronetworks-0.0.5/src/zeronetworks/utils/requestbodies.py +66 -0
  143. zeronetworks-0.0.5/src/zeronetworks/utils/retries.py +271 -0
  144. zeronetworks-0.0.5/src/zeronetworks/utils/security.py +215 -0
  145. zeronetworks-0.0.5/src/zeronetworks/utils/serializers.py +225 -0
  146. zeronetworks-0.0.5/src/zeronetworks/utils/unmarshal_json_response.py +38 -0
  147. zeronetworks-0.0.5/src/zeronetworks/utils/url.py +155 -0
  148. zeronetworks-0.0.5/src/zeronetworks/utils/values.py +137 -0
  149. zeronetworks-0.0.5/src/zeronetworks.egg-info/PKG-INFO +587 -0
  150. zeronetworks-0.0.5/src/zeronetworks.egg-info/SOURCES.txt +162 -0
  151. zeronetworks-0.0.5/src/zeronetworks.egg-info/dependency_links.txt +1 -0
  152. zeronetworks-0.0.5/src/zeronetworks.egg-info/requires.txt +3 -0
  153. zeronetworks-0.0.5/src/zeronetworks.egg-info/top_level.txt +1 -0
  154. zeronetworks-0.0.5/tests/test_ae_exclusions.py +219 -0
  155. zeronetworks-0.0.5/tests/test_assets.py +99 -0
  156. zeronetworks-0.0.5/tests/test_groups_custom.py +180 -0
  157. zeronetworks-0.0.5/tests/test_internal_access_policy.py +215 -0
  158. zeronetworks-0.0.5/tests/test_live.py +357 -0
  159. zeronetworks-0.0.5/tests/test_mfa_inbound.py +197 -0
  160. zeronetworks-0.0.5/tests/test_mfa_outbound.py +171 -0
  161. zeronetworks-0.0.5/tests/test_rules_inbound.py +215 -0
  162. zeronetworks-0.0.5/tests/test_rules_outbound.py +163 -0
  163. zeronetworks-0.0.5/tests/test_rules_rpc.py +184 -0
  164. zeronetworks-0.0.5/tests/test_sdk_init.py +83 -0
@@ -0,0 +1,587 @@
1
+ Metadata-Version: 2.4
2
+ Name: zeronetworks
3
+ Version: 0.0.5
4
+ Summary: Python Client SDK Generated by Speakeasy.
5
+ Author: Speakeasy
6
+ License: Apache-2.0
7
+ Requires-Python: >=3.10
8
+ Description-Content-Type: text/markdown
9
+ Requires-Dist: httpcore>=1.0.9
10
+ Requires-Dist: httpx>=0.28.1
11
+ Requires-Dist: pydantic>=2.11.2
12
+
13
+ # zeronetworks
14
+
15
+ Developer-friendly & type-safe Python SDK specifically catered to leverage *zeronetworks* API.
16
+
17
+ [![Built by Speakeasy](https://img.shields.io/badge/Built_by-SPEAKEASY-374151?style=for-the-badge&labelColor=f3f4f6)](https://www.speakeasy.com/?utm_source=zeronetworks&utm_campaign=python)
18
+ [![License: MIT](https://img.shields.io/badge/LICENSE_//_MIT-3b5bdb?style=for-the-badge&labelColor=eff6ff)](https://opensource.org/licenses/MIT)
19
+
20
+
21
+ <br /><br />
22
+ > [!IMPORTANT]
23
+ > This SDK is not yet ready for production use. To complete setup please follow the steps outlined in your [workspace](https://app.speakeasy.com/org/zeronetworks/zeronetworks). Delete this section before > publishing to a package manager.
24
+
25
+ <!-- Start Summary [summary] -->
26
+ ## Summary
27
+
28
+ Zero Networks: APIs for Zero Networks
29
+ <!-- End Summary [summary] -->
30
+
31
+ <!-- Start Table of Contents [toc] -->
32
+ ## Table of Contents
33
+ <!-- $toc-max-depth=2 -->
34
+ * [zeronetworks](#zeronetworks)
35
+ * [SDK Installation](#sdk-installation)
36
+ * [IDE Support](#ide-support)
37
+ * [SDK Example Usage](#sdk-example-usage)
38
+ * [Authentication](#authentication)
39
+ * [Available Resources and Operations](#available-resources-and-operations)
40
+ * [Retries](#retries)
41
+ * [Error Handling](#error-handling)
42
+ * [Server Selection](#server-selection)
43
+ * [Custom HTTP Client](#custom-http-client)
44
+ * [Resource Management](#resource-management)
45
+ * [Debugging](#debugging)
46
+ * [Development](#development)
47
+ * [Maturity](#maturity)
48
+ * [Contributions](#contributions)
49
+
50
+ <!-- End Table of Contents [toc] -->
51
+
52
+ <!-- Start SDK Installation [installation] -->
53
+ ## SDK Installation
54
+
55
+ > [!TIP]
56
+ > To finish publishing your SDK to PyPI you must [run your first generation action](https://www.speakeasy.com/docs/github-setup#step-by-step-guide).
57
+
58
+
59
+ > [!NOTE]
60
+ > **Python version upgrade policy**
61
+ >
62
+ > Once a Python version reaches its [official end of life date](https://devguide.python.org/versions/), a 3-month grace period is provided for users to upgrade. Following this grace period, the minimum python version supported in the SDK will be updated.
63
+
64
+ The SDK can be installed with *uv*, *pip*, or *poetry* package managers.
65
+
66
+ ### uv
67
+
68
+ *uv* is a fast Python package installer and resolver, designed as a drop-in replacement for pip and pip-tools. It's recommended for its speed and modern Python tooling capabilities.
69
+
70
+ ```bash
71
+ uv add git+<UNSET>.git
72
+ ```
73
+
74
+ ### PIP
75
+
76
+ *PIP* is the default package installer for Python, enabling easy installation and management of packages from PyPI via the command line.
77
+
78
+ ```bash
79
+ pip install git+<UNSET>.git
80
+ ```
81
+
82
+ ### Poetry
83
+
84
+ *Poetry* is a modern tool that simplifies dependency management and package publishing by using a single `pyproject.toml` file to handle project metadata and dependencies.
85
+
86
+ ```bash
87
+ poetry add git+<UNSET>.git
88
+ ```
89
+
90
+ ### Shell and script usage with `uv`
91
+
92
+ You can use this SDK in a Python shell with [uv](https://docs.astral.sh/uv/) and the `uvx` command that comes with it like so:
93
+
94
+ ```shell
95
+ uvx --from zeronetworks python
96
+ ```
97
+
98
+ It's also possible to write a standalone Python script without needing to set up a whole project like so:
99
+
100
+ ```python
101
+ #!/usr/bin/env -S uv run --script
102
+ # /// script
103
+ # requires-python = ">=3.10"
104
+ # dependencies = [
105
+ # "zeronetworks",
106
+ # ]
107
+ # ///
108
+
109
+ from zeronetworks import Zeronetworks
110
+
111
+ sdk = Zeronetworks(
112
+ # SDK arguments
113
+ )
114
+
115
+ # Rest of script here...
116
+ ```
117
+
118
+ Once that is saved to a file, you can run it with `uv run script.py` where
119
+ `script.py` can be replaced with the actual file name.
120
+ <!-- End SDK Installation [installation] -->
121
+
122
+ <!-- Start IDE Support [idesupport] -->
123
+ ## IDE Support
124
+
125
+ ### PyCharm
126
+
127
+ Generally, the SDK will work well with most IDEs out of the box. However, when using PyCharm, you can enjoy much better integration with Pydantic by installing an additional plugin.
128
+
129
+ - [PyCharm Pydantic Plugin](https://docs.pydantic.dev/latest/integrations/pycharm/)
130
+ <!-- End IDE Support [idesupport] -->
131
+
132
+ <!-- Start SDK Example Usage [usage] -->
133
+ ## SDK Example Usage
134
+
135
+ ### Example
136
+
137
+ ```python
138
+ # Synchronous Example
139
+ import os
140
+ from zeronetworks import Zeronetworks
141
+
142
+
143
+ with Zeronetworks(
144
+ api_key=os.getenv("ZERONETWORKS_API_KEY", ""),
145
+ ) as z_client:
146
+
147
+ res = z_client.assets.assets_search(fqdn="server.domain.local")
148
+
149
+ # Handle response
150
+ print(res)
151
+ ```
152
+
153
+ </br>
154
+
155
+ The same SDK client can also be used to make asynchronous requests by importing asyncio.
156
+
157
+ ```python
158
+ # Asynchronous Example
159
+ import asyncio
160
+ import os
161
+ from zeronetworks import Zeronetworks
162
+
163
+ async def main():
164
+
165
+ async with Zeronetworks(
166
+ api_key=os.getenv("ZERONETWORKS_API_KEY", ""),
167
+ ) as z_client:
168
+
169
+ res = await z_client.assets.assets_search_async(fqdn="server.domain.local")
170
+
171
+ # Handle response
172
+ print(res)
173
+
174
+ asyncio.run(main())
175
+ ```
176
+ <!-- End SDK Example Usage [usage] -->
177
+
178
+ <!-- Start Authentication [security] -->
179
+ ## Authentication
180
+
181
+ ### Per-Client Security Schemes
182
+
183
+ This SDK supports the following security scheme globally:
184
+
185
+ | Name | Type | Scheme | Environment Variable |
186
+ | --------- | ------ | ------- | ---------------------- |
187
+ | `api_key` | apiKey | API key | `ZERONETWORKS_API_KEY` |
188
+
189
+ To authenticate with the API the `api_key` parameter must be set when initializing the SDK client instance. For example:
190
+ ```python
191
+ import os
192
+ from zeronetworks import Zeronetworks
193
+
194
+
195
+ with Zeronetworks(
196
+ api_key=os.getenv("ZERONETWORKS_API_KEY", ""),
197
+ ) as z_client:
198
+
199
+ res = z_client.assets.assets_search(fqdn="server.domain.local")
200
+
201
+ # Handle response
202
+ print(res)
203
+
204
+ ```
205
+ <!-- End Authentication [security] -->
206
+
207
+ <!-- Start Available Resources and Operations [operations] -->
208
+ ## Available Resources and Operations
209
+
210
+ <details open>
211
+ <summary>Available methods</summary>
212
+
213
+ ### [AEExclusions](docs/sdks/aeexclusions/README.md)
214
+
215
+ * [ae_exclusions_inbound_create](docs/sdks/aeexclusions/README.md#ae_exclusions_inbound_create) - Create AE Exclusion Inbound
216
+ * [ae_exclusions_inbound_get](docs/sdks/aeexclusions/README.md#ae_exclusions_inbound_get) - Get AE Exclusion
217
+ * [ae_exclusions_inbound_delete](docs/sdks/aeexclusions/README.md#ae_exclusions_inbound_delete) - Delete Automation Engine Inbound exclusions
218
+ * [ae_exclusions_inbound_update](docs/sdks/aeexclusions/README.md#ae_exclusions_inbound_update) - Update AE Exclusion
219
+ * [ae_exclusions_outbound_create](docs/sdks/aeexclusions/README.md#ae_exclusions_outbound_create) - Create AE Exclusion Outbound
220
+ * [ae_exclusions_outbound_get](docs/sdks/aeexclusions/README.md#ae_exclusions_outbound_get) - Get AE Exclusion
221
+ * [ae_exclusions_outbound_delete](docs/sdks/aeexclusions/README.md#ae_exclusions_outbound_delete) - Delete Automation Engine Outbound exclusions
222
+ * [ae_exclusions_outbound_update](docs/sdks/aeexclusions/README.md#ae_exclusions_outbound_update) - Update AE Exclusion
223
+
224
+ ### [Assets](docs/sdks/assets/README.md)
225
+
226
+ * [assets_search](docs/sdks/assets/README.md#assets_search) - Search Asset by FQDN
227
+
228
+ ### [GroupsCustom](docs/sdks/groupscustom/README.md)
229
+
230
+ * [custom_groups_create](docs/sdks/groupscustom/README.md#custom_groups_create) - Create Custom Group
231
+ * [custom_groups_get](docs/sdks/groupscustom/README.md#custom_groups_get) - Get a custom group
232
+ * [custom_groups_update](docs/sdks/groupscustom/README.md#custom_groups_update) - Update Custom Group
233
+ * [custom_groups_delete](docs/sdks/groupscustom/README.md#custom_groups_delete) - Delete Custom Group
234
+ * [custom_group_members_list](docs/sdks/groupscustom/README.md#custom_group_members_list) - List Custom Group members
235
+ * [custom_groups_members_add](docs/sdks/groupscustom/README.md#custom_groups_members_add) - Add Custom Group members
236
+ * [custom_groups_members_delete](docs/sdks/groupscustom/README.md#custom_groups_members_delete) - Delete Custom Group members
237
+
238
+ ### [InternalAccessPolicy](docs/sdks/internalaccesspolicysdk/README.md)
239
+
240
+ * [internal_access_policy_create](docs/sdks/internalaccesspolicysdk/README.md#internal_access_policy_create) - Create an internal access policy
241
+ * [internal_access_policy_get](docs/sdks/internalaccesspolicysdk/README.md#internal_access_policy_get) - Get an Internal Access policy
242
+ * [internal_access_policy_update](docs/sdks/internalaccesspolicysdk/README.md#internal_access_policy_update) - Update an Internal Access policy
243
+ * [internal_access_policy_delete](docs/sdks/internalaccesspolicysdk/README.md#internal_access_policy_delete) - Delete an Internal Access policy
244
+
245
+ ### [MFAInbound](docs/sdks/mfainbound/README.md)
246
+
247
+ * [mfa_inbound_policies_create](docs/sdks/mfainbound/README.md#mfa_inbound_policies_create) - Add Inbound MFA Policy
248
+ * [mfa_inbound_policies_get](docs/sdks/mfainbound/README.md#mfa_inbound_policies_get) - Get Inbound MFA Policy
249
+ * [mfa_inbound_policies_update](docs/sdks/mfainbound/README.md#mfa_inbound_policies_update) - Update Inbound MFA Policy
250
+ * [mfa_inbound_policies_delete](docs/sdks/mfainbound/README.md#mfa_inbound_policies_delete) - Remove Inbound MFA Policy
251
+
252
+ ### [MFAOutbound](docs/sdks/mfaoutbound/README.md)
253
+
254
+ * [mfa_outbound_policies_create](docs/sdks/mfaoutbound/README.md#mfa_outbound_policies_create) - Add Outbound MFA Policy
255
+ * [mfa_outbound_policies_get](docs/sdks/mfaoutbound/README.md#mfa_outbound_policies_get) - Get Outbound MFA Policy
256
+ * [mfa_outbound_policies_update](docs/sdks/mfaoutbound/README.md#mfa_outbound_policies_update) - Update Outbound MFA Policy
257
+ * [mfa_outbound_policies_delete](docs/sdks/mfaoutbound/README.md#mfa_outbound_policies_delete) - Remove Outbound MFA Policy
258
+
259
+ ### [RulesInbound](docs/sdks/rulesinbound/README.md)
260
+
261
+ * [inbound_rules_create](docs/sdks/rulesinbound/README.md#inbound_rules_create) - Create Inbound Rule
262
+ * [inbound_rule_get](docs/sdks/rulesinbound/README.md#inbound_rule_get) - Get Inbound Rule
263
+ * [inbound_rule_update](docs/sdks/rulesinbound/README.md#inbound_rule_update) - Update Inbound Rule
264
+ * [inbound_rule_delete](docs/sdks/rulesinbound/README.md#inbound_rule_delete) - Remove Inbound Rule
265
+
266
+ ### [RulesOutbound](docs/sdks/rulesoutbound/README.md)
267
+
268
+ * [outbound_rules_create](docs/sdks/rulesoutbound/README.md#outbound_rules_create) - Create Outbound Rule
269
+ * [outbound_rule_get](docs/sdks/rulesoutbound/README.md#outbound_rule_get) - Get Outbound Rule
270
+ * [outbound_rule_update](docs/sdks/rulesoutbound/README.md#outbound_rule_update) - Update Outbound Rule
271
+ * [outbound_rule_delete](docs/sdks/rulesoutbound/README.md#outbound_rule_delete) - Remove Outbound Rule
272
+
273
+ ### [RulesRPC](docs/sdks/rulesrpc/README.md)
274
+
275
+ * [rpc_rules_create](docs/sdks/rulesrpc/README.md#rpc_rules_create) - Create RPC Rule
276
+ * [rpc_rule_get](docs/sdks/rulesrpc/README.md#rpc_rule_get) - Get RPC Rule
277
+ * [rpc_rule_update](docs/sdks/rulesrpc/README.md#rpc_rule_update) - Update RPC Rule
278
+ * [rpc_rule_delete](docs/sdks/rulesrpc/README.md#rpc_rule_delete) - Remove RPC Rule
279
+
280
+ </details>
281
+ <!-- End Available Resources and Operations [operations] -->
282
+
283
+ <!-- Start Retries [retries] -->
284
+ ## Retries
285
+
286
+ Some of the endpoints in this SDK support retries. If you use the SDK without any configuration, it will fall back to the default retry strategy provided by the API. However, the default retry strategy can be overridden on a per-operation basis, or across the entire SDK.
287
+
288
+ To change the default retry strategy for a single API call, simply provide a `RetryConfig` object to the call:
289
+ ```python
290
+ import os
291
+ from zeronetworks import Zeronetworks
292
+ from zeronetworks.utils import BackoffStrategy, RetryConfig
293
+
294
+
295
+ with Zeronetworks(
296
+ api_key=os.getenv("ZERONETWORKS_API_KEY", ""),
297
+ ) as z_client:
298
+
299
+ res = z_client.assets.assets_search(fqdn="server.domain.local",
300
+ RetryConfig("backoff", BackoffStrategy(1, 50, 1.1, 100), False))
301
+
302
+ # Handle response
303
+ print(res)
304
+
305
+ ```
306
+
307
+ If you'd like to override the default retry strategy for all operations that support retries, you can use the `retry_config` optional parameter when initializing the SDK:
308
+ ```python
309
+ import os
310
+ from zeronetworks import Zeronetworks
311
+ from zeronetworks.utils import BackoffStrategy, RetryConfig
312
+
313
+
314
+ with Zeronetworks(
315
+ retry_config=RetryConfig("backoff", BackoffStrategy(1, 50, 1.1, 100), False),
316
+ api_key=os.getenv("ZERONETWORKS_API_KEY", ""),
317
+ ) as z_client:
318
+
319
+ res = z_client.assets.assets_search(fqdn="server.domain.local")
320
+
321
+ # Handle response
322
+ print(res)
323
+
324
+ ```
325
+ <!-- End Retries [retries] -->
326
+
327
+ <!-- Start Error Handling [errors] -->
328
+ ## Error Handling
329
+
330
+ [`ZeronetworksError`](./src/zeronetworks/errors/zeronetworkserror.py) is the base class for all HTTP error responses. It has the following properties:
331
+
332
+ | Property | Type | Description |
333
+ | ------------------ | ---------------- | --------------------------------------------------------------------------------------- |
334
+ | `err.message` | `str` | Error message |
335
+ | `err.status_code` | `int` | HTTP response status code eg `404` |
336
+ | `err.headers` | `httpx.Headers` | HTTP response headers |
337
+ | `err.body` | `str` | HTTP body. Can be empty string if no body is returned. |
338
+ | `err.raw_response` | `httpx.Response` | Raw HTTP response |
339
+ | `err.data` | | Optional. Some errors may contain structured data. [See Error Classes](#error-classes). |
340
+
341
+ ### Example
342
+ ```python
343
+ import os
344
+ from zeronetworks import Zeronetworks, errors
345
+
346
+
347
+ with Zeronetworks(
348
+ api_key=os.getenv("ZERONETWORKS_API_KEY", ""),
349
+ ) as z_client:
350
+ res = None
351
+ try:
352
+
353
+ res = z_client.assets.assets_search(fqdn="server.domain.local")
354
+
355
+ # Handle response
356
+ print(res)
357
+
358
+
359
+ except errors.ZeronetworksError as e:
360
+ # The base class for HTTP error responses
361
+ print(e.message)
362
+ print(e.status_code)
363
+ print(e.body)
364
+ print(e.headers)
365
+ print(e.raw_response)
366
+
367
+ # Depending on the method different errors may be thrown
368
+ if isinstance(e, errors.Error):
369
+ print(e.data.error) # Optional[str]
370
+ print(e.data.message) # Optional[str]
371
+ ```
372
+
373
+ ### Error Classes
374
+ **Primary errors:**
375
+ * [`ZeronetworksError`](./src/zeronetworks/errors/zeronetworkserror.py): The base class for HTTP error responses.
376
+ * [`Error`](./src/zeronetworks/errors/error.py): Bad Request.
377
+
378
+ <details><summary>Less common errors (5)</summary>
379
+
380
+ <br />
381
+
382
+ **Network errors:**
383
+ * [`httpx.RequestError`](https://www.python-httpx.org/exceptions/#httpx.RequestError): Base class for request errors.
384
+ * [`httpx.ConnectError`](https://www.python-httpx.org/exceptions/#httpx.ConnectError): HTTP client was unable to make a request to a server.
385
+ * [`httpx.TimeoutException`](https://www.python-httpx.org/exceptions/#httpx.TimeoutException): HTTP request timed out.
386
+
387
+
388
+ **Inherit from [`ZeronetworksError`](./src/zeronetworks/errors/zeronetworkserror.py)**:
389
+ * [`ResponseValidationError`](./src/zeronetworks/errors/responsevalidationerror.py): Type mismatch between the response data and the expected Pydantic model. Provides access to the Pydantic validation error via the `cause` attribute.
390
+
391
+ </details>
392
+ <!-- End Error Handling [errors] -->
393
+
394
+ <!-- Start Server Selection [server] -->
395
+ ## Server Selection
396
+
397
+ ### Server Variables
398
+
399
+ The default server `https://portal.zeronetworks.com/v1/api` contains variables and is set to `https://portal.zeronetworks.com/v1/api` by default. To override default values, the following parameters are available when initializing the SDK client instance:
400
+
401
+ | Variable | Parameter | Default | Description |
402
+ | ------------- | ------------------- | ---------- | ------------------------------------ |
403
+ | `CustomerURL` | `customer_url: str` | `"portal"` | this value is per customer / partner |
404
+
405
+ #### Example
406
+
407
+ ```python
408
+ import os
409
+ from zeronetworks import Zeronetworks
410
+
411
+
412
+ with Zeronetworks(
413
+ server_idx=0,
414
+ customer_url="portal",
415
+ api_key=os.getenv("ZERONETWORKS_API_KEY", ""),
416
+ ) as z_client:
417
+
418
+ res = z_client.assets.assets_search(fqdn="server.domain.local")
419
+
420
+ # Handle response
421
+ print(res)
422
+
423
+ ```
424
+
425
+ ### Override Server URL Per-Client
426
+
427
+ The default server can be overridden globally by passing a URL to the `server_url: str` optional parameter when initializing the SDK client instance. For example:
428
+ ```python
429
+ import os
430
+ from zeronetworks import Zeronetworks
431
+
432
+
433
+ with Zeronetworks(
434
+ server_url="https://portal.zeronetworks.com/v1/api",
435
+ api_key=os.getenv("ZERONETWORKS_API_KEY", ""),
436
+ ) as z_client:
437
+
438
+ res = z_client.assets.assets_search(fqdn="server.domain.local")
439
+
440
+ # Handle response
441
+ print(res)
442
+
443
+ ```
444
+ <!-- End Server Selection [server] -->
445
+
446
+ <!-- Start Custom HTTP Client [http-client] -->
447
+ ## Custom HTTP Client
448
+
449
+ The Python SDK makes API calls using the [httpx](https://www.python-httpx.org/) HTTP library. In order to provide a convenient way to configure timeouts, cookies, proxies, custom headers, and other low-level configuration, you can initialize the SDK client with your own HTTP client instance.
450
+ Depending on whether you are using the sync or async version of the SDK, you can pass an instance of `HttpClient` or `AsyncHttpClient` respectively, which are Protocol's ensuring that the client has the necessary methods to make API calls.
451
+ This allows you to wrap the client with your own custom logic, such as adding custom headers, logging, or error handling, or you can just pass an instance of `httpx.Client` or `httpx.AsyncClient` directly.
452
+
453
+ For example, you could specify a header for every request that this sdk makes as follows:
454
+ ```python
455
+ from zeronetworks import Zeronetworks
456
+ import httpx
457
+
458
+ http_client = httpx.Client(headers={"x-custom-header": "someValue"})
459
+ s = Zeronetworks(client=http_client)
460
+ ```
461
+
462
+ or you could wrap the client with your own custom logic:
463
+ ```python
464
+ from zeronetworks import Zeronetworks
465
+ from zeronetworks.httpclient import AsyncHttpClient
466
+ import httpx
467
+
468
+ class CustomClient(AsyncHttpClient):
469
+ client: AsyncHttpClient
470
+
471
+ def __init__(self, client: AsyncHttpClient):
472
+ self.client = client
473
+
474
+ async def send(
475
+ self,
476
+ request: httpx.Request,
477
+ *,
478
+ stream: bool = False,
479
+ auth: Union[
480
+ httpx._types.AuthTypes, httpx._client.UseClientDefault, None
481
+ ] = httpx.USE_CLIENT_DEFAULT,
482
+ follow_redirects: Union[
483
+ bool, httpx._client.UseClientDefault
484
+ ] = httpx.USE_CLIENT_DEFAULT,
485
+ ) -> httpx.Response:
486
+ request.headers["Client-Level-Header"] = "added by client"
487
+
488
+ return await self.client.send(
489
+ request, stream=stream, auth=auth, follow_redirects=follow_redirects
490
+ )
491
+
492
+ def build_request(
493
+ self,
494
+ method: str,
495
+ url: httpx._types.URLTypes,
496
+ *,
497
+ content: Optional[httpx._types.RequestContent] = None,
498
+ data: Optional[httpx._types.RequestData] = None,
499
+ files: Optional[httpx._types.RequestFiles] = None,
500
+ json: Optional[Any] = None,
501
+ params: Optional[httpx._types.QueryParamTypes] = None,
502
+ headers: Optional[httpx._types.HeaderTypes] = None,
503
+ cookies: Optional[httpx._types.CookieTypes] = None,
504
+ timeout: Union[
505
+ httpx._types.TimeoutTypes, httpx._client.UseClientDefault
506
+ ] = httpx.USE_CLIENT_DEFAULT,
507
+ extensions: Optional[httpx._types.RequestExtensions] = None,
508
+ ) -> httpx.Request:
509
+ return self.client.build_request(
510
+ method,
511
+ url,
512
+ content=content,
513
+ data=data,
514
+ files=files,
515
+ json=json,
516
+ params=params,
517
+ headers=headers,
518
+ cookies=cookies,
519
+ timeout=timeout,
520
+ extensions=extensions,
521
+ )
522
+
523
+ s = Zeronetworks(async_client=CustomClient(httpx.AsyncClient()))
524
+ ```
525
+ <!-- End Custom HTTP Client [http-client] -->
526
+
527
+ <!-- Start Resource Management [resource-management] -->
528
+ ## Resource Management
529
+
530
+ The `Zeronetworks` class implements the context manager protocol and registers a finalizer function to close the underlying sync and async HTTPX clients it uses under the hood. This will close HTTP connections, release memory and free up other resources held by the SDK. In short-lived Python programs and notebooks that make a few SDK method calls, resource management may not be a concern. However, in longer-lived programs, it is beneficial to create a single SDK instance via a [context manager][context-manager] and reuse it across the application.
531
+
532
+ [context-manager]: https://docs.python.org/3/reference/datamodel.html#context-managers
533
+
534
+ ```python
535
+ import os
536
+ from zeronetworks import Zeronetworks
537
+ def main():
538
+
539
+ with Zeronetworks(
540
+ api_key=os.getenv("ZERONETWORKS_API_KEY", ""),
541
+ ) as z_client:
542
+ # Rest of application here...
543
+
544
+
545
+ # Or when using async:
546
+ async def amain():
547
+
548
+ async with Zeronetworks(
549
+ api_key=os.getenv("ZERONETWORKS_API_KEY", ""),
550
+ ) as z_client:
551
+ # Rest of application here...
552
+ ```
553
+ <!-- End Resource Management [resource-management] -->
554
+
555
+ <!-- Start Debugging [debug] -->
556
+ ## Debugging
557
+
558
+ You can setup your SDK to emit debug logs for SDK requests and responses.
559
+
560
+ You can pass your own logger class directly into your SDK.
561
+ ```python
562
+ from zeronetworks import Zeronetworks
563
+ import logging
564
+
565
+ logging.basicConfig(level=logging.DEBUG)
566
+ s = Zeronetworks(debug_logger=logging.getLogger("zeronetworks"))
567
+ ```
568
+
569
+ You can also enable a default debug logger by setting an environment variable `ZERONETWORKS_DEBUG` to true.
570
+ <!-- End Debugging [debug] -->
571
+
572
+ <!-- Placeholder for Future Speakeasy SDK Sections -->
573
+
574
+ # Development
575
+
576
+ ## Maturity
577
+
578
+ This SDK is in beta, and there may be breaking changes between versions without a major version update. Therefore, we recommend pinning usage
579
+ to a specific package version. This way, you can install the same version each time without breaking changes unless you are intentionally
580
+ looking for the latest version.
581
+
582
+ ## Contributions
583
+
584
+ While we value open-source contributions to this SDK, this library is generated programmatically. Any manual changes added to internal files will be overwritten on the next generation.
585
+ We look forward to hearing your feedback. Feel free to open a PR or an issue with a proof of concept and we'll do our best to include it in a future release.
586
+
587
+ ### SDK Created by [Speakeasy](https://www.speakeasy.com/?utm_source=zeronetworks&utm_campaign=python)