qwak-sdk 0.1.0__tar.gz → 0.2.20rc0__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.

Potentially problematic release.


This version of qwak-sdk might be problematic. Click here for more details.

Files changed (310) hide show
  1. qwak_sdk-0.2.20rc0/PKG-INFO +42 -0
  2. qwak_sdk-0.2.20rc0/README.md +3 -0
  3. qwak_sdk-0.2.20rc0/pyproject.toml +94 -0
  4. qwak_sdk-0.2.20rc0/qwak_sdk/__init__.py +9 -0
  5. qwak_sdk-0.2.20rc0/qwak_sdk/cli.py +51 -0
  6. qwak_sdk-0.2.20rc0/qwak_sdk/commands/admin/__init__.py +0 -0
  7. qwak_sdk-0.2.20rc0/qwak_sdk/commands/admin/admin_commands_group.py +17 -0
  8. qwak_sdk-0.2.20rc0/qwak_sdk/commands/admin/apikeys/__init__.py +0 -0
  9. qwak_sdk-0.2.20rc0/qwak_sdk/commands/admin/apikeys/api_keys_commands_group.py +17 -0
  10. qwak_sdk-0.2.20rc0/qwak_sdk/commands/admin/apikeys/generate/__init__.py +0 -0
  11. qwak_sdk-0.2.20rc0/qwak_sdk/commands/admin/apikeys/generate/_logic.py +21 -0
  12. qwak_sdk-0.2.20rc0/qwak_sdk/commands/admin/apikeys/generate/ui.py +45 -0
  13. qwak_sdk-0.2.20rc0/qwak_sdk/commands/admin/apikeys/revoke/__init__.py +0 -0
  14. qwak_sdk-0.2.20rc0/qwak_sdk/commands/admin/apikeys/revoke/_logic.py +22 -0
  15. qwak_sdk-0.2.20rc0/qwak_sdk/commands/admin/apikeys/revoke/ui.py +31 -0
  16. qwak_sdk-0.2.20rc0/qwak_sdk/commands/audience/__init__.py +0 -0
  17. qwak_sdk-0.2.20rc0/qwak_sdk/commands/audience/_logic/__init__.py +0 -0
  18. qwak_sdk-0.2.20rc0/qwak_sdk/commands/audience/_logic/config/__init__.py +0 -0
  19. qwak_sdk-0.2.20rc0/qwak_sdk/commands/audience/_logic/config/config_base.py +16 -0
  20. qwak_sdk-0.2.20rc0/qwak_sdk/commands/audience/_logic/config/parser.py +28 -0
  21. qwak_sdk-0.2.20rc0/qwak_sdk/commands/audience/_logic/config/v1/__init__.py +0 -0
  22. qwak_sdk-0.2.20rc0/qwak_sdk/commands/audience/_logic/config/v1/audience_config.py +26 -0
  23. qwak_sdk-0.2.20rc0/qwak_sdk/commands/audience/_logic/config/v1/conditions_config.py +60 -0
  24. qwak_sdk-0.2.20rc0/qwak_sdk/commands/audience/_logic/config/v1/config_v1.py +24 -0
  25. qwak_sdk-0.2.20rc0/qwak_sdk/commands/audience/_logic/config/v1/route_config.py +14 -0
  26. qwak_sdk-0.2.20rc0/qwak_sdk/commands/audience/_logic/config/v1/spec.py +11 -0
  27. qwak_sdk-0.2.20rc0/qwak_sdk/commands/auto_scalling/__init__.py +0 -0
  28. qwak_sdk-0.2.20rc0/qwak_sdk/commands/auto_scalling/_logic/__init__.py +0 -0
  29. qwak_sdk-0.2.20rc0/qwak_sdk/commands/auto_scalling/_logic/config/__init__.py +3 -0
  30. qwak_sdk-0.2.20rc0/qwak_sdk/commands/auto_scalling/_logic/config/config.py +100 -0
  31. qwak_sdk-0.2.20rc0/qwak_sdk/commands/auto_scalling/_logic/config/parser.py +21 -0
  32. qwak_sdk-0.2.20rc0/qwak_sdk/commands/auto_scalling/attach/__init__.py +0 -0
  33. qwak_sdk-0.2.20rc0/qwak_sdk/commands/auto_scalling/attach/_logic.py +43 -0
  34. qwak_sdk-0.2.20rc0/qwak_sdk/commands/auto_scalling/attach/ui.py +21 -0
  35. qwak_sdk-0.2.20rc0/qwak_sdk/commands/auto_scalling/autoscaling_commands_group.py +15 -0
  36. qwak_sdk-0.2.20rc0/qwak_sdk/commands/automations/__init__.py +0 -0
  37. qwak_sdk-0.2.20rc0/qwak_sdk/commands/automations/automations_commands_group.py +30 -0
  38. qwak_sdk-0.2.20rc0/qwak_sdk/commands/automations/delete/__init__.py +0 -0
  39. qwak_sdk-0.2.20rc0/qwak_sdk/commands/automations/delete/_logic.py +6 -0
  40. qwak_sdk-0.2.20rc0/qwak_sdk/commands/automations/delete/ui.py +23 -0
  41. qwak_sdk-0.2.20rc0/qwak_sdk/commands/automations/executions/__init__.py +0 -0
  42. qwak_sdk-0.2.20rc0/qwak_sdk/commands/automations/executions/executions_commands_group.py +14 -0
  43. qwak_sdk-0.2.20rc0/qwak_sdk/commands/automations/executions/list/__init__.py +0 -0
  44. qwak_sdk-0.2.20rc0/qwak_sdk/commands/automations/executions/list/_logic.py +8 -0
  45. qwak_sdk-0.2.20rc0/qwak_sdk/commands/automations/executions/list/ui.py +25 -0
  46. qwak_sdk-0.2.20rc0/qwak_sdk/commands/automations/list/__init__.py +0 -0
  47. qwak_sdk-0.2.20rc0/qwak_sdk/commands/automations/list/_logic.py +8 -0
  48. qwak_sdk-0.2.20rc0/qwak_sdk/commands/automations/list/ui.py +21 -0
  49. qwak_sdk-0.2.20rc0/qwak_sdk/commands/automations/register/__init__.py +0 -0
  50. qwak_sdk-0.2.20rc0/qwak_sdk/commands/automations/register/_logic.py +43 -0
  51. qwak_sdk-0.2.20rc0/qwak_sdk/commands/automations/register/ui.py +44 -0
  52. qwak_sdk-0.2.20rc0/qwak_sdk/commands/feature_store/__init__.py +0 -0
  53. qwak_sdk-0.2.20rc0/qwak_sdk/commands/feature_store/delete/__init__.py +0 -0
  54. qwak_sdk-0.2.20rc0/qwak_sdk/commands/feature_store/delete/_logic.py +52 -0
  55. qwak_sdk-0.2.20rc0/qwak_sdk/commands/feature_store/delete/ui.py +40 -0
  56. qwak_sdk-0.2.20rc0/qwak_sdk/commands/feature_store/feature_store_command_group.py +25 -0
  57. qwak_sdk-0.2.20rc0/qwak_sdk/commands/feature_store/list/__init__.py +0 -0
  58. qwak_sdk-0.2.20rc0/qwak_sdk/commands/feature_store/list/ui.py +140 -0
  59. qwak_sdk-0.2.20rc0/qwak_sdk/commands/feature_store/pause/__init__.py +0 -0
  60. qwak_sdk-0.2.20rc0/qwak_sdk/commands/feature_store/pause/ui.py +18 -0
  61. qwak_sdk-0.2.20rc0/qwak_sdk/commands/feature_store/register/__init__.py +0 -0
  62. qwak_sdk-0.2.20rc0/qwak_sdk/commands/feature_store/register/_logic.py +289 -0
  63. qwak_sdk-0.2.20rc0/qwak_sdk/commands/feature_store/register/ui.py +105 -0
  64. qwak_sdk-0.2.20rc0/qwak_sdk/commands/feature_store/resume/__init__.py +0 -0
  65. qwak_sdk-0.2.20rc0/qwak_sdk/commands/feature_store/resume/ui.py +18 -0
  66. qwak_sdk-0.2.20rc0/qwak_sdk/commands/feature_store/trigger/__init__.py +0 -0
  67. qwak_sdk-0.2.20rc0/qwak_sdk/commands/feature_store/trigger/ui.py +32 -0
  68. qwak_sdk-0.2.20rc0/qwak_sdk/commands/models/__init__.py +0 -0
  69. qwak_sdk-0.2.20rc0/qwak_sdk/commands/models/_logic/__init__.py +0 -0
  70. qwak_sdk-0.2.20rc0/qwak_sdk/commands/models/_logic/variations.py +55 -0
  71. qwak_sdk-0.2.20rc0/qwak_sdk/commands/models/build/__init__.py +0 -0
  72. qwak_sdk-0.2.20rc0/qwak_sdk/commands/models/build/_logic/__init__.py +0 -0
  73. qwak_sdk-0.2.20rc0/qwak_sdk/commands/models/build/_logic/build_steps.py +68 -0
  74. qwak_sdk-0.2.20rc0/qwak_sdk/commands/models/build/_logic/client_logs/__init__.py +0 -0
  75. qwak_sdk-0.2.20rc0/qwak_sdk/commands/models/build/_logic/client_logs/build_run_handlers.py +189 -0
  76. qwak_sdk-0.2.20rc0/qwak_sdk/commands/models/build/_logic/client_logs/cli_ui.py +125 -0
  77. qwak_sdk-0.2.20rc0/qwak_sdk/commands/models/build/_logic/client_logs/logger.py +88 -0
  78. qwak_sdk-0.2.20rc0/qwak_sdk/commands/models/build/_logic/client_logs/messages.py +40 -0
  79. qwak_sdk-0.2.20rc0/qwak_sdk/commands/models/build/_logic/client_logs/notifier_impl.py +49 -0
  80. qwak_sdk-0.2.20rc0/qwak_sdk/commands/models/build/_logic/client_logs/spinner.py +14 -0
  81. qwak_sdk-0.2.20rc0/qwak_sdk/commands/models/build/_logic/client_logs/time_source.py +37 -0
  82. qwak_sdk-0.2.20rc0/qwak_sdk/commands/models/build/_logic/client_logs/utils.py +12 -0
  83. qwak_sdk-0.2.20rc0/qwak_sdk/commands/models/build/_logic/config/config_v1.py +253 -0
  84. qwak_sdk-0.2.20rc0/qwak_sdk/commands/models/build/_logic/constant/host_resource.py +4 -0
  85. qwak_sdk-0.2.20rc0/qwak_sdk/commands/models/build/_logic/constant/step_description.py +29 -0
  86. qwak_sdk-0.2.20rc0/qwak_sdk/commands/models/build/_logic/constant/temp_dir.py +2 -0
  87. qwak_sdk-0.2.20rc0/qwak_sdk/commands/models/build/_logic/constant/upload_tag.py +5 -0
  88. qwak_sdk-0.2.20rc0/qwak_sdk/commands/models/build/_logic/context.py +62 -0
  89. qwak_sdk-0.2.20rc0/qwak_sdk/commands/models/build/_logic/interface/__init__.py +0 -0
  90. qwak_sdk-0.2.20rc0/qwak_sdk/commands/models/build/_logic/interface/notifier_interface.py +29 -0
  91. qwak_sdk-0.2.20rc0/qwak_sdk/commands/models/build/_logic/interface/step_inteface.py +29 -0
  92. qwak_sdk-0.2.20rc0/qwak_sdk/commands/models/build/_logic/phase/__init__.py +0 -0
  93. qwak_sdk-0.2.20rc0/qwak_sdk/commands/models/build/_logic/phase/a_fetch_model_code/__init__.py +14 -0
  94. qwak_sdk-0.2.20rc0/qwak_sdk/commands/models/build/_logic/phase/a_fetch_model_code/fetch_model_step/__init__.py +0 -0
  95. qwak_sdk-0.2.20rc0/qwak_sdk/commands/models/build/_logic/phase/a_fetch_model_code/fetch_model_step/fetch_model_step.py +42 -0
  96. qwak_sdk-0.2.20rc0/qwak_sdk/commands/models/build/_logic/phase/a_fetch_model_code/fetch_model_step/fetch_strategy_manager/__init__.py +0 -0
  97. qwak_sdk-0.2.20rc0/qwak_sdk/commands/models/build/_logic/phase/a_fetch_model_code/fetch_model_step/fetch_strategy_manager/common.py +33 -0
  98. qwak_sdk-0.2.20rc0/qwak_sdk/commands/models/build/_logic/phase/a_fetch_model_code/fetch_model_step/fetch_strategy_manager/fetch_strategy_manager.py +60 -0
  99. qwak_sdk-0.2.20rc0/qwak_sdk/commands/models/build/_logic/phase/a_fetch_model_code/fetch_model_step/fetch_strategy_manager/strategy/__init__.py +0 -0
  100. qwak_sdk-0.2.20rc0/qwak_sdk/commands/models/build/_logic/phase/a_fetch_model_code/fetch_model_step/fetch_strategy_manager/strategy/folder/__init__.py +0 -0
  101. qwak_sdk-0.2.20rc0/qwak_sdk/commands/models/build/_logic/phase/a_fetch_model_code/fetch_model_step/fetch_strategy_manager/strategy/folder/folder_strategy.py +73 -0
  102. qwak_sdk-0.2.20rc0/qwak_sdk/commands/models/build/_logic/phase/a_fetch_model_code/fetch_model_step/fetch_strategy_manager/strategy/git/__init__.py +0 -0
  103. qwak_sdk-0.2.20rc0/qwak_sdk/commands/models/build/_logic/phase/a_fetch_model_code/fetch_model_step/fetch_strategy_manager/strategy/git/git_strategy.py +149 -0
  104. qwak_sdk-0.2.20rc0/qwak_sdk/commands/models/build/_logic/phase/a_fetch_model_code/fetch_model_step/fetch_strategy_manager/strategy/strategy.py +69 -0
  105. qwak_sdk-0.2.20rc0/qwak_sdk/commands/models/build/_logic/phase/a_fetch_model_code/fetch_model_step/fetch_strategy_manager/strategy/zip/__init__.py +0 -0
  106. qwak_sdk-0.2.20rc0/qwak_sdk/commands/models/build/_logic/phase/a_fetch_model_code/fetch_model_step/fetch_strategy_manager/strategy/zip/zip_strategy.py +64 -0
  107. qwak_sdk-0.2.20rc0/qwak_sdk/commands/models/build/_logic/phase/a_fetch_model_code/post_fetch_validation_step.py +117 -0
  108. qwak_sdk-0.2.20rc0/qwak_sdk/commands/models/build/_logic/phase/a_fetch_model_code/pre_fetch_validation_step.py +135 -0
  109. qwak_sdk-0.2.20rc0/qwak_sdk/commands/models/build/_logic/phase/b_remote_register_qwak_build/__init__.py +11 -0
  110. qwak_sdk-0.2.20rc0/qwak_sdk/commands/models/build/_logic/phase/b_remote_register_qwak_build/cleanup_step.py +20 -0
  111. qwak_sdk-0.2.20rc0/qwak_sdk/commands/models/build/_logic/phase/b_remote_register_qwak_build/start_remote_build_step.py +42 -0
  112. qwak_sdk-0.2.20rc0/qwak_sdk/commands/models/build/_logic/phase/b_remote_register_qwak_build/upload_step.py +349 -0
  113. qwak_sdk-0.2.20rc0/qwak_sdk/commands/models/build/_logic/phase/c_deploy/__init__.py +6 -0
  114. qwak_sdk-0.2.20rc0/qwak_sdk/commands/models/build/_logic/phase/c_deploy/build_polling_status.py +54 -0
  115. qwak_sdk-0.2.20rc0/qwak_sdk/commands/models/build/_logic/phase/c_deploy/deploy_build.py +44 -0
  116. qwak_sdk-0.2.20rc0/qwak_sdk/commands/models/build/_logic/util/__init__.py +0 -0
  117. qwak_sdk-0.2.20rc0/qwak_sdk/commands/models/build/_logic/util/protobuf_factory.py +45 -0
  118. qwak_sdk-0.2.20rc0/qwak_sdk/commands/models/build/_logic/util/step_decorator.py +37 -0
  119. qwak_sdk-0.2.20rc0/qwak_sdk/commands/models/build/_logic/util/text.py +9 -0
  120. qwak_sdk-0.2.20rc0/qwak_sdk/commands/models/build/ui.py +241 -0
  121. qwak_sdk-0.2.20rc0/qwak_sdk/commands/models/builds/__init__.py +0 -0
  122. qwak_sdk-0.2.20rc0/qwak_sdk/commands/models/builds/builds_commands_group.py +16 -0
  123. qwak_sdk-0.2.20rc0/qwak_sdk/commands/models/builds/cancel/__init__.py +0 -0
  124. qwak_sdk-0.2.20rc0/qwak_sdk/commands/models/builds/cancel/_logic.py +5 -0
  125. qwak_sdk-0.2.20rc0/qwak_sdk/commands/models/builds/cancel/ui.py +15 -0
  126. qwak_sdk-0.2.20rc0/qwak_sdk/commands/models/builds/logs/__init__.py +0 -0
  127. qwak_sdk-0.2.20rc0/qwak_sdk/commands/models/builds/logs/ui.py +35 -0
  128. qwak_sdk-0.2.20rc0/qwak_sdk/commands/models/builds/status/__init__.py +0 -0
  129. qwak_sdk-0.2.20rc0/qwak_sdk/commands/models/builds/status/_logic.py +6 -0
  130. qwak_sdk-0.2.20rc0/qwak_sdk/commands/models/builds/status/ui.py +30 -0
  131. qwak_sdk-0.2.20rc0/qwak_sdk/commands/models/create/__init__.py +0 -0
  132. qwak_sdk-0.2.20rc0/qwak_sdk/commands/models/create/_logic.py +35 -0
  133. qwak_sdk-0.2.20rc0/qwak_sdk/commands/models/create/ui.py +27 -0
  134. qwak_sdk-0.2.20rc0/qwak_sdk/commands/models/delete/__init__.py +0 -0
  135. qwak_sdk-0.2.20rc0/qwak_sdk/commands/models/delete/_logic.py +5 -0
  136. qwak_sdk-0.2.20rc0/qwak_sdk/commands/models/delete/ui.py +16 -0
  137. qwak_sdk-0.2.20rc0/qwak_sdk/commands/models/deployments/__init__.py +0 -0
  138. qwak_sdk-0.2.20rc0/qwak_sdk/commands/models/deployments/deploy/__init__.py +0 -0
  139. qwak_sdk-0.2.20rc0/qwak_sdk/commands/models/deployments/deploy/_logic/__init__.py +0 -0
  140. qwak_sdk-0.2.20rc0/qwak_sdk/commands/models/deployments/deploy/_logic/advance_deployment_options_handler.py +31 -0
  141. qwak_sdk-0.2.20rc0/qwak_sdk/commands/models/deployments/deploy/_logic/base_deploy_executor.py +64 -0
  142. qwak_sdk-0.2.20rc0/qwak_sdk/commands/models/deployments/deploy/_logic/deploy_config.py +241 -0
  143. qwak_sdk-0.2.20rc0/qwak_sdk/commands/models/deployments/deploy/_logic/deployment.py +405 -0
  144. qwak_sdk-0.2.20rc0/qwak_sdk/commands/models/deployments/deploy/_logic/deployment_message_helpers.py +98 -0
  145. qwak_sdk-0.2.20rc0/qwak_sdk/commands/models/deployments/deploy/_logic/deployment_response_handler.py +154 -0
  146. qwak_sdk-0.2.20rc0/qwak_sdk/commands/models/deployments/deploy/_logic/deployment_size_mapper.py +21 -0
  147. qwak_sdk-0.2.20rc0/qwak_sdk/commands/models/deployments/deploy/_logic/get_latest_successful_build.py +31 -0
  148. qwak_sdk-0.2.20rc0/qwak_sdk/commands/models/deployments/deploy/_logic/variations.py +79 -0
  149. qwak_sdk-0.2.20rc0/qwak_sdk/commands/models/deployments/deploy/batch/__init__.py +0 -0
  150. qwak_sdk-0.2.20rc0/qwak_sdk/commands/models/deployments/deploy/batch/_logic/__init__.py +0 -0
  151. qwak_sdk-0.2.20rc0/qwak_sdk/commands/models/deployments/deploy/batch/_logic/advanced_deployment_mapper.py +14 -0
  152. qwak_sdk-0.2.20rc0/qwak_sdk/commands/models/deployments/deploy/batch/_logic/deploy_executor.py +24 -0
  153. qwak_sdk-0.2.20rc0/qwak_sdk/commands/models/deployments/deploy/batch/ui.py +104 -0
  154. qwak_sdk-0.2.20rc0/qwak_sdk/commands/models/deployments/deploy/deploy_commands_group.py +19 -0
  155. qwak_sdk-0.2.20rc0/qwak_sdk/commands/models/deployments/deploy/realtime/__init__.py +0 -0
  156. qwak_sdk-0.2.20rc0/qwak_sdk/commands/models/deployments/deploy/realtime/_logic/__init__.py +0 -0
  157. qwak_sdk-0.2.20rc0/qwak_sdk/commands/models/deployments/deploy/realtime/_logic/advanced_deployment_mapper.py +20 -0
  158. qwak_sdk-0.2.20rc0/qwak_sdk/commands/models/deployments/deploy/realtime/_logic/deploy_executor.py +24 -0
  159. qwak_sdk-0.2.20rc0/qwak_sdk/commands/models/deployments/deploy/realtime/_logic/serving_strategy_mapper.py +105 -0
  160. qwak_sdk-0.2.20rc0/qwak_sdk/commands/models/deployments/deploy/realtime/ui.py +179 -0
  161. qwak_sdk-0.2.20rc0/qwak_sdk/commands/models/deployments/deploy/streaming/__init__.py +0 -0
  162. qwak_sdk-0.2.20rc0/qwak_sdk/commands/models/deployments/deploy/streaming/_logic/__init__.py +0 -0
  163. qwak_sdk-0.2.20rc0/qwak_sdk/commands/models/deployments/deploy/streaming/_logic/deploy_executor.py +24 -0
  164. qwak_sdk-0.2.20rc0/qwak_sdk/commands/models/deployments/deploy/streaming/_logic/serving_strategy_mapper.py +38 -0
  165. qwak_sdk-0.2.20rc0/qwak_sdk/commands/models/deployments/deploy/streaming/ui.py +196 -0
  166. qwak_sdk-0.2.20rc0/qwak_sdk/commands/models/deployments/undeploy/__init__.py +0 -0
  167. qwak_sdk-0.2.20rc0/qwak_sdk/commands/models/deployments/undeploy/_logic/__init__.py +0 -0
  168. qwak_sdk-0.2.20rc0/qwak_sdk/commands/models/deployments/undeploy/_logic/request_undeploy.py +176 -0
  169. qwak_sdk-0.2.20rc0/qwak_sdk/commands/models/deployments/undeploy/_logic/variations.py +74 -0
  170. qwak_sdk-0.2.20rc0/qwak_sdk/commands/models/deployments/undeploy/ui.py +78 -0
  171. qwak_sdk-0.2.20rc0/qwak_sdk/commands/models/executions/__init__.py +0 -0
  172. qwak_sdk-0.2.20rc0/qwak_sdk/commands/models/executions/cancel/__init__.py +0 -0
  173. qwak_sdk-0.2.20rc0/qwak_sdk/commands/models/executions/cancel/_logic.py +9 -0
  174. qwak_sdk-0.2.20rc0/qwak_sdk/commands/models/executions/cancel/ui.py +27 -0
  175. qwak_sdk-0.2.20rc0/qwak_sdk/commands/models/executions/execution_commands_group.py +24 -0
  176. qwak_sdk-0.2.20rc0/qwak_sdk/commands/models/executions/report/__init__.py +0 -0
  177. qwak_sdk-0.2.20rc0/qwak_sdk/commands/models/executions/report/_logic.py +14 -0
  178. qwak_sdk-0.2.20rc0/qwak_sdk/commands/models/executions/report/ui.py +43 -0
  179. qwak_sdk-0.2.20rc0/qwak_sdk/commands/models/executions/start/__init__.py +0 -0
  180. qwak_sdk-0.2.20rc0/qwak_sdk/commands/models/executions/start/_logic.py +16 -0
  181. qwak_sdk-0.2.20rc0/qwak_sdk/commands/models/executions/start/ui.py +176 -0
  182. qwak_sdk-0.2.20rc0/qwak_sdk/commands/models/executions/status/__init__.py +0 -0
  183. qwak_sdk-0.2.20rc0/qwak_sdk/commands/models/executions/status/_logic.py +13 -0
  184. qwak_sdk-0.2.20rc0/qwak_sdk/commands/models/executions/status/ui.py +27 -0
  185. qwak_sdk-0.2.20rc0/qwak_sdk/commands/models/init/__init__.py +0 -0
  186. qwak_sdk-0.2.20rc0/qwak_sdk/commands/models/init/_logic/__init__.py +0 -0
  187. qwak_sdk-0.2.20rc0/qwak_sdk/commands/models/init/_logic/initialize_model_structure.py +40 -0
  188. qwak_sdk-0.2.20rc0/qwak_sdk/commands/models/init/_logic/template/__init__.py +0 -0
  189. qwak_sdk-0.2.20rc0/qwak_sdk/commands/models/init/_logic/template/churn/__init__.py +0 -0
  190. qwak_sdk-0.2.20rc0/qwak_sdk/commands/models/init/_logic/template/churn/cookiecutter.json +3 -0
  191. qwak_sdk-0.2.20rc0/qwak_sdk/commands/models/init/_logic/template/churn/{{cookiecutter.model_directory}}/__init__.py +0 -0
  192. qwak_sdk-0.2.20rc0/qwak_sdk/commands/models/init/_logic/template/churn/{{cookiecutter.model_directory}}/main/__init__.py +5 -0
  193. qwak_sdk-0.2.20rc0/qwak_sdk/commands/models/init/_logic/template/churn/{{cookiecutter.model_directory}}/main/conda.yml +10 -0
  194. qwak_sdk-0.2.20rc0/qwak_sdk/commands/models/init/_logic/template/churn/{{cookiecutter.model_directory}}/main/data.csv +1001 -0
  195. qwak_sdk-0.2.20rc0/qwak_sdk/commands/models/init/_logic/template/churn/{{cookiecutter.model_directory}}/main/model.py +95 -0
  196. qwak_sdk-0.2.20rc0/qwak_sdk/commands/models/init/_logic/template/churn/{{cookiecutter.model_directory}}/tests/__init__.py +0 -0
  197. qwak_sdk-0.2.20rc0/qwak_sdk/commands/models/init/_logic/template/churn/{{cookiecutter.model_directory}}/tests/it/__init__.py +0 -0
  198. qwak_sdk-0.2.20rc0/qwak_sdk/commands/models/init/_logic/template/churn/{{cookiecutter.model_directory}}/tests/it/test_churn.py +32 -0
  199. qwak_sdk-0.2.20rc0/qwak_sdk/commands/models/init/_logic/template/credit_risk/__init__.py +0 -0
  200. qwak_sdk-0.2.20rc0/qwak_sdk/commands/models/init/_logic/template/credit_risk/cookiecutter.json +3 -0
  201. qwak_sdk-0.2.20rc0/qwak_sdk/commands/models/init/_logic/template/credit_risk/{{cookiecutter.model_directory}}/__init__.py +0 -0
  202. qwak_sdk-0.2.20rc0/qwak_sdk/commands/models/init/_logic/template/credit_risk/{{cookiecutter.model_directory}}/main/__init__.py +5 -0
  203. qwak_sdk-0.2.20rc0/qwak_sdk/commands/models/init/_logic/template/credit_risk/{{cookiecutter.model_directory}}/main/conda.yml +10 -0
  204. qwak_sdk-0.2.20rc0/qwak_sdk/commands/models/init/_logic/template/credit_risk/{{cookiecutter.model_directory}}/main/data.csv +1001 -0
  205. qwak_sdk-0.2.20rc0/qwak_sdk/commands/models/init/_logic/template/credit_risk/{{cookiecutter.model_directory}}/main/model.py +108 -0
  206. qwak_sdk-0.2.20rc0/qwak_sdk/commands/models/init/_logic/template/general/__init__.py +0 -0
  207. qwak_sdk-0.2.20rc0/qwak_sdk/commands/models/init/_logic/template/general/cookiecutter.json +6 -0
  208. qwak_sdk-0.2.20rc0/qwak_sdk/commands/models/init/_logic/template/general/{{cookiecutter.model_directory}}/__init__.py +0 -0
  209. qwak_sdk-0.2.20rc0/qwak_sdk/commands/models/init/_logic/template/general/{{cookiecutter.model_directory}}/{{cookiecutter.main_directory}}/__init__.py +5 -0
  210. qwak_sdk-0.2.20rc0/qwak_sdk/commands/models/init/_logic/template/general/{{cookiecutter.model_directory}}/{{cookiecutter.main_directory}}/conda.yml +8 -0
  211. qwak_sdk-0.2.20rc0/qwak_sdk/commands/models/init/_logic/template/general/{{cookiecutter.model_directory}}/{{cookiecutter.main_directory}}/model.py +66 -0
  212. qwak_sdk-0.2.20rc0/qwak_sdk/commands/models/init/_logic/template/general/{{cookiecutter.model_directory}}/{{cookiecutter.test_directory}}/__init__.py +0 -0
  213. qwak_sdk-0.2.20rc0/qwak_sdk/commands/models/init/_logic/template/general/{{cookiecutter.model_directory}}/{{cookiecutter.test_directory}}/test_qwak_model.py +5 -0
  214. qwak_sdk-0.2.20rc0/qwak_sdk/commands/models/init/_logic/template/titanic/__init__.py +0 -0
  215. qwak_sdk-0.2.20rc0/qwak_sdk/commands/models/init/_logic/template/titanic/cookiecutter.json +3 -0
  216. qwak_sdk-0.2.20rc0/qwak_sdk/commands/models/init/_logic/template/titanic/{{cookiecutter.model_directory}}/__init__.py +0 -0
  217. qwak_sdk-0.2.20rc0/qwak_sdk/commands/models/init/_logic/template/titanic/{{cookiecutter.model_directory}}/main/__init__.py +5 -0
  218. qwak_sdk-0.2.20rc0/qwak_sdk/commands/models/init/_logic/template/titanic/{{cookiecutter.model_directory}}/main/conda.yml +10 -0
  219. qwak_sdk-0.2.20rc0/qwak_sdk/commands/models/init/_logic/template/titanic/{{cookiecutter.model_directory}}/main/model.py +98 -0
  220. qwak_sdk-0.2.20rc0/qwak_sdk/commands/models/init/_logic/template/titanic/{{cookiecutter.model_directory}}/tests/__init__.py +0 -0
  221. qwak_sdk-0.2.20rc0/qwak_sdk/commands/models/init/_logic/template/titanic/{{cookiecutter.model_directory}}/tests/it/__init__.py +0 -0
  222. qwak_sdk-0.2.20rc0/qwak_sdk/commands/models/init/_logic/template/titanic/{{cookiecutter.model_directory}}/tests/it/test_titanic.py +24 -0
  223. qwak_sdk-0.2.20rc0/qwak_sdk/commands/models/init/_logic/template/titanic_poetry/__init__.py +0 -0
  224. qwak_sdk-0.2.20rc0/qwak_sdk/commands/models/init/_logic/template/titanic_poetry/cookiecutter.json +3 -0
  225. qwak_sdk-0.2.20rc0/qwak_sdk/commands/models/init/_logic/template/titanic_poetry/{{cookiecutter.model_directory}}/__init__.py +0 -0
  226. qwak_sdk-0.2.20rc0/qwak_sdk/commands/models/init/_logic/template/titanic_poetry/{{cookiecutter.model_directory}}/main/__init__.py +5 -0
  227. qwak_sdk-0.2.20rc0/qwak_sdk/commands/models/init/_logic/template/titanic_poetry/{{cookiecutter.model_directory}}/main/model.py +98 -0
  228. qwak_sdk-0.2.20rc0/qwak_sdk/commands/models/init/_logic/template/titanic_poetry/{{cookiecutter.model_directory}}/main/pyproject.toml +18 -0
  229. qwak_sdk-0.2.20rc0/qwak_sdk/commands/models/init/_logic/template/titanic_poetry/{{cookiecutter.model_directory}}/tests/__init__.py +0 -0
  230. qwak_sdk-0.2.20rc0/qwak_sdk/commands/models/init/_logic/template/titanic_poetry/{{cookiecutter.model_directory}}/tests/it/__init__.py +0 -0
  231. qwak_sdk-0.2.20rc0/qwak_sdk/commands/models/init/_logic/template/titanic_poetry/{{cookiecutter.model_directory}}/tests/it/test_titanic.py +25 -0
  232. qwak_sdk-0.2.20rc0/qwak_sdk/commands/models/init/ui.py +61 -0
  233. qwak_sdk-0.2.20rc0/qwak_sdk/commands/models/list/__init__.py +0 -0
  234. qwak_sdk-0.2.20rc0/qwak_sdk/commands/models/list/_logic.py +5 -0
  235. qwak_sdk-0.2.20rc0/qwak_sdk/commands/models/list/ui.py +31 -0
  236. qwak_sdk-0.2.20rc0/qwak_sdk/commands/models/models_command_group.py +36 -0
  237. qwak_sdk-0.2.20rc0/qwak_sdk/commands/models/runtime/__init__.py +0 -0
  238. qwak_sdk-0.2.20rc0/qwak_sdk/commands/models/runtime/feedback/__init__.py +0 -0
  239. qwak_sdk-0.2.20rc0/qwak_sdk/commands/models/runtime/feedback/_logic.py +81 -0
  240. qwak_sdk-0.2.20rc0/qwak_sdk/commands/models/runtime/feedback/ui.py +45 -0
  241. qwak_sdk-0.2.20rc0/qwak_sdk/commands/models/runtime/logs/__init__.py +0 -0
  242. qwak_sdk-0.2.20rc0/qwak_sdk/commands/models/runtime/logs/ui.py +63 -0
  243. qwak_sdk-0.2.20rc0/qwak_sdk/commands/models/runtime/runtime_commands_group.py +21 -0
  244. qwak_sdk-0.2.20rc0/qwak_sdk/commands/models/runtime/traffic_update/__init__.py +0 -0
  245. qwak_sdk-0.2.20rc0/qwak_sdk/commands/models/runtime/traffic_update/_logic/__init__.py +0 -0
  246. qwak_sdk-0.2.20rc0/qwak_sdk/commands/models/runtime/traffic_update/_logic/execute_runtime_update_traffic.py +54 -0
  247. qwak_sdk-0.2.20rc0/qwak_sdk/commands/models/runtime/traffic_update/_logic/variations.py +84 -0
  248. qwak_sdk-0.2.20rc0/qwak_sdk/commands/models/runtime/traffic_update/ui.py +37 -0
  249. qwak_sdk-0.2.20rc0/qwak_sdk/commands/models/runtime/update/__init__.py +0 -0
  250. qwak_sdk-0.2.20rc0/qwak_sdk/commands/models/runtime/update/_logic.py +9 -0
  251. qwak_sdk-0.2.20rc0/qwak_sdk/commands/models/runtime/update/ui.py +15 -0
  252. qwak_sdk-0.2.20rc0/qwak_sdk/commands/projects/__init__.py +0 -0
  253. qwak_sdk-0.2.20rc0/qwak_sdk/commands/projects/create/__init__.py +0 -0
  254. qwak_sdk-0.2.20rc0/qwak_sdk/commands/projects/create/_logic.py +6 -0
  255. qwak_sdk-0.2.20rc0/qwak_sdk/commands/projects/create/ui.py +21 -0
  256. qwak_sdk-0.2.20rc0/qwak_sdk/commands/projects/delete/__init__.py +0 -0
  257. qwak_sdk-0.2.20rc0/qwak_sdk/commands/projects/delete/_logic.py +6 -0
  258. qwak_sdk-0.2.20rc0/qwak_sdk/commands/projects/delete/ui.py +15 -0
  259. qwak_sdk-0.2.20rc0/qwak_sdk/commands/projects/list/__init__.py +0 -0
  260. qwak_sdk-0.2.20rc0/qwak_sdk/commands/projects/list/_logic.py +6 -0
  261. qwak_sdk-0.2.20rc0/qwak_sdk/commands/projects/list/ui.py +36 -0
  262. qwak_sdk-0.2.20rc0/qwak_sdk/commands/projects/projects_command_group.py +19 -0
  263. qwak_sdk-0.2.20rc0/qwak_sdk/commands/secrets/__init__.py +0 -0
  264. qwak_sdk-0.2.20rc0/qwak_sdk/commands/secrets/delete/__init__.py +0 -0
  265. qwak_sdk-0.2.20rc0/qwak_sdk/commands/secrets/delete/_logic.py +5 -0
  266. qwak_sdk-0.2.20rc0/qwak_sdk/commands/secrets/delete/ui.py +21 -0
  267. qwak_sdk-0.2.20rc0/qwak_sdk/commands/secrets/get/__init__.py +0 -0
  268. qwak_sdk-0.2.20rc0/qwak_sdk/commands/secrets/get/_logic.py +5 -0
  269. qwak_sdk-0.2.20rc0/qwak_sdk/commands/secrets/get/ui.py +17 -0
  270. qwak_sdk-0.2.20rc0/qwak_sdk/commands/secrets/secrets_commands_group.py +19 -0
  271. qwak_sdk-0.2.20rc0/qwak_sdk/commands/secrets/set/__init__.py +0 -0
  272. qwak_sdk-0.2.20rc0/qwak_sdk/commands/secrets/set/_logic.py +5 -0
  273. qwak_sdk-0.2.20rc0/qwak_sdk/commands/secrets/set/ui.py +16 -0
  274. qwak_sdk-0.2.20rc0/qwak_sdk/commands/ui_tools.py +18 -0
  275. qwak_sdk-0.2.20rc0/qwak_sdk/common/__init__.py +0 -0
  276. qwak_sdk-0.2.20rc0/qwak_sdk/common/run_config/__init__.py +22 -0
  277. qwak_sdk-0.2.20rc0/qwak_sdk/common/run_config/base.py +101 -0
  278. qwak_sdk-0.2.20rc0/qwak_sdk/common/run_config/utils.py +249 -0
  279. qwak_sdk-0.2.20rc0/qwak_sdk/exceptions/__init__.py +11 -0
  280. qwak_sdk-0.2.20rc0/qwak_sdk/exceptions/qwak_command_exception.py +2 -0
  281. qwak_sdk-0.2.20rc0/qwak_sdk/exceptions/qwak_deploy_new_build_failed.py +5 -0
  282. qwak_sdk-0.2.20rc0/qwak_sdk/exceptions/qwak_general_build_exception.py +13 -0
  283. qwak_sdk-0.2.20rc0/qwak_sdk/exceptions/qwak_remote_build_failed.py +5 -0
  284. qwak_sdk-0.2.20rc0/qwak_sdk/exceptions/qwak_resource_not_found.py +2 -0
  285. qwak_sdk-0.2.20rc0/qwak_sdk/exceptions/qwak_suggestion_exception.py +27 -0
  286. qwak_sdk-0.2.20rc0/qwak_sdk/inner/__init__.py +0 -0
  287. qwak_sdk-0.2.20rc0/qwak_sdk/inner/file_registry.py +97 -0
  288. qwak_sdk-0.2.20rc0/qwak_sdk/inner/tools/__init__.py +0 -0
  289. qwak_sdk-0.2.20rc0/qwak_sdk/inner/tools/cli_tools.py +159 -0
  290. qwak_sdk-0.2.20rc0/qwak_sdk/inner/tools/config_handler.py +18 -0
  291. qwak_sdk-0.2.20rc0/qwak_sdk/inner/tools/logger/__init__.py +3 -0
  292. qwak_sdk-0.2.20rc0/qwak_sdk/inner/tools/logger/logger.py +269 -0
  293. qwak_sdk-0.2.20rc0/qwak_sdk/inner/tools/logger/logging.yml +79 -0
  294. qwak_sdk-0.2.20rc0/qwak_sdk/inner/tools/tracking.py +47 -0
  295. qwak_sdk-0.2.20rc0/qwak_sdk/main.py +9 -0
  296. qwak_sdk-0.2.20rc0/qwak_sdk/tools/__init__.py +0 -0
  297. qwak_sdk-0.2.20rc0/qwak_sdk/tools/colors.py +13 -0
  298. qwak_sdk-0.2.20rc0/qwak_sdk/tools/files.py +9 -0
  299. qwak_sdk-0.2.20rc0/qwak_sdk/tools/log_handling.py +146 -0
  300. qwak_sdk-0.2.20rc0/qwak_sdk/tools/utils.py +46 -0
  301. qwak_sdk-0.2.20rc0/setup.py +171 -0
  302. qwak-sdk-0.1.0/PKG-INFO +0 -16
  303. qwak-sdk-0.1.0/README.md +0 -1
  304. qwak-sdk-0.1.0/qwak_sdk.egg-info/PKG-INFO +0 -16
  305. qwak-sdk-0.1.0/qwak_sdk.egg-info/SOURCES.txt +0 -7
  306. qwak-sdk-0.1.0/qwak_sdk.egg-info/dependency_links.txt +0 -1
  307. qwak-sdk-0.1.0/qwak_sdk.egg-info/top_level.txt +0 -1
  308. qwak-sdk-0.1.0/setup.cfg +0 -4
  309. qwak-sdk-0.1.0/setup.py +0 -26
  310. {qwak-sdk-0.1.0/qwak-sdk → qwak_sdk-0.2.20rc0/qwak_sdk/commands}/__init__.py +0 -0
