amsdal 0.4.13__cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.whl

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 (269) hide show
  1. amsdal/Third-Party Materials - AMSDAL Dependencies - License Notices.md +1334 -0
  2. amsdal/__about__.py +4 -0
  3. amsdal/__about__.pyi +1 -0
  4. amsdal/__init__.py +23 -0
  5. amsdal/__init__.pyi +9 -0
  6. amsdal/__migrations__/0000_initial.py +217 -0
  7. amsdal/__migrations__/0001_datetime_type.py +18 -0
  8. amsdal/__migrations__/0002_fixture_order.py +44 -0
  9. amsdal/__migrations__/0003_schema_type_in_class_meta.py +44 -0
  10. amsdal/cloud/__init__.cpython-311-x86_64-linux-gnu.so +0 -0
  11. amsdal/cloud/__init__.pyi +0 -0
  12. amsdal/cloud/client.cpython-311-x86_64-linux-gnu.so +0 -0
  13. amsdal/cloud/client.pyi +57 -0
  14. amsdal/cloud/constants.cpython-311-x86_64-linux-gnu.so +0 -0
  15. amsdal/cloud/constants.pyi +13 -0
  16. amsdal/cloud/enums.cpython-311-x86_64-linux-gnu.so +0 -0
  17. amsdal/cloud/enums.pyi +68 -0
  18. amsdal/cloud/models/__init__.cpython-311-x86_64-linux-gnu.so +0 -0
  19. amsdal/cloud/models/__init__.pyi +0 -0
  20. amsdal/cloud/models/base.cpython-311-x86_64-linux-gnu.so +0 -0
  21. amsdal/cloud/models/base.pyi +247 -0
  22. amsdal/cloud/services/__init__.cpython-311-x86_64-linux-gnu.so +0 -0
  23. amsdal/cloud/services/__init__.pyi +0 -0
  24. amsdal/cloud/services/actions/__init__.cpython-311-x86_64-linux-gnu.so +0 -0
  25. amsdal/cloud/services/actions/__init__.pyi +0 -0
  26. amsdal/cloud/services/actions/add_allowlist_ip.cpython-311-x86_64-linux-gnu.so +0 -0
  27. amsdal/cloud/services/actions/add_allowlist_ip.pyi +19 -0
  28. amsdal/cloud/services/actions/add_basic_auth.cpython-311-x86_64-linux-gnu.so +0 -0
  29. amsdal/cloud/services/actions/add_basic_auth.pyi +21 -0
  30. amsdal/cloud/services/actions/add_dependency.cpython-311-x86_64-linux-gnu.so +0 -0
  31. amsdal/cloud/services/actions/add_dependency.pyi +19 -0
  32. amsdal/cloud/services/actions/add_secret.cpython-311-x86_64-linux-gnu.so +0 -0
  33. amsdal/cloud/services/actions/add_secret.pyi +20 -0
  34. amsdal/cloud/services/actions/base.cpython-311-x86_64-linux-gnu.so +0 -0
  35. amsdal/cloud/services/actions/base.pyi +122 -0
  36. amsdal/cloud/services/actions/create_deploy.cpython-311-x86_64-linux-gnu.so +0 -0
  37. amsdal/cloud/services/actions/create_deploy.pyi +41 -0
  38. amsdal/cloud/services/actions/create_env.cpython-311-x86_64-linux-gnu.so +0 -0
  39. amsdal/cloud/services/actions/create_env.pyi +19 -0
  40. amsdal/cloud/services/actions/create_session.cpython-311-x86_64-linux-gnu.so +0 -0
  41. amsdal/cloud/services/actions/create_session.pyi +17 -0
  42. amsdal/cloud/services/actions/delete_allowlist_ip.cpython-311-x86_64-linux-gnu.so +0 -0
  43. amsdal/cloud/services/actions/delete_allowlist_ip.pyi +19 -0
  44. amsdal/cloud/services/actions/delete_basic_auth.cpython-311-x86_64-linux-gnu.so +0 -0
  45. amsdal/cloud/services/actions/delete_basic_auth.pyi +20 -0
  46. amsdal/cloud/services/actions/delete_dependency.cpython-311-x86_64-linux-gnu.so +0 -0
  47. amsdal/cloud/services/actions/delete_dependency.pyi +21 -0
  48. amsdal/cloud/services/actions/delete_env.cpython-311-x86_64-linux-gnu.so +0 -0
  49. amsdal/cloud/services/actions/delete_env.pyi +21 -0
  50. amsdal/cloud/services/actions/delete_secret.cpython-311-x86_64-linux-gnu.so +0 -0
  51. amsdal/cloud/services/actions/delete_secret.pyi +21 -0
  52. amsdal/cloud/services/actions/destroy_deploy.cpython-311-x86_64-linux-gnu.so +0 -0
  53. amsdal/cloud/services/actions/destroy_deploy.pyi +18 -0
  54. amsdal/cloud/services/actions/expose_db.cpython-311-x86_64-linux-gnu.so +0 -0
  55. amsdal/cloud/services/actions/expose_db.pyi +22 -0
  56. amsdal/cloud/services/actions/get_basic_auth_credentials.cpython-311-x86_64-linux-gnu.so +0 -0
  57. amsdal/cloud/services/actions/get_basic_auth_credentials.pyi +21 -0
  58. amsdal/cloud/services/actions/get_monitoring_info.cpython-311-x86_64-linux-gnu.so +0 -0
  59. amsdal/cloud/services/actions/get_monitoring_info.pyi +21 -0
  60. amsdal/cloud/services/actions/list_dependencies.cpython-311-x86_64-linux-gnu.so +0 -0
  61. amsdal/cloud/services/actions/list_dependencies.pyi +21 -0
  62. amsdal/cloud/services/actions/list_deploys.cpython-311-x86_64-linux-gnu.so +0 -0
  63. amsdal/cloud/services/actions/list_deploys.pyi +19 -0
  64. amsdal/cloud/services/actions/list_envs.cpython-311-x86_64-linux-gnu.so +0 -0
  65. amsdal/cloud/services/actions/list_envs.pyi +20 -0
  66. amsdal/cloud/services/actions/list_secrets.cpython-311-x86_64-linux-gnu.so +0 -0
  67. amsdal/cloud/services/actions/list_secrets.pyi +22 -0
  68. amsdal/cloud/services/actions/manager.cpython-311-x86_64-linux-gnu.so +0 -0
  69. amsdal/cloud/services/actions/manager.pyi +278 -0
  70. amsdal/cloud/services/actions/signup_action.cpython-311-x86_64-linux-gnu.so +0 -0
  71. amsdal/cloud/services/actions/signup_action.pyi +20 -0
  72. amsdal/cloud/services/actions/update_deploy.cpython-311-x86_64-linux-gnu.so +0 -0
  73. amsdal/cloud/services/actions/update_deploy.pyi +19 -0
  74. amsdal/cloud/services/auth/__init__.cpython-311-x86_64-linux-gnu.so +0 -0
  75. amsdal/cloud/services/auth/__init__.pyi +0 -0
  76. amsdal/cloud/services/auth/base.cpython-311-x86_64-linux-gnu.so +0 -0
  77. amsdal/cloud/services/auth/base.pyi +6 -0
  78. amsdal/cloud/services/auth/credentials.cpython-311-x86_64-linux-gnu.so +0 -0
  79. amsdal/cloud/services/auth/credentials.pyi +30 -0
  80. amsdal/cloud/services/auth/manager.cpython-311-x86_64-linux-gnu.so +0 -0
  81. amsdal/cloud/services/auth/manager.pyi +26 -0
  82. amsdal/cloud/services/auth/signup_service.cpython-311-x86_64-linux-gnu.so +0 -0
  83. amsdal/cloud/services/auth/signup_service.pyi +32 -0
  84. amsdal/cloud/services/auth/token.cpython-311-x86_64-linux-gnu.so +0 -0
  85. amsdal/cloud/services/auth/token.pyi +27 -0
  86. amsdal/configs/__init__.py +0 -0
  87. amsdal/configs/__init__.pyi +0 -0
  88. amsdal/configs/constants.py +33 -0
  89. amsdal/configs/constants.pyi +22 -0
  90. amsdal/configs/main.py +258 -0
  91. amsdal/configs/main.pyi +173 -0
  92. amsdal/context/__init__.py +0 -0
  93. amsdal/context/__init__.pyi +0 -0
  94. amsdal/context/manager.py +69 -0
  95. amsdal/context/manager.pyi +50 -0
  96. amsdal/contrib/__init__.cpython-311-x86_64-linux-gnu.so +0 -0
  97. amsdal/contrib/__init__.pyi +0 -0
  98. amsdal/contrib/app_config.py +7 -0
  99. amsdal/contrib/app_config.pyi +6 -0
  100. amsdal/contrib/auth/__init__.py +0 -0
  101. amsdal/contrib/auth/__init__.pyi +0 -0
  102. amsdal/contrib/auth/app.py +27 -0
  103. amsdal/contrib/auth/app.pyi +15 -0
  104. amsdal/contrib/auth/decorators/__init__.py +35 -0
  105. amsdal/contrib/auth/decorators/__init__.pyi +6 -0
  106. amsdal/contrib/auth/errors.py +7 -0
  107. amsdal/contrib/auth/errors.pyi +4 -0
  108. amsdal/contrib/auth/fixtures/basic_permissions.json +64 -0
  109. amsdal/contrib/auth/lifecycle/__init__.py +0 -0
  110. amsdal/contrib/auth/lifecycle/__init__.pyi +0 -0
  111. amsdal/contrib/auth/lifecycle/consumer.py +394 -0
  112. amsdal/contrib/auth/lifecycle/consumer.pyi +108 -0
  113. amsdal/contrib/auth/migrations/0000_initial.py +84 -0
  114. amsdal/contrib/auth/models/__init__.py +0 -0
  115. amsdal/contrib/auth/models/__init__.pyi +0 -0
  116. amsdal/contrib/auth/models/login_session.py +118 -0
  117. amsdal/contrib/auth/models/login_session.pyi +37 -0
  118. amsdal/contrib/auth/models/permission.py +23 -0
  119. amsdal/contrib/auth/models/permission.pyi +18 -0
  120. amsdal/contrib/auth/models/user.py +106 -0
  121. amsdal/contrib/auth/models/user.pyi +46 -0
  122. amsdal/contrib/auth/settings.py +36 -0
  123. amsdal/contrib/auth/settings.pyi +26 -0
  124. amsdal/contrib/frontend_configs/__init__.py +0 -0
  125. amsdal/contrib/frontend_configs/__init__.pyi +0 -0
  126. amsdal/contrib/frontend_configs/app.py +24 -0
  127. amsdal/contrib/frontend_configs/app.pyi +19 -0
  128. amsdal/contrib/frontend_configs/constants.py +1 -0
  129. amsdal/contrib/frontend_configs/constants.pyi +1 -0
  130. amsdal/contrib/frontend_configs/conversion/__init__.py +5 -0
  131. amsdal/contrib/frontend_configs/conversion/__init__.pyi +3 -0
  132. amsdal/contrib/frontend_configs/conversion/convert.py +286 -0
  133. amsdal/contrib/frontend_configs/conversion/convert.pyi +22 -0
  134. amsdal/contrib/frontend_configs/lifecycle/__init__.py +0 -0
  135. amsdal/contrib/frontend_configs/lifecycle/__init__.pyi +0 -0
  136. amsdal/contrib/frontend_configs/lifecycle/consumer.py +306 -0
  137. amsdal/contrib/frontend_configs/lifecycle/consumer.pyi +98 -0
  138. amsdal/contrib/frontend_configs/migrations/0000_initial.py +256 -0
  139. amsdal/contrib/frontend_configs/models/__init__.py +0 -0
  140. amsdal/contrib/frontend_configs/models/__init__.pyi +0 -0
  141. amsdal/contrib/frontend_configs/models/frontend_activator_config.py +22 -0
  142. amsdal/contrib/frontend_configs/models/frontend_activator_config.pyi +12 -0
  143. amsdal/contrib/frontend_configs/models/frontend_config_async_validator.py +11 -0
  144. amsdal/contrib/frontend_configs/models/frontend_config_async_validator.pyi +7 -0
  145. amsdal/contrib/frontend_configs/models/frontend_config_control_action.py +54 -0
  146. amsdal/contrib/frontend_configs/models/frontend_config_control_action.pyi +32 -0
  147. amsdal/contrib/frontend_configs/models/frontend_config_group_validator.py +21 -0
  148. amsdal/contrib/frontend_configs/models/frontend_config_group_validator.pyi +11 -0
  149. amsdal/contrib/frontend_configs/models/frontend_config_option.py +12 -0
  150. amsdal/contrib/frontend_configs/models/frontend_config_option.pyi +8 -0
  151. amsdal/contrib/frontend_configs/models/frontend_config_skip_none_base.py +17 -0
  152. amsdal/contrib/frontend_configs/models/frontend_config_skip_none_base.pyi +8 -0
  153. amsdal/contrib/frontend_configs/models/frontend_config_slider_option.py +13 -0
  154. amsdal/contrib/frontend_configs/models/frontend_config_slider_option.pyi +9 -0
  155. amsdal/contrib/frontend_configs/models/frontend_config_text_mask.py +14 -0
  156. amsdal/contrib/frontend_configs/models/frontend_config_text_mask.pyi +10 -0
  157. amsdal/contrib/frontend_configs/models/frontend_config_validator.py +28 -0
  158. amsdal/contrib/frontend_configs/models/frontend_config_validator.pyi +15 -0
  159. amsdal/contrib/frontend_configs/models/frontend_control_config.py +87 -0
  160. amsdal/contrib/frontend_configs/models/frontend_control_config.pyi +35 -0
  161. amsdal/contrib/frontend_configs/models/frontend_model_config.py +14 -0
  162. amsdal/contrib/frontend_configs/models/frontend_model_config.pyi +9 -0
  163. amsdal/contrib/frontend_configs/utils.py +29 -0
  164. amsdal/contrib/frontend_configs/utils.pyi +17 -0
  165. amsdal/errors.py +31 -0
  166. amsdal/errors.pyi +12 -0
  167. amsdal/fixtures/__init__.cpython-311-x86_64-linux-gnu.so +0 -0
  168. amsdal/fixtures/__init__.pyi +0 -0
  169. amsdal/fixtures/manager.cpython-311-x86_64-linux-gnu.so +0 -0
  170. amsdal/fixtures/manager.pyi +170 -0
  171. amsdal/fixtures/utils.cpython-311-x86_64-linux-gnu.so +0 -0
  172. amsdal/fixtures/utils.pyi +9 -0
  173. amsdal/manager.cpython-311-x86_64-linux-gnu.so +0 -0
  174. amsdal/manager.pyi +265 -0
  175. amsdal/mixins/__init__.cpython-311-x86_64-linux-gnu.so +0 -0
  176. amsdal/mixins/__init__.pyi +0 -0
  177. amsdal/mixins/class_versions_mixin.cpython-311-x86_64-linux-gnu.so +0 -0
  178. amsdal/mixins/class_versions_mixin.pyi +12 -0
  179. amsdal/models/__init__.py +19 -0
  180. amsdal/models/__init__.pyi +9 -0
  181. amsdal/models/core/__init__.py +0 -0
  182. amsdal/models/core/__init__.pyi +0 -0
  183. amsdal/models/core/class_object.py +37 -0
  184. amsdal/models/core/class_object.pyi +24 -0
  185. amsdal/models/core/class_object_meta.py +26 -0
  186. amsdal/models/core/class_object_meta.pyi +15 -0
  187. amsdal/models/core/class_property.py +20 -0
  188. amsdal/models/core/class_property.pyi +11 -0
  189. amsdal/models/core/class_property_meta.py +15 -0
  190. amsdal/models/core/class_property_meta.pyi +10 -0
  191. amsdal/models/core/file.py +156 -0
  192. amsdal/models/core/file.pyi +104 -0
  193. amsdal/models/core/fixture.py +25 -0
  194. amsdal/models/core/fixture.pyi +14 -0
  195. amsdal/models/core/option.py +11 -0
  196. amsdal/models/core/option.pyi +8 -0
  197. amsdal/models/core/validator.py +12 -0
  198. amsdal/models/core/validator.pyi +8 -0
  199. amsdal/models/types/__init__.py +0 -0
  200. amsdal/models/types/__init__.pyi +0 -0
  201. amsdal/models/types/object.py +26 -0
  202. amsdal/models/types/object.pyi +16 -0
  203. amsdal/py.typed +0 -0
  204. amsdal/queryset/__init__.py +21 -0
  205. amsdal/queryset/__init__.pyi +6 -0
  206. amsdal/schemas/__init__.py +0 -0
  207. amsdal/schemas/__init__.pyi +0 -0
  208. amsdal/schemas/core/class_object/model.json +31 -0
  209. amsdal/schemas/core/class_object/properties/display_name.py +9 -0
  210. amsdal/schemas/core/class_object_meta/model.json +59 -0
  211. amsdal/schemas/core/class_property/model.json +22 -0
  212. amsdal/schemas/core/class_property_meta/model.json +23 -0
  213. amsdal/schemas/core/file/hooks/pre_create.py +24 -0
  214. amsdal/schemas/core/file/hooks/pre_update.py +24 -0
  215. amsdal/schemas/core/file/model.json +23 -0
  216. amsdal/schemas/core/file/properties/from_file.py +34 -0
  217. amsdal/schemas/core/file/properties/mimetype.py +13 -0
  218. amsdal/schemas/core/file/properties/str.py +6 -0
  219. amsdal/schemas/core/file/properties/to_file.py +24 -0
  220. amsdal/schemas/core/file/properties/validate_data.py +32 -0
  221. amsdal/schemas/core/fixture/model.json +35 -0
  222. amsdal/schemas/core/option/model.json +19 -0
  223. amsdal/schemas/core/validator/model.json +19 -0
  224. amsdal/schemas/interfaces.py +25 -0
  225. amsdal/schemas/interfaces.pyi +20 -0
  226. amsdal/schemas/manager.cpython-311-x86_64-linux-gnu.so +0 -0
  227. amsdal/schemas/manager.py +0 -0
  228. amsdal/schemas/manager.pyi +0 -0
  229. amsdal/schemas/mixins/__init__.py +0 -0
  230. amsdal/schemas/mixins/__init__.pyi +0 -0
  231. amsdal/schemas/mixins/check_dependencies_mixin.py +125 -0
  232. amsdal/schemas/mixins/check_dependencies_mixin.pyi +45 -0
  233. amsdal/schemas/mixins/verify_schemas_mixin.py +96 -0
  234. amsdal/schemas/mixins/verify_schemas_mixin.pyi +33 -0
  235. amsdal/schemas/repository.py +84 -0
  236. amsdal/schemas/repository.pyi +22 -0
  237. amsdal/schemas/types/anything/model.json +7 -0
  238. amsdal/schemas/types/array/model.json +7 -0
  239. amsdal/schemas/types/binary/model.json +7 -0
  240. amsdal/schemas/types/boolean/model.json +17 -0
  241. amsdal/schemas/types/date/model.json +7 -0
  242. amsdal/schemas/types/datetime/model.json +7 -0
  243. amsdal/schemas/types/dictionary/model.json +8 -0
  244. amsdal/schemas/types/number/model.json +8 -0
  245. amsdal/schemas/types/object/model.json +53 -0
  246. amsdal/schemas/types/string/model.json +8 -0
  247. amsdal/schemas/utils.py +16 -0
  248. amsdal/schemas/utils.pyi +10 -0
  249. amsdal/services/__init__.cpython-311-x86_64-linux-gnu.so +0 -0
  250. amsdal/services/__init__.pyi +0 -0
  251. amsdal/services/transaction_execution.cpython-311-x86_64-linux-gnu.so +0 -0
  252. amsdal/services/transaction_execution.pyi +93 -0
  253. amsdal/transactions/__init__.py +13 -0
  254. amsdal/transactions/__init__.pyi +4 -0
  255. amsdal/utils/__init__.py +0 -0
  256. amsdal/utils/__init__.pyi +0 -0
  257. amsdal/utils/contrib_paths.py +23 -0
  258. amsdal/utils/contrib_paths.pyi +14 -0
  259. amsdal/utils/rollback/__init__.py +440 -0
  260. amsdal/utils/rollback/__init__.pyi +38 -0
  261. amsdal/utils/tests/__init__.py +0 -0
  262. amsdal/utils/tests/enums.py +18 -0
  263. amsdal/utils/tests/factories.py +49 -0
  264. amsdal/utils/tests/helpers.py +499 -0
  265. amsdal-0.4.13.dist-info/METADATA +369 -0
  266. amsdal-0.4.13.dist-info/RECORD +269 -0
  267. amsdal-0.4.13.dist-info/WHEEL +6 -0
  268. amsdal-0.4.13.dist-info/licenses/LICENSE.txt +107 -0
  269. amsdal-0.4.13.dist-info/top_level.txt +1 -0
@@ -0,0 +1,21 @@
1
+ from amsdal.cloud.services.actions.base import CloudActionBase as CloudActionBase
2
+
3
+ class DeleteSecretAction(CloudActionBase):
4
+ """
5
+ Class to handle the deletion of a secret.
6
+
7
+ This class provides functionality to remove a specified secret for a given environment and application.
8
+ """
9
+ def action(self, secret_name: str, env_name: str, application_uuid: str | None = None, application_name: str | None = None) -> bool:
10
+ """
11
+ Executes the secret deletion action with the given parameters.
12
+
13
+ Args:
14
+ secret_name (str): The name of the secret to remove.
15
+ env_name (str): The name of the environment.
16
+ application_uuid (str | None, optional): The UUID of the application. Defaults to None.
17
+ application_name (str | None, optional): The name of the application. Defaults to None.
18
+
19
+ Returns:
20
+ bool: True if the secret deletion action was successful.
21
+ """
@@ -0,0 +1,18 @@
1
+ from amsdal.cloud.services.actions.base import CloudActionBase as CloudActionBase
2
+
3
+ class DestroyDeployAction(CloudActionBase):
4
+ """
5
+ Class to handle the destruction of a deployment.
6
+
7
+ This class provides functionality to remove a specified deployment by its ID.
8
+ """
9
+ def action(self, deployment_id: str) -> bool:
10
+ """
11
+ Executes the deployment destruction action with the given parameters.
12
+
13
+ Args:
14
+ deployment_id (str): The ID of the deployment to remove.
15
+
16
+ Returns:
17
+ bool: True if the deployment destruction action was successful.
18
+ """
@@ -0,0 +1,22 @@
1
+ from amsdal.cloud.services.actions.base import CloudActionBase as CloudActionBase
2
+ from typing import Any
3
+
4
+ class ExposeDBAction(CloudActionBase):
5
+ """
6
+ Class to handle the exposure of a database.
7
+
8
+ This class provides functionality to expose a database for a given environment and application.
9
+ """
10
+ def action(self, env_name: str, application_name: str | None = None, application_uuid: str | None = None, ip_address: str | None = None) -> dict[str, Any]:
11
+ """
12
+ Executes the database exposure action with the given parameters.
13
+
14
+ Args:
15
+ env_name (str): The name of the environment.
16
+ application_name (str | None, optional): The name of the application. Defaults to None.
17
+ application_uuid (str | None, optional): The UUID of the application. Defaults to None.
18
+ ip_address (str | None, optional): The IP address to expose the database to. Defaults to None.
19
+
20
+ Returns:
21
+ dict[str, Any]: The response details after the database exposure action.
22
+ """
@@ -0,0 +1,21 @@
1
+ from amsdal.cloud.models.base import AddBasicAuthResponse as AddBasicAuthResponse
2
+ from amsdal.cloud.services.actions.base import CloudActionBase as CloudActionBase
3
+
4
+ class GetBasicAuthCredentialsAction(CloudActionBase):
5
+ """
6
+ Class to handle the retrieval of basic authentication credentials.
7
+
8
+ This class provides functionality to get basic authentication credentials for a given environment and application.
9
+ """
10
+ def action(self, env_name: str, application_name: str | None = None, application_uuid: str | None = None) -> AddBasicAuthResponse:
11
+ """
12
+ Executes the action to retrieve basic authentication credentials with the given parameters.
13
+
14
+ Args:
15
+ env_name (str): The name of the environment.
16
+ application_name (str | None, optional): The name of the application. Defaults to None.
17
+ application_uuid (str | None, optional): The UUID of the application. Defaults to None.
18
+
19
+ Returns:
20
+ AddBasicAuthResponse: The response containing the basic authentication credentials.
21
+ """
@@ -0,0 +1,21 @@
1
+ from amsdal.cloud.models.base import GetMonitoringInfoResponse as GetMonitoringInfoResponse
2
+ from amsdal.cloud.services.actions.base import CloudActionBase as CloudActionBase
3
+
4
+ class GetMonitoringInfoAction(CloudActionBase):
5
+ """
6
+ Class to handle the retrieval of monitoring information.
7
+
8
+ This class provides functionality to get monitoring information for a given environment and application.
9
+ """
10
+ def action(self, env_name: str, application_name: str | None = None, application_uuid: str | None = None) -> GetMonitoringInfoResponse:
11
+ """
12
+ Executes the action to retrieve monitoring information with the given parameters.
13
+
14
+ Args:
15
+ env_name (str): The name of the environment.
16
+ application_name (str | None, optional): The name of the application. Defaults to None.
17
+ application_uuid (str | None, optional): The UUID of the application. Defaults to None.
18
+
19
+ Returns:
20
+ GetMonitoringInfoResponse: The response containing the monitoring information.
21
+ """
@@ -0,0 +1,21 @@
1
+ from amsdal.cloud.models.base import ListDependenciesDetails as ListDependenciesDetails
2
+ from amsdal.cloud.services.actions.base import CloudActionBase as CloudActionBase
3
+
4
+ class ListDependenciesAction(CloudActionBase):
5
+ """
6
+ Class to handle the listing of application dependencies.
7
+
8
+ This class provides functionality to list dependencies for a given environment and application.
9
+ """
10
+ def action(self, env_name: str, application_name: str | None = None, application_uuid: str | None = None) -> ListDependenciesDetails:
11
+ """
12
+ Executes the action to list application dependencies with the given parameters.
13
+
14
+ Args:
15
+ env_name (str): The name of the environment.
16
+ application_name (str | None, optional): The name of the application. Defaults to None.
17
+ application_uuid (str | None, optional): The UUID of the application. Defaults to None.
18
+
19
+ Returns:
20
+ ListDependenciesDetails: The response containing the list of application dependencies.
21
+ """
@@ -0,0 +1,19 @@
1
+ from amsdal.cloud.models.base import ListDeployResponse as ListDeployResponse
2
+ from amsdal.cloud.services.actions.base import CloudActionBase as CloudActionBase
3
+
4
+ class ListDeploysAction(CloudActionBase):
5
+ """
6
+ Class to handle the listing of deployments.
7
+
8
+ This class provides functionality to list deployments for a given environment.
9
+ """
10
+ def action(self, *, list_all: bool = True) -> ListDeployResponse:
11
+ """
12
+ Executes the action to list deployments with the given parameters.
13
+
14
+ Args:
15
+ list_all (bool, optional): Whether to list all deployments. Defaults to True.
16
+
17
+ Returns:
18
+ ListDeployResponse: The response containing the list of deployments.
19
+ """
@@ -0,0 +1,20 @@
1
+ from amsdal.cloud.models.base import ListEnvsResponse as ListEnvsResponse
2
+ from amsdal.cloud.services.actions.base import CloudActionBase as CloudActionBase
3
+
4
+ class ListEnvsAction(CloudActionBase):
5
+ """
6
+ Class to handle the listing of environments.
7
+
8
+ This class provides functionality to list environments for a given application.
9
+ """
10
+ def action(self, *, application_name: str | None = None, application_uuid: str | None = None) -> ListEnvsResponse:
11
+ """
12
+ Executes the action to list environments with the given parameters.
13
+
14
+ Args:
15
+ application_name (str | None, optional): The name of the application. Defaults to None.
16
+ application_uuid (str | None, optional): The UUID of the application. Defaults to None.
17
+
18
+ Returns:
19
+ ListEnvsResponse: The response containing the list of environments.
20
+ """
@@ -0,0 +1,22 @@
1
+ from amsdal.cloud.models.base import ListSecretsDetails as ListSecretsDetails
2
+ from amsdal.cloud.services.actions.base import CloudActionBase as CloudActionBase
3
+
4
+ class ListSecretsAction(CloudActionBase):
5
+ """
6
+ Class to handle the listing of secrets.
7
+
8
+ This class provides functionality to list secrets for a given environment and application.
9
+ """
10
+ def action(self, env_name: str, application_uuid: str | None = None, application_name: str | None = None, *, with_values: bool = False) -> ListSecretsDetails:
11
+ """
12
+ Executes the action to list secrets with the given parameters.
13
+
14
+ Args:
15
+ env_name (str): The name of the environment.
16
+ application_uuid (str | None, optional): The UUID of the application. Defaults to None.
17
+ application_name (str | None, optional): The name of the application. Defaults to None.
18
+ with_values (bool, optional): Whether to include secret values. Defaults to False.
19
+
20
+ Returns:
21
+ ListSecretsDetails: The response containing the list of secrets.
22
+ """
@@ -0,0 +1,278 @@
1
+ from amsdal.cloud.models.base import AddBasicAuthResponse as AddBasicAuthResponse, CreateEnvResponse as CreateEnvResponse, GetMonitoringInfoResponse as GetMonitoringInfoResponse, ListDependenciesDetails as ListDependenciesDetails, ListDeployResponse as ListDeployResponse, ListEnvsResponse as ListEnvsResponse, ListSecretsDetails as ListSecretsDetails, UpdateDeployStatusResponse as UpdateDeployStatusResponse
2
+ from amsdal.cloud.services.actions.add_allowlist_ip import AddAllowlistIPAction as AddAllowlistIPAction
3
+ from amsdal.cloud.services.actions.add_basic_auth import AddBasicAuthAction as AddBasicAuthAction
4
+ from amsdal.cloud.services.actions.add_dependency import AddDepenencyAction as AddDepenencyAction
5
+ from amsdal.cloud.services.actions.add_secret import AddSecretAction as AddSecretAction
6
+ from amsdal.cloud.services.actions.create_deploy import CreateDeployAction as CreateDeployAction
7
+ from amsdal.cloud.services.actions.create_env import CreateEnvAction as CreateEnvAction
8
+ from amsdal.cloud.services.actions.delete_allowlist_ip import DeleteAllowlistIPAction as DeleteAllowlistIPAction
9
+ from amsdal.cloud.services.actions.delete_basic_auth import DeleteBasicAuthAction as DeleteBasicAuthAction
10
+ from amsdal.cloud.services.actions.delete_dependency import DeleteDepenencyAction as DeleteDepenencyAction
11
+ from amsdal.cloud.services.actions.delete_env import DeleteEnvAction as DeleteEnvAction
12
+ from amsdal.cloud.services.actions.delete_secret import DeleteSecretAction as DeleteSecretAction
13
+ from amsdal.cloud.services.actions.destroy_deploy import DestroyDeployAction as DestroyDeployAction
14
+ from amsdal.cloud.services.actions.expose_db import ExposeDBAction as ExposeDBAction
15
+ from amsdal.cloud.services.actions.get_basic_auth_credentials import GetBasicAuthCredentialsAction as GetBasicAuthCredentialsAction
16
+ from amsdal.cloud.services.actions.get_monitoring_info import GetMonitoringInfoAction as GetMonitoringInfoAction
17
+ from amsdal.cloud.services.actions.list_dependencies import ListDependenciesAction as ListDependenciesAction
18
+ from amsdal.cloud.services.actions.list_deploys import ListDeploysAction as ListDeploysAction
19
+ from amsdal.cloud.services.actions.list_envs import ListEnvsAction as ListEnvsAction
20
+ from amsdal.cloud.services.actions.list_secrets import ListSecretsAction as ListSecretsAction
21
+ from amsdal.cloud.services.actions.update_deploy import UpdateDeployAction as UpdateDeployAction
22
+ from typing import Any
23
+
24
+ class CloudActionsManager:
25
+ """
26
+ Manager class to handle various cloud actions.
27
+
28
+ This class provides methods to perform actions such as creating, listing, and deleting deployments,
29
+ environments, secrets, and dependencies.
30
+ """
31
+ def create_deploy(self, deploy_type: str, lakehouse_type: str, env_name: str, from_env: str | None = None, application_uuid: str | None = None, application_name: str | None = None, *, no_input: bool = False) -> bool:
32
+ """
33
+ Creates a new deployment with the given parameters.
34
+
35
+ Args:
36
+ deploy_type (str): The type of deployment.
37
+ lakehouse_type (str): The type of lakehouse.
38
+ env_name (str): The name of the environment.
39
+ from_env (str | None, optional): The source environment. Defaults to None.
40
+ application_uuid (str | None, optional): The UUID of the application. Defaults to None.
41
+ application_name (str | None, optional): The name of the application. Defaults to None.
42
+ no_input (bool, optional): Whether to disable input prompts. Defaults to False.
43
+
44
+ Returns:
45
+ bool: True if the deployment was created successfully, False otherwise.
46
+ """
47
+ def list_deploys(self, *, list_all: bool = True) -> ListDeployResponse:
48
+ """
49
+ Lists deployments with the given parameters.
50
+
51
+ Args:
52
+ list_all (bool, optional): Whether to list all deployments. Defaults to True.
53
+
54
+ Returns:
55
+ ListDeployResponse: The response containing the list of deployments.
56
+ """
57
+ def destroy_deploy(self, deployment_id: str) -> bool:
58
+ """
59
+ Destroys a deployment with the given deployment ID.
60
+
61
+ Args:
62
+ deployment_id (str): The ID of the deployment to be destroyed.
63
+
64
+ Returns:
65
+ bool: True if the deployment was destroyed successfully, False otherwise.
66
+ """
67
+ def update_deploy(self, deployment_id: str) -> UpdateDeployStatusResponse:
68
+ """
69
+ Updates the status of a deployment with the given deployment ID.
70
+
71
+ Args:
72
+ deployment_id (str): The ID of the deployment to be updated.
73
+
74
+ Returns:
75
+ UpdateDeployStatusResponse: The response containing the updated deployment status.
76
+ """
77
+ def add_secret(self, secret_name: str, secret_value: str, env_name: str, application_uuid: str | None = None, application_name: str | None = None) -> bool:
78
+ """
79
+ Adds a secret with the given parameters.
80
+
81
+ Args:
82
+ secret_name (str): The name of the secret.
83
+ secret_value (str): The value of the secret.
84
+ env_name (str): The name of the environment.
85
+ application_uuid (str | None, optional): The UUID of the application. Defaults to None.
86
+ application_name (str | None, optional): The name of the application. Defaults to None.
87
+
88
+ Returns:
89
+ bool: True if the secret was added successfully, False otherwise.
90
+ """
91
+ def list_secrets(self, env_name: str, application_uuid: str | None = None, application_name: str | None = None, *, with_values: bool = False) -> ListSecretsDetails:
92
+ """
93
+ Lists secrets with the given parameters.
94
+
95
+ Args:
96
+ env_name (str): The name of the environment.
97
+ application_uuid (str | None, optional): The UUID of the application. Defaults to None.
98
+ application_name (str | None, optional): The name of the application. Defaults to None.
99
+ with_values (bool, optional): Whether to include secret values. Defaults to False.
100
+
101
+ Returns:
102
+ ListSecretsDetails: The response containing the list of secrets.
103
+ """
104
+ def delete_secret(self, secret_name: str, env_name: str, application_uuid: str | None = None, application_name: str | None = None) -> bool:
105
+ """
106
+ Deletes a secret with the given parameters.
107
+
108
+ Args:
109
+ secret_name (str): The name of the secret.
110
+ env_name (str): The name of the environment.
111
+ application_uuid (str | None, optional): The UUID of the application. Defaults to None.
112
+ application_name (str | None, optional): The name of the application. Defaults to None.
113
+
114
+ Returns:
115
+ bool: True if the secret was deleted successfully, False otherwise.
116
+ """
117
+ def add_dependency(self, dependency_name: str, env_name: str, application_uuid: str | None = None, application_name: str | None = None) -> bool:
118
+ """
119
+ Adds a dependency with the given parameters.
120
+
121
+ Args:
122
+ dependency_name (str): The name of the dependency.
123
+ env_name (str): The name of the environment.
124
+ application_uuid (str | None, optional): The UUID of the application. Defaults to None.
125
+ application_name (str | None, optional): The name of the application. Defaults to None.
126
+
127
+ Returns:
128
+ bool: True if the dependency was added successfully, False otherwise.
129
+ """
130
+ def delete_dependency(self, dependency_name: str, env_name: str, application_uuid: str | None = None, application_name: str | None = None) -> bool:
131
+ """
132
+ Deletes a dependency with the given parameters.
133
+
134
+ Args:
135
+ dependency_name (str): The name of the dependency.
136
+ env_name (str): The name of the environment.
137
+ application_uuid (str | None, optional): The UUID of the application. Defaults to None.
138
+ application_name (str | None, optional): The name of the application. Defaults to None.
139
+
140
+ Returns:
141
+ bool: True if the dependency was deleted successfully, False otherwise.
142
+ """
143
+ def list_dependencies(self, env_name: str, application_uuid: str | None = None, application_name: str | None = None) -> ListDependenciesDetails:
144
+ """
145
+ Lists dependencies with the given parameters.
146
+
147
+ Args:
148
+ env_name (str): The name of the environment.
149
+ application_uuid (str | None, optional): The UUID of the application. Defaults to None.
150
+ application_name (str | None, optional): The name of the application. Defaults to None.
151
+
152
+ Returns:
153
+ ListDependenciesDetails: The response containing the list of dependencies.
154
+ """
155
+ def expose_db(self, env_name: str, application_uuid: str | None = None, application_name: str | None = None, ip_address: str | None = None) -> dict[str, Any]:
156
+ """
157
+ Exposes the database with the given parameters.
158
+
159
+ Args:
160
+ env_name (str): The name of the environment.
161
+ application_uuid (str | None, optional): The UUID of the application. Defaults to None.
162
+ application_name (str | None, optional): The name of the application. Defaults to None.
163
+ ip_address (str | None, optional): The IP address to expose the database to. Defaults to None.
164
+
165
+ Returns:
166
+ dict[str, Any]: The response containing the database exposure details.
167
+ """
168
+ def get_monitoring_info(self, env_name: str, application_uuid: str | None = None, application_name: str | None = None) -> GetMonitoringInfoResponse:
169
+ """
170
+ Gets monitoring information with the given parameters.
171
+
172
+ Args:
173
+ env_name (str): The name of the environment.
174
+ application_uuid (str | None, optional): The UUID of the application. Defaults to None.
175
+ application_name (str | None, optional): The name of the application. Defaults to None.
176
+
177
+ Returns:
178
+ GetMonitoringInfoResponse: The response containing the monitoring information.
179
+ """
180
+ def add_allowlist_ip(self, env_name: str, ip_address: str | None = None, application_uuid: str | None = None, application_name: str | None = None) -> bool:
181
+ """
182
+ Adds an IP address to the allowlist with the given parameters.
183
+
184
+ Args:
185
+ env_name (str): The name of the environment.
186
+ ip_address (str | None, optional): The IP address to be added to the allowlist. Defaults to None.
187
+ application_uuid (str | None, optional): The UUID of the application. Defaults to None.
188
+ application_name (str | None, optional): The name of the application. Defaults to None.
189
+
190
+ Returns:
191
+ bool: True if the IP address was added to the allowlist successfully, False otherwise.
192
+ """
193
+ def delete_allowlist_ip(self, env_name: str, ip_address: str | None = None, application_uuid: str | None = None, application_name: str | None = None) -> bool:
194
+ """
195
+ Deletes an IP address from the allowlist with the given parameters.
196
+
197
+ Args:
198
+ env_name (str): The name of the environment.
199
+ ip_address (str | None, optional): The IP address to be deleted from the allowlist. Defaults to None.
200
+ application_uuid (str | None, optional): The UUID of the application. Defaults to None.
201
+ application_name (str | None, optional): The name of the application. Defaults to None.
202
+
203
+ Returns:
204
+ bool: True if the IP address was deleted from the allowlist successfully, False otherwise.
205
+ """
206
+ def add_basic_auth(self, env_name: str, username: str | None = None, password: str | None = None, application_uuid: str | None = None, application_name: str | None = None) -> AddBasicAuthResponse:
207
+ """
208
+ Adds basic authentication credentials with the given parameters.
209
+
210
+ Args:
211
+ env_name (str): The name of the environment.
212
+ username (str | None, optional): The username for basic authentication. Defaults to None.
213
+ password (str | None, optional): The password for basic authentication. Defaults to None.
214
+ application_uuid (str | None, optional): The UUID of the application. Defaults to None.
215
+ application_name (str | None, optional): The name of the application. Defaults to None.
216
+
217
+ Returns:
218
+ AddBasicAuthResponse: The response containing the added basic authentication credentials.
219
+ """
220
+ def delete_basic_auth(self, env_name: str, application_uuid: str | None = None, application_name: str | None = None) -> bool:
221
+ """
222
+ Deletes basic authentication credentials with the given parameters.
223
+
224
+ Args:
225
+ env_name (str): The name of the environment.
226
+ application_uuid (str | None, optional): The UUID of the application. Defaults to None.
227
+ application_name (str | None, optional): The name of the application. Defaults to None.
228
+
229
+ Returns:
230
+ bool: True if the basic authentication credentials were deleted successfully, False otherwise.
231
+ """
232
+ def get_basic_auth_credentials(self, env_name: str, application_uuid: str | None = None, application_name: str | None = None) -> AddBasicAuthResponse:
233
+ """
234
+ Gets basic authentication credentials with the given parameters.
235
+
236
+ Args:
237
+ env_name (str): The name of the environment.
238
+ application_uuid (str | None, optional): The UUID of the application. Defaults to None.
239
+ application_name (str | None, optional): The name of the application. Defaults to None.
240
+
241
+ Returns:
242
+ AddBasicAuthResponse: The response containing the basic authentication credentials.
243
+ """
244
+ def list_envs(self, application_uuid: str | None = None, application_name: str | None = None) -> ListEnvsResponse:
245
+ """
246
+ Lists environments with the given parameters.
247
+
248
+ Args:
249
+ application_uuid (str | None, optional): The UUID of the application. Defaults to None.
250
+ application_name (str | None, optional): The name of the application. Defaults to None.
251
+
252
+ Returns:
253
+ ListEnvsResponse: The response containing the list of environments.
254
+ """
255
+ def create_env(self, env_name: str, application_name: str | None = None, application_uuid: str | None = None) -> CreateEnvResponse:
256
+ """
257
+ Creates an environment with the given parameters.
258
+
259
+ Args:
260
+ env_name (str): The name of the environment.
261
+ application_name (str | None, optional): The name of the application. Defaults to None.
262
+ application_uuid (str | None, optional): The UUID of the application. Defaults to None.
263
+
264
+ Returns:
265
+ CreateEnvResponse: The response containing the created environment details.
266
+ """
267
+ def delete_env(self, env_name: str, application_name: str | None = None, application_uuid: str | None = None) -> CreateEnvResponse:
268
+ """
269
+ Deletes an environment with the given parameters.
270
+
271
+ Args:
272
+ env_name (str): The name of the environment.
273
+ application_name (str | None, optional): The name of the application. Defaults to None.
274
+ application_uuid (str | None, optional): The UUID of the application. Defaults to None.
275
+
276
+ Returns:
277
+ CreateEnvResponse: The response containing the deleted environment details.
278
+ """
@@ -0,0 +1,20 @@
1
+ from amsdal.cloud.models.base import SignupReponseCredentials as SignupReponseCredentials
2
+ from amsdal.cloud.services.actions.base import CloudActionBase as CloudActionBase
3
+
4
+ class FreeSignupAction(CloudActionBase):
5
+ """
6
+ Class to handle the free signup action.
7
+
8
+ This class provides functionality to sign up a client for free using the provided organization name and email.
9
+ """
10
+ def action(self, organization_name: str, email: str) -> SignupReponseCredentials:
11
+ """
12
+ Executes the free signup action with the given parameters.
13
+
14
+ Args:
15
+ organization_name (str): The name of the organization.
16
+ email (str): The email address for signup.
17
+
18
+ Returns:
19
+ SignupReponseCredentials: The response containing the signup credentials.
20
+ """
@@ -0,0 +1,19 @@
1
+ from amsdal.cloud.models.base import UpdateDeployStatusResponse as UpdateDeployStatusResponse
2
+ from amsdal.cloud.services.actions.base import CloudActionBase as CloudActionBase
3
+
4
+ class UpdateDeployAction(CloudActionBase):
5
+ """
6
+ Class to handle the update of deployment status.
7
+
8
+ This class provides functionality to update the status of a deployment using the given deployment ID.
9
+ """
10
+ def action(self, deployment_id: str) -> UpdateDeployStatusResponse:
11
+ """
12
+ Updates the status of a deployment with the given deployment ID.
13
+
14
+ Args:
15
+ deployment_id (str): The ID of the deployment to be updated.
16
+
17
+ Returns:
18
+ UpdateDeployStatusResponse: The response containing the updated deployment status.
19
+ """
File without changes
@@ -0,0 +1,6 @@
1
+ import abc
2
+ from abc import ABC, abstractmethod
3
+
4
+ class AuthHandlerBase(ABC, metaclass=abc.ABCMeta):
5
+ @abstractmethod
6
+ def validate_credentials(self) -> None: ...
@@ -0,0 +1,30 @@
1
+ from _typeshed import Incomplete
2
+ from amsdal.__about__ import __version__ as __version__
3
+ from amsdal.cloud.client import AuthClientService as AuthClientService
4
+ from amsdal.cloud.constants import ENCRYPT_PUBLIC_KEY as ENCRYPT_PUBLIC_KEY, SYNC_KEY as SYNC_KEY
5
+ from amsdal.cloud.services.actions.create_session import CreateSessionAction as CreateSessionAction
6
+ from amsdal.cloud.services.auth.base import AuthHandlerBase as AuthHandlerBase
7
+ from amsdal.cloud.services.auth.token import TokenAuthHandler as TokenAuthHandler
8
+ from amsdal.errors import AmsdalAuthenticationError as AmsdalAuthenticationError
9
+
10
+ class CredentialsAuthHandler(AuthHandlerBase):
11
+ """
12
+ Handles authentication using credentials.
13
+
14
+ This class provides functionality to authenticate using an access key ID and a secret access key.
15
+ """
16
+ __access_key_id: Incomplete
17
+ __secret_access_key: Incomplete
18
+ __fernet: Incomplete
19
+ auth_client: Incomplete
20
+ def __init__(self, access_key_id: str | None, secret_access_key: str | None) -> None: ...
21
+ def _create_session(self) -> str: ...
22
+ def _get_public_key(self) -> str: ...
23
+ def _decode_public_key(self, key: str) -> str: ...
24
+ def validate_credentials(self) -> None:
25
+ """
26
+ Validates the provided credentials by creating a session and decoding the public key.
27
+
28
+ Raises:
29
+ AmsdalAuthenticationError: If the credentials are invalid.
30
+ """
@@ -0,0 +1,26 @@
1
+ from amsdal.cloud.enums import AuthType as AuthType
2
+ from amsdal.cloud.services.auth.base import AuthHandlerBase as AuthHandlerBase
3
+ from amsdal.cloud.services.auth.credentials import CredentialsAuthHandler as CredentialsAuthHandler
4
+ from amsdal.cloud.services.auth.token import TokenAuthHandler as TokenAuthHandler
5
+ from amsdal.configs.main import settings as settings
6
+ from amsdal.errors import AmsdalAuthenticationError as AmsdalAuthenticationError, AmsdalMissingCredentialsError as AmsdalMissingCredentialsError
7
+ from amsdal_utils.utils.singleton import Singleton
8
+
9
+ class AuthManager(metaclass=Singleton):
10
+ """
11
+ Manages authentication for the application.
12
+
13
+ This class handles the initialization and validation of authentication credentials based on
14
+ the provided authentication type.
15
+ """
16
+ _auth_handler: AuthHandlerBase
17
+ def __init__(self, auth_type: AuthType | None = None) -> None: ...
18
+ def authenticate(self) -> None:
19
+ """
20
+ Authenticates the user by validating the provided credentials.
21
+
22
+ This method uses the authentication handler to validate the credentials based on the authentication type.
23
+
24
+ Raises:
25
+ AmsdalAuthenticationError: If the authentication fails.
26
+ """