@@ -0,0 +1,42 @@
1
+ Metadata-Version: 2.1
2
+ Name: qwak-sdk
3
+ Version: 0.2.20rc0
4
+ Summary: Qwak SDK and CLI for qwak models
5
+ License: Apache-2.0
6
+ Keywords: mlops,ml,deployment,serving,model
7
+ Author: Qwak
8
+ Author-email: info@qwak.com
9
+ Requires-Python: >=3.7.1,<3.10
10
+ Classifier: License :: OSI Approved :: Apache Software License
11
+ Classifier: Operating System :: OS Independent
12
+ Classifier: Programming Language :: Python :: 3
13
+ Classifier: Programming Language :: Python :: 3.8
14
+ Classifier: Programming Language :: Python :: 3.9
15
+ Classifier: Programming Language :: Python :: 3.7
16
+ Classifier: Programming Language :: Python :: 3.8
17
+ Classifier: Programming Language :: Python :: 3.9
18
+ Classifier: Programming Language :: Python :: Implementation :: CPython
19
+ Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
20
+ Provides-Extra: batch
21
+ Provides-Extra: feedback
22
+ Requires-Dist: assertpy (>=1.1,<2.0)
23
+ Requires-Dist: boto3 (>=1.24.89,<2.0.0) ; extra == "batch" or extra == "feedback"
24
+ Requires-Dist: cookiecutter
25
+ Requires-Dist: gitpython (>=2.1.0)
26
+ Requires-Dist: joblib (>=1.1.0,<2.0.0) ; extra == "batch" or extra == "feedback"
27
+ Requires-Dist: pandas (<1.4) ; (python_full_version >= "3.7.1" and python_version < "3.8") and (extra == "batch" or extra == "feedback")
28
+ Requires-Dist: pandas (>=1.4.3,<2.0.0) ; (python_version >= "3.8" and python_version < "3.10") and (extra == "batch" or extra == "feedback")
29
+ Requires-Dist: pyarrow (>=6.0.0,<11.0.0) ; extra == "batch"
30
+ Requires-Dist: pydantic
31
+ Requires-Dist: python-json-logger (>=2.0.2)
32
+ Requires-Dist: qwak-core (==0.0.26)
33
+ Requires-Dist: qwak-inference (==0.0.10.rc0)
34
+ Requires-Dist: tabulate (>=0.8.0)
35
+ Requires-Dist: yaspin (>=2.0.0)
36
+ Project-URL: Home page, https://www.qwak.com/
37
+ Description-Content-Type: text/markdown
38
+
39
+ # Qwak SDK
40
+
41
+ Qwak is an end-to-end production ML platform designed to allow data scientists to build, deploy, and monitor their models in production with minimal engineering friction.
42
+
@@ -0,0 +1,3 @@
1
+ # Qwak SDK
2
+
3
+ Qwak is an end-to-end production ML platform designed to allow data scientists to build, deploy, and monitor their models in production with minimal engineering friction.
@@ -0,0 +1,94 @@
1
+ [tool.poetry]
2
+ name = "qwak-sdk"
3
+ version = "0.2.20.rc0"
4
+ description = "Qwak SDK and CLI for qwak models"
5
+ authors = ["Qwak <info@qwak.com>"]
6
+ readme = "README.md"
7
+ keywords = ["mlops", "ml", "deployment", "serving", "model"]
8
+ packages = [
9
+ {include = "qwak_sdk"},
10
+ ]
11
+ include = ["./qwak_sdk/**/*"]
12
+ classifiers = [
13
+ "Operating System :: OS Independent",
14
+ "Programming Language :: Python :: 3.7",
15
+ "Programming Language :: Python :: 3.8",
16
+ "Programming Language :: Python :: 3.9",
17
+ "Programming Language :: Python :: Implementation :: CPython",
18
+ "Topic :: Scientific/Engineering :: Artificial Intelligence",
19
+ ]
20
+ license = "Apache-2.0"
21
+
22
+ [tool.poetry.urls]
23
+ "Home page" = "https://www.qwak.com/"
24
+
25
+ [tool.poetry.scripts]
26
+ qwak = "qwak_sdk.main:qwak_cli"
27
+
28
+ [tool.poetry.dependencies]
29
+ python = ">=3.7.1,<3.10"
30
+ qwak-core = "==0.0.26"
31
+ qwak-inference = "==0.0.10.rc0"
32
+ tabulate = ">=0.8.0"
33
+ python-json-logger = ">=2.0.2"
34
+ pydantic = "*"
35
+ yaspin = ">=2.0.0"
36
+ assertpy = "^1.1"
37
+ cookiecutter = "*"
38
+ gitpython = ">=2.1.0"
39
+ boto3 = { version="^1.24.89", optional=true } # Inference dependencies
40
+ pandas = [ # Inference dependencies
41
+ {version="<1.4", python=">=3.7.1,<3.8", optional=true},
42
+ {version=">=1.4.3,<2.0.0", python=">=3.8,<3.10", optional=true}
43
+ ]
44
+ joblib = { version="^1.1.0", optional=true } # Inference dependencies
45
+ pyarrow = { version=">=6.0.0, <11.0.0", optional=true } # Inference dependencies
46
+
47
+ [tool.poetry.group.dev.dependencies]
48
+ pytest = "7.2.1"
49
+ black = "23.1.0"
50
+ flake8 = "5.0.0"
51
+ bandit = {version = "^1.7.4", extras=["toml"]}
52
+ coverage = "7.2.1"
53
+ typing_extensions ="4.4.0"
54
+ bump2version = "1.0.1"
55
+ typeguard = "^2"
56
+ isort = "^5"
57
+ changelog-cli = "*"
58
+
59
+ [tool.poetry.extras]
60
+ batch = ["boto3", "pandas", "pyarrow", "joblib"]
61
+ feedback = ["boto3", "pandas", "joblib"]
62
+
63
+ [tool.black]
64
+ extend-exclude = '''
65
+ (
66
+ .*_pb2.py
67
+ | .*_pb2_grpc.py
68
+ | .qwak_sdk/commands/models/init/_logic/template/*
69
+ )'''
70
+
71
+ [tool.pytest.ini_options]
72
+ addopts = [
73
+ "--strict-markers"
74
+ ]
75
+ markers = [
76
+ "integration: marks tests as slow (deselect with '-m \"not integration\"')",
77
+ ]
78
+
79
+ [tool.bandit]
80
+ exclude_dirs = ["qwak_sdk/commands/models/init/_logic/template"]
81
+
82
+ [tool.isort]
83
+ profile = "black"
84
+ src_paths = ["qwak_sdk", "tests"]
85
+
86
+ [tool.poe.tasks]
87
+ clean = { cmd="rm -rf dist ./**/__pycache__", help="Clean build artifacts" }
88
+ install = "poetry install"
89
+ validate = { cmd="pre-commit run --all-files", help="Check lint on all files" }
90
+ test = { cmd="pytest --disable-warnings tests", help="Run tests" }
91
+
92
+ [build-system]
93
+ requires = ["poetry-core>=1.0.0"]
94
+ build-backend = "poetry.core.masonry.api"
@@ -0,0 +1,9 @@
1
+ # fmt: off
2
+ __author__ = '''Qwak.ai'''
3
+ __version__ = '0.2.20.rc0'
4
+
5
+ from qwak.inner import wire_dependencies
6
+
7
+ # fmt: on
8
+
9
+ wire_dependencies()
@@ -0,0 +1,51 @@
1
+ import click
2
+ from packaging import version
3
+ from qwak.inner.di_configuration import UserAccountConfiguration
4
+ from qwak.inner.di_configuration.account import UserAccount
5
+
6
+ from qwak_sdk.commands.admin.admin_commands_group import admin_commands_group
7
+ from qwak_sdk.commands.automations.automations_commands_group import (
8
+ automations_commands_group,
9
+ )
10
+ from qwak_sdk.commands.feature_store.feature_store_command_group import (
11
+ feature_store_commands_group,
12
+ )
13
+ from qwak_sdk.commands.models.models_command_group import models_command_group
14
+ from qwak_sdk.commands.projects.projects_command_group import projects_command_group
15
+ from qwak_sdk.commands.secrets.secrets_commands_group import secrets_commands_group
16
+ from qwak_sdk.inner.tools.logger import setup_qwak_logger
17
+
18
+ version_option_kwargs = {}
19
+ if version.parse(click.__version__) >= version.parse("8.0.0"):
20
+ version_option_kwargs["package_name"] = "qwak-sdk"
21
+
22
+
23
+ def create_qwak_cli():
24
+ setup_qwak_logger()
25
+
26
+ @click.group()
27
+ @click.version_option(**version_option_kwargs)
28
+ def qwak_cli():
29
+ # This class is intentionally empty
30
+ pass
31
+
32
+ @qwak_cli.command("configure", short_help="Configure the Qwak environment")
33
+ @click.option(
34
+ "--api-key", metavar="PASSWORD", required=False, help="Qwak assigned API key"
35
+ )
36
+ def set_configuration(api_key, **kwargs):
37
+ if api_key is None:
38
+ api_key = click.prompt("Please enter your API key", type=str)
39
+
40
+ account_config = UserAccountConfiguration()
41
+ account_config.configure_user(UserAccount(api_key=api_key))
42
+
43
+ print("User successfully configured")
44
+
45
+ qwak_cli.add_command(projects_command_group)
46
+ qwak_cli.add_command(models_command_group)
47
+ qwak_cli.add_command(secrets_commands_group)
48
+ qwak_cli.add_command(automations_commands_group)
49
+ qwak_cli.add_command(admin_commands_group)
50
+ qwak_cli.add_command(feature_store_commands_group)
51
+ return qwak_cli
File without changes
@@ -0,0 +1,17 @@
1
+ import click
2
+
3
+ from qwak_sdk.commands.admin.apikeys.api_keys_commands_group import (
4
+ api_keys_commands_group,
5
+ )
6
+
7
+
8
+ @click.group(
9
+ name="admin",
10
+ help="Commands for admin operations",
11
+ )
12
+ def admin_commands_group():
13
+ # Click commands group injection
14
+ pass
15
+
16
+
17
+ admin_commands_group.add_command(api_keys_commands_group)
@@ -0,0 +1,17 @@
1
+ import click
2
+
3
+ from qwak_sdk.commands.admin.apikeys.generate.ui import generate_apikey
4
+ from qwak_sdk.commands.admin.apikeys.revoke.ui import revoke_apikey
5
+ from qwak_sdk.inner.tools.logger.logger import get_qwak_logger
6
+
7
+ logger = get_qwak_logger()
8
+
9
+
10
+ @click.group(name="api-keys", help="api keys")
11
+ def api_keys_commands_group():
12
+ # Click commands group injection
13
+ pass
14
+
15
+
16
+ api_keys_commands_group.add_command(generate_apikey)
17
+ api_keys_commands_group.add_command(revoke_apikey)
@@ -0,0 +1,21 @@
1
+ from qwak.clients.administration import SelfServiceUserClient
2
+ from qwak.clients.administration.eco_system.client import EcosystemClient
3
+
4
+
5
+ def execute_generate_apikey(
6
+ environment_name: str, user_id: str, force: bool = False
7
+ ) -> str:
8
+ ecosystem_client = EcosystemClient()
9
+ environment_name_to_environment_details_map = (
10
+ ecosystem_client.get_environments_names_to_details([environment_name])
11
+ )
12
+
13
+ user_service = SelfServiceUserClient()
14
+
15
+ return user_service.generate_apikey(
16
+ user_id=user_id,
17
+ environment_id=environment_name_to_environment_details_map.get(
18
+ environment_name
19
+ ).id,
20
+ force=force,
21
+ ).api_key
@@ -0,0 +1,45 @@
1
+ import click
2
+ from qwak.clients.administration.self_service.client import APIKEY_ALREADY_EXISTS
3
+
4
+ from qwak_sdk.commands.admin.apikeys.generate._logic import execute_generate_apikey
5
+ from qwak_sdk.inner.tools.cli_tools import QwakCommand
6
+ from qwak_sdk.inner.tools.logger.logger import get_qwak_logger
7
+
8
+ logger = get_qwak_logger()
9
+
10
+
11
+ @click.command("generate", help="api keys", cls=QwakCommand)
12
+ @click.option(
13
+ "--environment-name",
14
+ help="Environment name to generate api key for",
15
+ required=True,
16
+ )
17
+ @click.option(
18
+ "--user-id",
19
+ help="User id to generate api key for",
20
+ required=True,
21
+ )
22
+ @click.option(
23
+ "--force",
24
+ help="If override existing one. (default false)",
25
+ default=False,
26
+ is_flag=True,
27
+ )
28
+ def generate_apikey(user_id, environment_name, force, **kwargs):
29
+ logger.info(
30
+ f"Generating api key for user {user_id} on environment {environment_name}..."
31
+ )
32
+ try:
33
+ api_key = execute_generate_apikey(
34
+ user_id=user_id, environment_name=environment_name, force=force
35
+ )
36
+ logger.info("generated api key:")
37
+ logger.info(api_key)
38
+ except Exception as e:
39
+ if e.message == APIKEY_ALREADY_EXISTS:
40
+ logger.error(
41
+ "Failed to generate api key - "
42
+ "the api key already exists please add --force if you want to override it."
43
+ )
44
+ else:
45
+ logger.error(e)
@@ -0,0 +1,22 @@
1
+ from _qwak_proto.qwak.self_service.user.v1.user_service_pb2 import RevokeApiKeyResponse
2
+ from qwak.clients.administration import SelfServiceUserClient
3
+ from qwak.clients.administration.eco_system.client import EcosystemClient
4
+
5
+
6
+ def execute_revoke_apikey(environment_name: str, user_id: str) -> bool:
7
+ ecosystem_client = EcosystemClient()
8
+ environment_name_to_environment_details_map = (
9
+ ecosystem_client.get_environments_names_to_details([environment_name])
10
+ )
11
+
12
+ user_service = SelfServiceUserClient()
13
+
14
+ return (
15
+ user_service.revoke_apikey(
16
+ user_id=user_id,
17
+ environment_id=environment_name_to_environment_details_map.get(
18
+ environment_name
19
+ ).id,
20
+ ).status
21
+ == RevokeApiKeyResponse.Status.REVOKED
22
+ )
@@ -0,0 +1,31 @@
1
+ import click
2
+
3
+ from qwak_sdk.commands.admin.apikeys.revoke._logic import execute_revoke_apikey
4
+ from qwak_sdk.inner.tools.cli_tools import QwakCommand
5
+ from qwak_sdk.inner.tools.logger.logger import get_qwak_logger
6
+
7
+ logger = get_qwak_logger()
8
+
9
+
10
+ @click.command("revoke", help="api keys", cls=QwakCommand)
11
+ @click.option(
12
+ "--environment-name",
13
+ help="Environment name to generate api key for",
14
+ required=True,
15
+ )
16
+ @click.option(
17
+ "--user-id",
18
+ help="User id to generate api key for",
19
+ required=True,
20
+ )
21
+ def revoke_apikey(user_id, environment_name, **kwargs):
22
+ logger.info(
23
+ f"Revoking api key for user {user_id} on environment {environment_name}..."
24
+ )
25
+ try:
26
+ if execute_revoke_apikey(user_id=user_id, environment_name=environment_name):
27
+ logger.info("Successfully revoked api key")
28
+ else:
29
+ logger.info("Failed to revoke api key")
30
+ except Exception as e:
31
+ logger.error(e.message)
@@ -0,0 +1,16 @@
1
+ from abc import ABC, abstractmethod
2
+ from dataclasses import field
3
+ from typing import Any
4
+
5
+ from _qwak_proto.qwak.audience.v1.audience_pb2 import Audience
6
+ from pydantic.dataclasses import dataclass
7
+
8
+
9
+ @dataclass
10
+ class ConfigBase(ABC):
11
+ spec: Any
12
+ api_version: str = field(default="v1")
13
+
14
+ @abstractmethod
15
+ def to_audiences_api(self) -> Audience:
16
+ pass
@@ -0,0 +1,28 @@
1
+ from pathlib import Path
2
+ from typing import Optional, Union
3
+
4
+ import yaml
5
+
6
+ from qwak_sdk.commands.audience._logic.config.config_base import ConfigBase
7
+ from qwak_sdk.commands.audience._logic.config.v1.config_v1 import ConfigV1
8
+
9
+ VERSION_CONFIG_MAPPING = {"v1": ConfigV1}
10
+
11
+
12
+ def parse_audience_from_yaml(
13
+ file_path: Optional[Union[Path, str]] = None
14
+ ) -> ConfigBase:
15
+ if file_path:
16
+ file_path_obj = Path(file_path)
17
+ if file_path_obj.exists():
18
+ audience_dict = yaml.safe_load(file_path_obj.open("r"))
19
+ audience_config: ConfigBase = VERSION_CONFIG_MAPPING.get(
20
+ audience_dict.get("api_version")
21
+ )
22
+ return audience_config(**audience_dict)
23
+ else:
24
+ raise FileNotFoundError(
25
+ f"Audience file {file_path_obj} definition isn't found"
26
+ )
27
+ else:
28
+ return ConfigV1()
@@ -0,0 +1,26 @@
1
+ from dataclasses import field
2
+ from typing import List
3
+
4
+ from _qwak_proto.qwak.audience.v1.audience_pb2 import AudienceRoutesEntry
5
+ from pydantic.dataclasses import dataclass
6
+
7
+ from qwak_sdk.commands.audience._logic.config.v1.conditions_config import (
8
+ ConditionsConfig,
9
+ )
10
+ from qwak_sdk.commands.audience._logic.config.v1.route_config import RouteConfig
11
+
12
+
13
+ @dataclass
14
+ class AudienceConfig:
15
+ name: str = field(default="")
16
+ id: str = field(default="")
17
+ description: str = field(default="")
18
+ routes: List[RouteConfig] = field(default_factory=list)
19
+ conditions: ConditionsConfig = field(default_factory=ConditionsConfig)
20
+
21
+ def to_audience_route_entry(self, index: int = 0) -> AudienceRoutesEntry:
22
+ return AudienceRoutesEntry(
23
+ audience_id=self.id,
24
+ order=index + 1,
25
+ routes=[route.to_route_api() for route in self.routes],
26
+ )
@@ -0,0 +1,60 @@
1
+ from dataclasses import field
2
+ from typing import List
3
+
4
+ from _qwak_proto.qwak.audience.v1.audience_pb2 import (
5
+ BinaryCondition,
6
+ BinaryOperatorType,
7
+ Condition,
8
+ UnaryCondition,
9
+ UnaryOperatorType,
10
+ )
11
+ from pydantic.dataclasses import dataclass
12
+
13
+
14
+ @dataclass
15
+ class UnaryConditionConfig:
16
+ key: str
17
+ operator: str
18
+ operand: str
19
+
20
+ def to_condition_api(self) -> Condition:
21
+ return Condition(
22
+ key=self.key,
23
+ unary_condition=UnaryCondition(
24
+ operator=UnaryOperatorType.DESCRIPTOR.values_by_name[
25
+ self.operator
26
+ ].number,
27
+ operand=self.operand,
28
+ ),
29
+ )
30
+
31
+
32
+ @dataclass
33
+ class BinaryConditionConfig:
34
+ key: str
35
+ operator: str
36
+ first_operand: str
37
+ second_operand: str
38
+
39
+ def to_condition_api(self) -> Condition:
40
+ return Condition(
41
+ key=self.key,
42
+ binary_condition=BinaryCondition(
43
+ operator=BinaryOperatorType.DESCRIPTOR.values_by_name[
44
+ self.operator
45
+ ].number,
46
+ first_operand=self.first_operand,
47
+ second_operand=self.second_operand,
48
+ ),
49
+ )
50
+
51
+
52
+ @dataclass
53
+ class ConditionsConfig:
54
+ unary: List[UnaryConditionConfig] = field(default_factory=list)
55
+ binary: List[BinaryConditionConfig] = field(default_factory=list)
56
+
57
+ def to_conditions_api(self) -> List[Condition]:
58
+ conditions = [condition.to_condition_api() for condition in self.unary]
59
+ conditions.extend([condition.to_condition_api() for condition in self.binary])
60
+ return conditions
@@ -0,0 +1,24 @@
1
+ from dataclasses import field
2
+ from typing import List
3
+
4
+ from _qwak_proto.qwak.audience.v1.audience_pb2 import Audience
5
+ from pydantic.dataclasses import dataclass
6
+
7
+ from qwak_sdk.commands.audience._logic.config.config_base import ConfigBase
8
+ from qwak_sdk.commands.audience._logic.config.v1.spec import Spec
9
+
10
+
11
+ @dataclass
12
+ class ConfigV1(ConfigBase):
13
+ spec: Spec = field(default_factory=Spec)
14
+
15
+ def to_audiences_api(self) -> List[Audience]:
16
+ return [
17
+ Audience(
18
+ name=audience_config.name,
19
+ description=audience_config.description,
20
+ routes=[route.to_route_api() for route in audience_config.routes],
21
+ conditions=audience_config.conditions.to_conditions_api(),
22
+ )
23
+ for audience_config in self.spec.audiences
24
+ ]
@@ -0,0 +1,14 @@
1
+ from _qwak_proto.qwak.audience.v1.audience_pb2 import Route
2
+ from pydantic.dataclasses import dataclass
3
+
4
+
5
+ @dataclass
6
+ class RouteConfig:
7
+ variation_name: str
8
+ weight: int
9
+ shadow: bool
10
+
11
+ def to_route_api(self):
12
+ return Route(
13
+ variation_name=self.variation_name, weight=self.weight, shadow=self.shadow
14
+ )
@@ -0,0 +1,11 @@
1
+ from dataclasses import field
2
+ from typing import List
3
+
4
+ from pydantic.dataclasses import dataclass
5
+
6
+ from qwak_sdk.commands.audience._logic.config.v1.audience_config import AudienceConfig
7
+
8
+
9
+ @dataclass
10
+ class Spec:
11
+ audiences: List[AudienceConfig] = field(default_factory=list)
@@ -0,0 +1,3 @@
1
+ from .config import Config
2
+
3
+ __all__ = ["Config"]