databay-cli 0.1.0__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 (431) hide show
  1. databay_cli-0.1.0/.gitignore +5 -0
  2. databay_cli-0.1.0/CHANGELOG.md +46 -0
  3. databay_cli-0.1.0/LICENSE +202 -0
  4. databay_cli-0.1.0/PKG-INFO +42 -0
  5. databay_cli-0.1.0/README.md +20 -0
  6. databay_cli-0.1.0/pyproject.toml +113 -0
  7. databay_cli-0.1.0/src/databay/__init__.py +5 -0
  8. databay_cli-0.1.0/src/databay/__main__.py +7 -0
  9. databay_cli-0.1.0/src/databay/agent_skill.py +184 -0
  10. databay_cli-0.1.0/src/databay/api.py +626 -0
  11. databay_cli-0.1.0/src/databay/cli/__init__.py +0 -0
  12. databay_cli-0.1.0/src/databay/cli/auth.py +377 -0
  13. databay_cli-0.1.0/src/databay/cli/build.py +89 -0
  14. databay_cli-0.1.0/src/databay/cli/commands/__init__.py +0 -0
  15. databay_cli-0.1.0/src/databay/cli/commands/alerting_webhook.py +19 -0
  16. databay_cli-0.1.0/src/databay/cli/commands/alerting_webhook_tag.py +14 -0
  17. databay_cli-0.1.0/src/databay/cli/commands/alerting_webhook_type.py +14 -0
  18. databay_cli-0.1.0/src/databay/cli/commands/alerting_webhook_undelivered.py +15 -0
  19. databay_cli-0.1.0/src/databay/cli/commands/announcement.py +17 -0
  20. databay_cli-0.1.0/src/databay/cli/commands/api_key.py +18 -0
  21. databay_cli-0.1.0/src/databay/cli/commands/api_key_project.py +16 -0
  22. databay_cli-0.1.0/src/databay/cli/commands/backfill_reason_code.py +14 -0
  23. databay_cli-0.1.0/src/databay/cli/commands/backfill_run.py +17 -0
  24. databay_cli-0.1.0/src/databay/cli/commands/canvas.py +16 -0
  25. databay_cli-0.1.0/src/databay/cli/commands/canvas_graph.py +15 -0
  26. databay_cli-0.1.0/src/databay/cli/commands/canvas_table_check.py +15 -0
  27. databay_cli-0.1.0/src/databay/cli/commands/dashboards.py +21 -0
  28. databay_cli-0.1.0/src/databay/cli/commands/dashboards_card.py +20 -0
  29. databay_cli-0.1.0/src/databay/cli/commands/dashboards_dataset.py +14 -0
  30. databay_cli-0.1.0/src/databay/cli/commands/dashboards_folder.py +16 -0
  31. databay_cli-0.1.0/src/databay/cli/commands/dashboards_home.py +17 -0
  32. databay_cli-0.1.0/src/databay/cli/commands/dashboards_placement.py +16 -0
  33. databay_cli-0.1.0/src/databay/cli/commands/db.py +19 -0
  34. databay_cli-0.1.0/src/databay/cli/commands/db_column.py +14 -0
  35. databay_cli-0.1.0/src/databay/cli/commands/docs_article.py +16 -0
  36. databay_cli-0.1.0/src/databay/cli/commands/dq_result.py +14 -0
  37. databay_cli-0.1.0/src/databay/cli/commands/dq_rule.py +16 -0
  38. databay_cli-0.1.0/src/databay/cli/commands/feature.py +14 -0
  39. databay_cli-0.1.0/src/databay/cli/commands/google_ads_source.py +14 -0
  40. databay_cli-0.1.0/src/databay/cli/commands/google_analytics_source.py +14 -0
  41. databay_cli-0.1.0/src/databay/cli/commands/instagram_account.py +14 -0
  42. databay_cli-0.1.0/src/databay/cli/commands/instagram_source.py +14 -0
  43. databay_cli-0.1.0/src/databay/cli/commands/linkedin_account.py +14 -0
  44. databay_cli-0.1.0/src/databay/cli/commands/linkedin_source.py +14 -0
  45. databay_cli-0.1.0/src/databay/cli/commands/me.py +14 -0
  46. databay_cli-0.1.0/src/databay/cli/commands/meta_ads_source.py +14 -0
  47. databay_cli-0.1.0/src/databay/cli/commands/metric_models.py +26 -0
  48. databay_cli-0.1.0/src/databay/cli/commands/metrics.py +14 -0
  49. databay_cli-0.1.0/src/databay/cli/commands/models.py +16 -0
  50. databay_cli-0.1.0/src/databay/cli/commands/nlq.py +15 -0
  51. databay_cli-0.1.0/src/databay/cli/commands/notebook_credential.py +16 -0
  52. databay_cli-0.1.0/src/databay/cli/commands/org.py +14 -0
  53. databay_cli-0.1.0/src/databay/cli/commands/org_member.py +17 -0
  54. databay_cli-0.1.0/src/databay/cli/commands/org_offboarding.py +14 -0
  55. databay_cli-0.1.0/src/databay/cli/commands/pipe.py +26 -0
  56. databay_cli-0.1.0/src/databay/cli/commands/pipe_backfill_run.py +14 -0
  57. databay_cli-0.1.0/src/databay/cli/commands/pipe_config_option.py +14 -0
  58. databay_cli-0.1.0/src/databay/cli/commands/pipe_destination.py +16 -0
  59. databay_cli-0.1.0/src/databay/cli/commands/pipe_leftover.py +16 -0
  60. databay_cli-0.1.0/src/databay/cli/commands/pipe_sink_type.py +14 -0
  61. databay_cli-0.1.0/src/databay/cli/commands/pipe_source_type.py +14 -0
  62. databay_cli-0.1.0/src/databay/cli/commands/pipe_status_bucket.py +14 -0
  63. databay_cli-0.1.0/src/databay/cli/commands/pipe_stuck_delete.py +14 -0
  64. databay_cli-0.1.0/src/databay/cli/commands/plan.py +14 -0
  65. databay_cli-0.1.0/src/databay/cli/commands/project.py +21 -0
  66. databay_cli-0.1.0/src/databay/cli/commands/project_budget.py +15 -0
  67. databay_cli-0.1.0/src/databay/cli/commands/project_member.py +18 -0
  68. databay_cli-0.1.0/src/databay/cli/commands/project_privilege.py +16 -0
  69. databay_cli-0.1.0/src/databay/cli/commands/project_share.py +16 -0
  70. databay_cli-0.1.0/src/databay/cli/commands/provision.py +14 -0
  71. databay_cli-0.1.0/src/databay/cli/commands/provisioning.py +14 -0
  72. databay_cli-0.1.0/src/databay/cli/commands/registry.py +14 -0
  73. databay_cli-0.1.0/src/databay/cli/commands/resource_home.py +14 -0
  74. databay_cli-0.1.0/src/databay/cli/commands/schema_change.py +18 -0
  75. databay_cli-0.1.0/src/databay/cli/commands/schema_history.py +17 -0
  76. databay_cli-0.1.0/src/databay/cli/commands/schema_version.py +16 -0
  77. databay_cli-0.1.0/src/databay/cli/commands/shopify_store.py +14 -0
  78. databay_cli-0.1.0/src/databay/cli/commands/sink_data_type.py +14 -0
  79. databay_cli-0.1.0/src/databay/cli/commands/source.py +24 -0
  80. databay_cli-0.1.0/src/databay/cli/commands/source_catalog.py +15 -0
  81. databay_cli-0.1.0/src/databay/cli/commands/source_check_run.py +17 -0
  82. databay_cli-0.1.0/src/databay/cli/commands/source_hidden_type.py +14 -0
  83. databay_cli-0.1.0/src/databay/cli/commands/source_name.py +14 -0
  84. databay_cli-0.1.0/src/databay/cli/commands/source_pipe.py +14 -0
  85. databay_cli-0.1.0/src/databay/cli/commands/source_publication.py +16 -0
  86. databay_cli-0.1.0/src/databay/cli/commands/source_readiness_override.py +15 -0
  87. databay_cli-0.1.0/src/databay/cli/commands/source_setup_choice.py +16 -0
  88. databay_cli-0.1.0/src/databay/cli/commands/source_stream.py +15 -0
  89. databay_cli-0.1.0/src/databay/cli/commands/source_table.py +14 -0
  90. databay_cli-0.1.0/src/databay/cli/commands/ssbi_job.py +18 -0
  91. databay_cli-0.1.0/src/databay/cli/commands/transform_type.py +14 -0
  92. databay_cli-0.1.0/src/databay/cli/commands/usage.py +14 -0
  93. databay_cli-0.1.0/src/databay/cli/commands/warehouse.py +21 -0
  94. databay_cli-0.1.0/src/databay/cli/commands/warehouse_access_assignment.py +16 -0
  95. databay_cli-0.1.0/src/databay/cli/commands/warehouse_access_role.py +22 -0
  96. databay_cli-0.1.0/src/databay/cli/commands/warehouse_access_settings.py +17 -0
  97. databay_cli-0.1.0/src/databay/cli/commands/warehouse_login.py +20 -0
  98. databay_cli-0.1.0/src/databay/cli/commands/warehouse_principal.py +17 -0
  99. databay_cli-0.1.0/src/databay/cli/commands/warehouse_service_account.py +17 -0
  100. databay_cli-0.1.0/src/databay/cli/commands/warehouse_service_account_credential.py +18 -0
  101. databay_cli-0.1.0/src/databay/cli/common.py +93 -0
  102. databay_cli-0.1.0/src/databay/cli/console.py +121 -0
  103. databay_cli-0.1.0/src/databay/cli/flags.py +183 -0
  104. databay_cli-0.1.0/src/databay/cli/handwritten.py +22 -0
  105. databay_cli-0.1.0/src/databay/cli/main.py +198 -0
  106. databay_cli-0.1.0/src/databay/cli/metrics.py +171 -0
  107. databay_cli-0.1.0/src/databay/cli/org.py +193 -0
  108. databay_cli-0.1.0/src/databay/cli/output.py +134 -0
  109. databay_cli-0.1.0/src/databay/cli/pipe_wait.py +357 -0
  110. databay_cli-0.1.0/src/databay/cli/profile.py +230 -0
  111. databay_cli-0.1.0/src/databay/cli/runner.py +432 -0
  112. databay_cli-0.1.0/src/databay/cli/skill.py +64 -0
  113. databay_cli-0.1.0/src/databay/cli/sql.py +84 -0
  114. databay_cli-0.1.0/src/databay/compat.py +161 -0
  115. databay_cli-0.1.0/src/databay/credentials.py +217 -0
  116. databay_cli-0.1.0/src/databay/error_catalog.py +226 -0
  117. databay_cli-0.1.0/src/databay/error_codes.py +3265 -0
  118. databay_cli-0.1.0/src/databay/errors.py +222 -0
  119. databay_cli-0.1.0/src/databay/feature_header.py +40 -0
  120. databay_cli-0.1.0/src/databay/invoke.py +225 -0
  121. databay_cli-0.1.0/src/databay/locks.py +41 -0
  122. databay_cli-0.1.0/src/databay/login_flow.py +245 -0
  123. databay_cli-0.1.0/src/databay/model_base.py +40 -0
  124. databay_cli-0.1.0/src/databay/models/__init__.py +0 -0
  125. databay_cli-0.1.0/src/databay/models/alerting_webhook.py +46 -0
  126. databay_cli-0.1.0/src/databay/models/alerting_webhook_tag.py +11 -0
  127. databay_cli-0.1.0/src/databay/models/alerting_webhook_type.py +11 -0
  128. databay_cli-0.1.0/src/databay/models/alerting_webhook_undelivered.py +23 -0
  129. databay_cli-0.1.0/src/databay/models/announcement.py +37 -0
  130. databay_cli-0.1.0/src/databay/models/api_key.py +81 -0
  131. databay_cli-0.1.0/src/databay/models/api_key_project.py +29 -0
  132. databay_cli-0.1.0/src/databay/models/backfill_reason_code.py +11 -0
  133. databay_cli-0.1.0/src/databay/models/backfill_run.py +41 -0
  134. databay_cli-0.1.0/src/databay/models/canvas.py +68 -0
  135. databay_cli-0.1.0/src/databay/models/canvas_graph.py +86 -0
  136. databay_cli-0.1.0/src/databay/models/canvas_table_check.py +181 -0
  137. databay_cli-0.1.0/src/databay/models/dashboards.py +79 -0
  138. databay_cli-0.1.0/src/databay/models/dashboards_card.py +37 -0
  139. databay_cli-0.1.0/src/databay/models/dashboards_dataset.py +27 -0
  140. databay_cli-0.1.0/src/databay/models/dashboards_folder.py +18 -0
  141. databay_cli-0.1.0/src/databay/models/dashboards_home.py +28 -0
  142. databay_cli-0.1.0/src/databay/models/db.py +34 -0
  143. databay_cli-0.1.0/src/databay/models/db_column.py +11 -0
  144. databay_cli-0.1.0/src/databay/models/docs_article.py +59 -0
  145. databay_cli-0.1.0/src/databay/models/dq_result.py +27 -0
  146. databay_cli-0.1.0/src/databay/models/dq_rule.py +43 -0
  147. databay_cli-0.1.0/src/databay/models/feature.py +15 -0
  148. databay_cli-0.1.0/src/databay/models/google_ads_source.py +11 -0
  149. databay_cli-0.1.0/src/databay/models/google_analytics_source.py +11 -0
  150. databay_cli-0.1.0/src/databay/models/instagram_source.py +11 -0
  151. databay_cli-0.1.0/src/databay/models/linkedin_source.py +11 -0
  152. databay_cli-0.1.0/src/databay/models/me.py +71 -0
  153. databay_cli-0.1.0/src/databay/models/meta_ads_source.py +11 -0
  154. databay_cli-0.1.0/src/databay/models/metric_models.py +274 -0
  155. databay_cli-0.1.0/src/databay/models/metrics.py +158 -0
  156. databay_cli-0.1.0/src/databay/models/models.py +73 -0
  157. databay_cli-0.1.0/src/databay/models/nlq.py +92 -0
  158. databay_cli-0.1.0/src/databay/models/notebook_credential.py +51 -0
  159. databay_cli-0.1.0/src/databay/models/org.py +44 -0
  160. databay_cli-0.1.0/src/databay/models/org_member.py +123 -0
  161. databay_cli-0.1.0/src/databay/models/org_offboarding.py +36 -0
  162. databay_cli-0.1.0/src/databay/models/pipe.py +340 -0
  163. databay_cli-0.1.0/src/databay/models/pipe_config_option.py +25 -0
  164. databay_cli-0.1.0/src/databay/models/pipe_destination.py +128 -0
  165. databay_cli-0.1.0/src/databay/models/pipe_leftover.py +51 -0
  166. databay_cli-0.1.0/src/databay/models/pipe_sink_type.py +11 -0
  167. databay_cli-0.1.0/src/databay/models/pipe_source_type.py +11 -0
  168. databay_cli-0.1.0/src/databay/models/pipe_status_bucket.py +13 -0
  169. databay_cli-0.1.0/src/databay/models/pipe_stuck_delete.py +25 -0
  170. databay_cli-0.1.0/src/databay/models/plan.py +37 -0
  171. databay_cli-0.1.0/src/databay/models/project.py +154 -0
  172. databay_cli-0.1.0/src/databay/models/project_budget.py +22 -0
  173. databay_cli-0.1.0/src/databay/models/project_member.py +67 -0
  174. databay_cli-0.1.0/src/databay/models/project_privilege.py +21 -0
  175. databay_cli-0.1.0/src/databay/models/project_share.py +76 -0
  176. databay_cli-0.1.0/src/databay/models/provision.py +12 -0
  177. databay_cli-0.1.0/src/databay/models/provisioning.py +20 -0
  178. databay_cli-0.1.0/src/databay/models/registry.py +18 -0
  179. databay_cli-0.1.0/src/databay/models/resource_home.py +35 -0
  180. databay_cli-0.1.0/src/databay/models/schema_change.py +96 -0
  181. databay_cli-0.1.0/src/databay/models/schema_history.py +32 -0
  182. databay_cli-0.1.0/src/databay/models/schema_version.py +23 -0
  183. databay_cli-0.1.0/src/databay/models/shared.py +875 -0
  184. databay_cli-0.1.0/src/databay/models/shopify_store.py +19 -0
  185. databay_cli-0.1.0/src/databay/models/sink_data_type.py +11 -0
  186. databay_cli-0.1.0/src/databay/models/source.py +263 -0
  187. databay_cli-0.1.0/src/databay/models/source_catalog.py +82 -0
  188. databay_cli-0.1.0/src/databay/models/source_check_run.py +63 -0
  189. databay_cli-0.1.0/src/databay/models/source_hidden_type.py +13 -0
  190. databay_cli-0.1.0/src/databay/models/source_name.py +18 -0
  191. databay_cli-0.1.0/src/databay/models/source_pipe.py +16 -0
  192. databay_cli-0.1.0/src/databay/models/source_publication.py +30 -0
  193. databay_cli-0.1.0/src/databay/models/source_readiness_override.py +13 -0
  194. databay_cli-0.1.0/src/databay/models/source_setup_choice.py +33 -0
  195. databay_cli-0.1.0/src/databay/models/source_stream.py +65 -0
  196. databay_cli-0.1.0/src/databay/models/source_table.py +27 -0
  197. databay_cli-0.1.0/src/databay/models/sql.py +31 -0
  198. databay_cli-0.1.0/src/databay/models/ssbi_job.py +97 -0
  199. databay_cli-0.1.0/src/databay/models/transform_type.py +40 -0
  200. databay_cli-0.1.0/src/databay/models/usage.py +112 -0
  201. databay_cli-0.1.0/src/databay/models/warehouse.py +38 -0
  202. databay_cli-0.1.0/src/databay/models/warehouse_access_assignment.py +70 -0
  203. databay_cli-0.1.0/src/databay/models/warehouse_access_role.py +148 -0
  204. databay_cli-0.1.0/src/databay/models/warehouse_access_settings.py +35 -0
  205. databay_cli-0.1.0/src/databay/models/warehouse_login.py +20 -0
  206. databay_cli-0.1.0/src/databay/models/warehouse_principal.py +49 -0
  207. databay_cli-0.1.0/src/databay/models/warehouse_service_account.py +35 -0
  208. databay_cli-0.1.0/src/databay/models/warehouse_service_account_credential.py +11 -0
  209. databay_cli-0.1.0/src/databay/oidc.py +205 -0
  210. databay_cli-0.1.0/src/databay/operation.py +191 -0
  211. databay_cli-0.1.0/src/databay/operations/__init__.py +0 -0
  212. databay_cli-0.1.0/src/databay/operations/alerting_webhook.py +317 -0
  213. databay_cli-0.1.0/src/databay/operations/alerting_webhook_tag.py +35 -0
  214. databay_cli-0.1.0/src/databay/operations/alerting_webhook_type.py +35 -0
  215. databay_cli-0.1.0/src/databay/operations/alerting_webhook_undelivered.py +74 -0
  216. databay_cli-0.1.0/src/databay/operations/announcement.py +135 -0
  217. databay_cli-0.1.0/src/databay/operations/api_key.py +198 -0
  218. databay_cli-0.1.0/src/databay/operations/api_key_project.py +130 -0
  219. databay_cli-0.1.0/src/databay/operations/backfill_reason_code.py +35 -0
  220. databay_cli-0.1.0/src/databay/operations/backfill_run.py +245 -0
  221. databay_cli-0.1.0/src/databay/operations/canvas.py +136 -0
  222. databay_cli-0.1.0/src/databay/operations/canvas_graph.py +102 -0
  223. databay_cli-0.1.0/src/databay/operations/canvas_table_check.py +101 -0
  224. databay_cli-0.1.0/src/databay/operations/dashboards.py +441 -0
  225. databay_cli-0.1.0/src/databay/operations/dashboards_card.py +406 -0
  226. databay_cli-0.1.0/src/databay/operations/dashboards_dataset.py +50 -0
  227. databay_cli-0.1.0/src/databay/operations/dashboards_folder.py +146 -0
  228. databay_cli-0.1.0/src/databay/operations/dashboards_home.py +176 -0
  229. databay_cli-0.1.0/src/databay/operations/dashboards_placement.py +152 -0
  230. databay_cli-0.1.0/src/databay/operations/db.py +337 -0
  231. databay_cli-0.1.0/src/databay/operations/db_column.py +57 -0
  232. databay_cli-0.1.0/src/databay/operations/docs_article.py +101 -0
  233. databay_cli-0.1.0/src/databay/operations/dq_result.py +43 -0
  234. databay_cli-0.1.0/src/databay/operations/dq_rule.py +155 -0
  235. databay_cli-0.1.0/src/databay/operations/feature.py +35 -0
  236. databay_cli-0.1.0/src/databay/operations/google_ads_source.py +40 -0
  237. databay_cli-0.1.0/src/databay/operations/google_analytics_source.py +40 -0
  238. databay_cli-0.1.0/src/databay/operations/instagram_account.py +47 -0
  239. databay_cli-0.1.0/src/databay/operations/instagram_source.py +40 -0
  240. databay_cli-0.1.0/src/databay/operations/linkedin_account.py +47 -0
  241. databay_cli-0.1.0/src/databay/operations/linkedin_source.py +40 -0
  242. databay_cli-0.1.0/src/databay/operations/me.py +57 -0
  243. databay_cli-0.1.0/src/databay/operations/meta_ads_source.py +40 -0
  244. databay_cli-0.1.0/src/databay/operations/metric_models.py +612 -0
  245. databay_cli-0.1.0/src/databay/operations/metrics.py +218 -0
  246. databay_cli-0.1.0/src/databay/operations/models.py +123 -0
  247. databay_cli-0.1.0/src/databay/operations/nlq.py +100 -0
  248. databay_cli-0.1.0/src/databay/operations/notebook_credential.py +95 -0
  249. databay_cli-0.1.0/src/databay/operations/org.py +79 -0
  250. databay_cli-0.1.0/src/databay/operations/org_member.py +192 -0
  251. databay_cli-0.1.0/src/databay/operations/org_offboarding.py +43 -0
  252. databay_cli-0.1.0/src/databay/operations/pipe.py +882 -0
  253. databay_cli-0.1.0/src/databay/operations/pipe_backfill_run.py +72 -0
  254. databay_cli-0.1.0/src/databay/operations/pipe_config_option.py +50 -0
  255. databay_cli-0.1.0/src/databay/operations/pipe_destination.py +178 -0
  256. databay_cli-0.1.0/src/databay/operations/pipe_leftover.py +110 -0
  257. databay_cli-0.1.0/src/databay/operations/pipe_sink_type.py +35 -0
  258. databay_cli-0.1.0/src/databay/operations/pipe_source_type.py +35 -0
  259. databay_cli-0.1.0/src/databay/operations/pipe_status_bucket.py +35 -0
  260. databay_cli-0.1.0/src/databay/operations/pipe_stuck_delete.py +52 -0
  261. databay_cli-0.1.0/src/databay/operations/plan.py +35 -0
  262. databay_cli-0.1.0/src/databay/operations/project.py +346 -0
  263. databay_cli-0.1.0/src/databay/operations/project_budget.py +135 -0
  264. databay_cli-0.1.0/src/databay/operations/project_member.py +226 -0
  265. databay_cli-0.1.0/src/databay/operations/project_privilege.py +143 -0
  266. databay_cli-0.1.0/src/databay/operations/project_share.py +160 -0
  267. databay_cli-0.1.0/src/databay/operations/provision.py +35 -0
  268. databay_cli-0.1.0/src/databay/operations/provisioning.py +35 -0
  269. databay_cli-0.1.0/src/databay/operations/registry.py +35 -0
  270. databay_cli-0.1.0/src/databay/operations/resource_home.py +80 -0
  271. databay_cli-0.1.0/src/databay/operations/schema_change.py +222 -0
  272. databay_cli-0.1.0/src/databay/operations/schema_history.py +136 -0
  273. databay_cli-0.1.0/src/databay/operations/schema_version.py +115 -0
  274. databay_cli-0.1.0/src/databay/operations/shopify_store.py +40 -0
  275. databay_cli-0.1.0/src/databay/operations/sink_data_type.py +43 -0
  276. databay_cli-0.1.0/src/databay/operations/source.py +1207 -0
  277. databay_cli-0.1.0/src/databay/operations/source_catalog.py +135 -0
  278. databay_cli-0.1.0/src/databay/operations/source_check_run.py +242 -0
  279. databay_cli-0.1.0/src/databay/operations/source_hidden_type.py +59 -0
  280. databay_cli-0.1.0/src/databay/operations/source_name.py +69 -0
  281. databay_cli-0.1.0/src/databay/operations/source_pipe.py +57 -0
  282. databay_cli-0.1.0/src/databay/operations/source_publication.py +139 -0
  283. databay_cli-0.1.0/src/databay/operations/source_readiness_override.py +96 -0
  284. databay_cli-0.1.0/src/databay/operations/source_setup_choice.py +161 -0
  285. databay_cli-0.1.0/src/databay/operations/source_stream.py +99 -0
  286. databay_cli-0.1.0/src/databay/operations/source_table.py +59 -0
  287. databay_cli-0.1.0/src/databay/operations/sql.py +54 -0
  288. databay_cli-0.1.0/src/databay/operations/ssbi_job.py +242 -0
  289. databay_cli-0.1.0/src/databay/operations/transform_type.py +35 -0
  290. databay_cli-0.1.0/src/databay/operations/usage.py +35 -0
  291. databay_cli-0.1.0/src/databay/operations/warehouse.py +343 -0
  292. databay_cli-0.1.0/src/databay/operations/warehouse_access_assignment.py +179 -0
  293. databay_cli-0.1.0/src/databay/operations/warehouse_access_role.py +473 -0
  294. databay_cli-0.1.0/src/databay/operations/warehouse_access_settings.py +172 -0
  295. databay_cli-0.1.0/src/databay/operations/warehouse_login.py +308 -0
  296. databay_cli-0.1.0/src/databay/operations/warehouse_principal.py +174 -0
  297. databay_cli-0.1.0/src/databay/operations/warehouse_service_account.py +206 -0
  298. databay_cli-0.1.0/src/databay/operations/warehouse_service_account_credential.py +285 -0
  299. databay_cli-0.1.0/src/databay/paths.py +32 -0
  300. databay_cli-0.1.0/src/databay/platform_check.py +20 -0
  301. databay_cli-0.1.0/src/databay/profiles.py +181 -0
  302. databay_cli-0.1.0/src/databay/redact.py +22 -0
  303. databay_cli-0.1.0/src/databay/reference.py +218 -0
  304. databay_cli-0.1.0/src/databay/resource.py +167 -0
  305. databay_cli-0.1.0/src/databay/resources/__init__.py +0 -0
  306. databay_cli-0.1.0/src/databay/resources/alerting_webhook.py +84 -0
  307. databay_cli-0.1.0/src/databay/resources/alerting_webhook_tag.py +21 -0
  308. databay_cli-0.1.0/src/databay/resources/alerting_webhook_type.py +21 -0
  309. databay_cli-0.1.0/src/databay/resources/alerting_webhook_undelivered.py +35 -0
  310. databay_cli-0.1.0/src/databay/resources/announcement.py +45 -0
  311. databay_cli-0.1.0/src/databay/resources/api_key.py +56 -0
  312. databay_cli-0.1.0/src/databay/resources/api_key_project.py +47 -0
  313. databay_cli-0.1.0/src/databay/resources/backfill_reason_code.py +21 -0
  314. databay_cli-0.1.0/src/databay/resources/backfill_run.py +78 -0
  315. databay_cli-0.1.0/src/databay/resources/canvas.py +43 -0
  316. databay_cli-0.1.0/src/databay/resources/canvas_graph.py +38 -0
  317. databay_cli-0.1.0/src/databay/resources/canvas_table_check.py +38 -0
  318. databay_cli-0.1.0/src/databay/resources/dashboards.py +105 -0
  319. databay_cli-0.1.0/src/databay/resources/dashboards_card.py +97 -0
  320. databay_cli-0.1.0/src/databay/resources/dashboards_dataset.py +27 -0
  321. databay_cli-0.1.0/src/databay/resources/dashboards_folder.py +47 -0
  322. databay_cli-0.1.0/src/databay/resources/dashboards_home.py +59 -0
  323. databay_cli-0.1.0/src/databay/resources/dashboards_placement.py +47 -0
  324. databay_cli-0.1.0/src/databay/resources/db.py +87 -0
  325. databay_cli-0.1.0/src/databay/resources/db_column.py +28 -0
  326. databay_cli-0.1.0/src/databay/resources/docs_article.py +37 -0
  327. databay_cli-0.1.0/src/databay/resources/dq_result.py +25 -0
  328. databay_cli-0.1.0/src/databay/resources/dq_rule.py +48 -0
  329. databay_cli-0.1.0/src/databay/resources/feature.py +21 -0
  330. databay_cli-0.1.0/src/databay/resources/google_ads_source.py +25 -0
  331. databay_cli-0.1.0/src/databay/resources/google_analytics_source.py +25 -0
  332. databay_cli-0.1.0/src/databay/resources/instagram_account.py +27 -0
  333. databay_cli-0.1.0/src/databay/resources/instagram_source.py +25 -0
  334. databay_cli-0.1.0/src/databay/resources/linkedin_account.py +27 -0
  335. databay_cli-0.1.0/src/databay/resources/linkedin_source.py +25 -0
  336. databay_cli-0.1.0/src/databay/resources/me.py +27 -0
  337. databay_cli-0.1.0/src/databay/resources/meta_ads_source.py +25 -0
  338. databay_cli-0.1.0/src/databay/resources/metric_models.py +154 -0
  339. databay_cli-0.1.0/src/databay/resources/metrics.py +57 -0
  340. databay_cli-0.1.0/src/databay/resources/models.py +42 -0
  341. databay_cli-0.1.0/src/databay/resources/nlq.py +34 -0
  342. databay_cli-0.1.0/src/databay/resources/notebook_credential.py +41 -0
  343. databay_cli-0.1.0/src/databay/resources/org.py +29 -0
  344. databay_cli-0.1.0/src/databay/resources/org_member.py +53 -0
  345. databay_cli-0.1.0/src/databay/resources/org_offboarding.py +25 -0
  346. databay_cli-0.1.0/src/databay/resources/pipe.py +208 -0
  347. databay_cli-0.1.0/src/databay/resources/pipe_backfill_run.py +28 -0
  348. databay_cli-0.1.0/src/databay/resources/pipe_config_option.py +26 -0
  349. databay_cli-0.1.0/src/databay/resources/pipe_destination.py +49 -0
  350. databay_cli-0.1.0/src/databay/resources/pipe_leftover.py +42 -0
  351. databay_cli-0.1.0/src/databay/resources/pipe_sink_type.py +21 -0
  352. databay_cli-0.1.0/src/databay/resources/pipe_source_type.py +21 -0
  353. databay_cli-0.1.0/src/databay/resources/pipe_status_bucket.py +21 -0
  354. databay_cli-0.1.0/src/databay/resources/pipe_stuck_delete.py +27 -0
  355. databay_cli-0.1.0/src/databay/resources/plan.py +21 -0
  356. databay_cli-0.1.0/src/databay/resources/project.py +92 -0
  357. databay_cli-0.1.0/src/databay/resources/project_budget.py +38 -0
  358. databay_cli-0.1.0/src/databay/resources/project_member.py +68 -0
  359. databay_cli-0.1.0/src/databay/resources/project_privilege.py +48 -0
  360. databay_cli-0.1.0/src/databay/resources/project_share.py +47 -0
  361. databay_cli-0.1.0/src/databay/resources/provision.py +21 -0
  362. databay_cli-0.1.0/src/databay/resources/provisioning.py +21 -0
  363. databay_cli-0.1.0/src/databay/resources/registry.py +21 -0
  364. databay_cli-0.1.0/src/databay/resources/resource_home.py +29 -0
  365. databay_cli-0.1.0/src/databay/resources/schema_change.py +62 -0
  366. databay_cli-0.1.0/src/databay/resources/schema_history.py +52 -0
  367. databay_cli-0.1.0/src/databay/resources/schema_version.py +43 -0
  368. databay_cli-0.1.0/src/databay/resources/shopify_store.py +25 -0
  369. databay_cli-0.1.0/src/databay/resources/sink_data_type.py +25 -0
  370. databay_cli-0.1.0/src/databay/resources/source.py +132 -0
  371. databay_cli-0.1.0/src/databay/resources/source_catalog.py +34 -0
  372. databay_cli-0.1.0/src/databay/resources/source_check_run.py +67 -0
  373. databay_cli-0.1.0/src/databay/resources/source_hidden_type.py +25 -0
  374. databay_cli-0.1.0/src/databay/resources/source_name.py +27 -0
  375. databay_cli-0.1.0/src/databay/resources/source_pipe.py +28 -0
  376. databay_cli-0.1.0/src/databay/resources/source_publication.py +47 -0
  377. databay_cli-0.1.0/src/databay/resources/source_readiness_override.py +37 -0
  378. databay_cli-0.1.0/src/databay/resources/source_setup_choice.py +50 -0
  379. databay_cli-0.1.0/src/databay/resources/source_stream.py +38 -0
  380. databay_cli-0.1.0/src/databay/resources/source_table.py +27 -0
  381. databay_cli-0.1.0/src/databay/resources/sql.py +27 -0
  382. databay_cli-0.1.0/src/databay/resources/ssbi_job.py +69 -0
  383. databay_cli-0.1.0/src/databay/resources/transform_type.py +21 -0
  384. databay_cli-0.1.0/src/databay/resources/usage.py +21 -0
  385. databay_cli-0.1.0/src/databay/resources/warehouse.py +136 -0
  386. databay_cli-0.1.0/src/databay/resources/warehouse_access_assignment.py +51 -0
  387. databay_cli-0.1.0/src/databay/resources/warehouse_access_role.py +118 -0
  388. databay_cli-0.1.0/src/databay/resources/warehouse_access_settings.py +56 -0
  389. databay_cli-0.1.0/src/databay/resources/warehouse_login.py +81 -0
  390. databay_cli-0.1.0/src/databay/resources/warehouse_principal.py +51 -0
  391. databay_cli-0.1.0/src/databay/resources/warehouse_service_account.py +61 -0
  392. databay_cli-0.1.0/src/databay/resources/warehouse_service_account_credential.py +78 -0
  393. databay_cli-0.1.0/src/databay/sdk.py +77 -0
  394. databay_cli-0.1.0/src/databay/settings.py +90 -0
  395. databay_cli-0.1.0/src/databay/skill/SKILL.md +357 -0
  396. databay_cli-0.1.0/src/databay/skill/references/commands.md +7025 -0
  397. databay_cli-0.1.0/src/databay/skill/references/errors.md +727 -0
  398. databay_cli-0.1.0/src/databay/spec.py +362 -0
  399. databay_cli-0.1.0/src/databay/stored_token.py +134 -0
  400. databay_cli-0.1.0/src/databay/tokens.py +108 -0
  401. databay_cli-0.1.0/src/databay/transport.py +357 -0
  402. databay_cli-0.1.0/src/databay/update_check.py +151 -0
  403. databay_cli-0.1.0/src/databay/version.py +6 -0
  404. databay_cli-0.1.0/src/databay/waits.py +330 -0
  405. databay_cli-0.1.0/tests/cli_parse.py +62 -0
  406. databay_cli-0.1.0/tests/conftest.py +214 -0
  407. databay_cli-0.1.0/tests/test_cli.py +630 -0
  408. databay_cli-0.1.0/tests/test_contract_reader.py +135 -0
  409. databay_cli-0.1.0/tests/test_dashboards.py +216 -0
  410. databay_cli-0.1.0/tests/test_errors.py +279 -0
  411. databay_cli-0.1.0/tests/test_examples.py +54 -0
  412. databay_cli-0.1.0/tests/test_generator.py +340 -0
  413. databay_cli-0.1.0/tests/test_handwritten.py +217 -0
  414. databay_cli-0.1.0/tests/test_login.py +453 -0
  415. databay_cli-0.1.0/tests/test_metrics.py +325 -0
  416. databay_cli-0.1.0/tests/test_org.py +307 -0
  417. databay_cli-0.1.0/tests/test_pipe_wait.py +751 -0
  418. databay_cli-0.1.0/tests/test_release_client.py +322 -0
  419. databay_cli-0.1.0/tests/test_retries.py +135 -0
  420. databay_cli-0.1.0/tests/test_schema_change.py +45 -0
  421. databay_cli-0.1.0/tests/test_skill.py +320 -0
  422. databay_cli-0.1.0/tests/test_source_create.py +249 -0
  423. databay_cli-0.1.0/tests/test_startup.py +49 -0
  424. databay_cli-0.1.0/tests/test_tokens.py +424 -0
  425. databay_cli-0.1.0/tests/test_update_check.py +212 -0
  426. databay_cli-0.1.0/tests/test_waits.py +512 -0
  427. databay_cli-0.1.0/tools/contract.py +157 -0
  428. databay_cli-0.1.0/tools/gen_client.py +1257 -0
  429. databay_cli-0.1.0/tools/release_client.py +150 -0
  430. databay_cli-0.1.0/tools/smoke_client_wheel.sh +45 -0
  431. databay_cli-0.1.0/uv.lock +652 -0
@@ -0,0 +1,5 @@
1
+ __pycache__/
2
+ .venv/
3
+ .pytest_cache/
4
+ .ruff_cache/
5
+ dist/
@@ -0,0 +1,46 @@
1
+ # Changelog
2
+
3
+ `databay-cli`: the Databay SDK and the `databay` command. semantic-release writes each version's section from
4
+ the conventional commits since the one before (see `docs/cli.md`). This package's version is separate from
5
+ `api_version`, the version of the API a client speaks.
6
+
7
+ <!-- version list -->
8
+
9
+ ## v0.1.0 (2026-11-13)
10
+
11
+ - Initial Release
12
+
13
+ ## What the first release holds
14
+
15
+ ### Added
16
+
17
+ - First release of the SDK and the `databay` command: sign in, projects, sources, pipes, warehouses,
18
+ SQL queries and dashboards, generated from the Databay client contract.
19
+ - The agent skill, installed with `databay skill install`.
20
+ - `databay org list` and `databay org switch <organization>`: choose the active organization, which the
21
+ server stores and every token names; switching refreshes the token and clears the active project.
22
+ - `databay login --org <organization>`; without it, a person in several organizations with none active
23
+ is asked on a terminal, and gets `org_choice_required` when the CLI cannot ask.
24
+ - `databay status` reports `needs_org_choice`.
25
+ - `databay schema-change state [--pipe-uuid] [--state]`: each pipe with an unfinished schema change,
26
+ worst first; `databay schema-change pending --status` picks the event statuses to list.
27
+ - `databay metrics list`, `databay metrics describe <metric>` and `databay metrics query <metric>` with
28
+ `--by`, `--grain`, `--last` or `--from`/`--to`, `--where member=value` (also `!=`, `>`, `>=`, `<`, `<=`),
29
+ `--order member[:desc]`, `--limit`, `--warehouse`, `--model-version`, `--explain` and `--dry-run`; a query sends
30
+ `X-Databay-Caller: cli`, or `agent` with `--caller agent`, which the agent skill passes on every query.
31
+ `databay warehouse-access-role get-metrics|set-metrics` read and set a role's
32
+ metric grants. The agent skill teaches list, describe, query and explain, and labels a `databay sql`
33
+ fallback `answer_path: raw_sql`.
34
+ - `databay metric-models push|validate|publish|show-draft|show-published|list|import-dbt`: a project's own
35
+ metric model, which the agent skill teaches (validate, push, publish, import from dbt).
36
+ `databay project-privilege list|grant|revoke`: a member's privileges in a project.
37
+ - `databay metric-models metric-list|metric-add|metric-update|metric-remove|set-breakdowns|changes`: edit one
38
+ metric or one table's breakdowns on the draft's `--revision` (`draft_changed` when it moved), and see what a
39
+ publish changes; `publish --revision` publishes the draft that was checked. `databay project my-access` shows
40
+ the caller's role and privileges. Dashboard cards take metric specs (`spec_version` 2).
41
+ - `databay api-key-project bi-connection <key_id> <project_id>`: where a BI tool signs in with an API key.
42
+ - The agent skill teaches the metric form commands, metric cards and connecting a BI tool.
43
+ - On a terminal, an error answered with a 5xx prints its `trace_id`.
44
+ - Dashboards follow the server's cards model: a card belongs to the project (`dashboards-card`), is put
45
+ on dashboards with `dashboards-placement`, and a dashboard takes `--refresh-interval-s`;
46
+ `dashboards-home` reads or sets the project's Overview dashboard and pins cards to it.
@@ -0,0 +1,202 @@
1
+
2
+ Apache License
3
+ Version 2.0, January 2004
4
+ http://www.apache.org/licenses/
5
+
6
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
7
+
8
+ 1. Definitions.
9
+
10
+ "License" shall mean the terms and conditions for use, reproduction,
11
+ and distribution as defined by Sections 1 through 9 of this document.
12
+
13
+ "Licensor" shall mean the copyright owner or entity authorized by
14
+ the copyright owner that is granting the License.
15
+
16
+ "Legal Entity" shall mean the union of the acting entity and all
17
+ other entities that control, are controlled by, or are under common
18
+ control with that entity. For the purposes of this definition,
19
+ "control" means (i) the power, direct or indirect, to cause the
20
+ direction or management of such entity, whether by contract or
21
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
22
+ outstanding shares, or (iii) beneficial ownership of such entity.
23
+
24
+ "You" (or "Your") shall mean an individual or Legal Entity
25
+ exercising permissions granted by this License.
26
+
27
+ "Source" form shall mean the preferred form for making modifications,
28
+ including but not limited to software source code, documentation
29
+ source, and configuration files.
30
+
31
+ "Object" form shall mean any form resulting from mechanical
32
+ transformation or translation of a Source form, including but
33
+ not limited to compiled object code, generated documentation,
34
+ and conversions to other media types.
35
+
36
+ "Work" shall mean the work of authorship, whether in Source or
37
+ Object form, made available under the License, as indicated by a
38
+ copyright notice that is included in or attached to the work
39
+ (an example is provided in the Appendix below).
40
+
41
+ "Derivative Works" shall mean any work, whether in Source or Object
42
+ form, that is based on (or derived from) the Work and for which the
43
+ editorial revisions, annotations, elaborations, or other modifications
44
+ represent, as a whole, an original work of authorship. For the purposes
45
+ of this License, Derivative Works shall not include works that remain
46
+ separable from, or merely link (or bind by name) to the interfaces of,
47
+ the Work and Derivative Works thereof.
48
+
49
+ "Contribution" shall mean any work of authorship, including
50
+ the original version of the Work and any modifications or additions
51
+ to that Work or Derivative Works thereof, that is intentionally
52
+ submitted to Licensor for inclusion in the Work by the copyright owner
53
+ or by an individual or Legal Entity authorized to submit on behalf of
54
+ the copyright owner. For the purposes of this definition, "submitted"
55
+ means any form of electronic, verbal, or written communication sent
56
+ to the Licensor or its representatives, including but not limited to
57
+ communication on electronic mailing lists, source code control systems,
58
+ and issue tracking systems that are managed by, or on behalf of, the
59
+ Licensor for the purpose of discussing and improving the Work, but
60
+ excluding communication that is conspicuously marked or otherwise
61
+ designated in writing by the copyright owner as "Not a Contribution."
62
+
63
+ "Contributor" shall mean Licensor and any individual or Legal Entity
64
+ on behalf of whom a Contribution has been received by Licensor and
65
+ subsequently incorporated within the Work.
66
+
67
+ 2. Grant of Copyright License. Subject to the terms and conditions of
68
+ this License, each Contributor hereby grants to You a perpetual,
69
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
70
+ copyright license to reproduce, prepare Derivative Works of,
71
+ publicly display, publicly perform, sublicense, and distribute the
72
+ Work and such Derivative Works in Source or Object form.
73
+
74
+ 3. Grant of Patent License. Subject to the terms and conditions of
75
+ this License, each Contributor hereby grants to You a perpetual,
76
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
77
+ (except as stated in this section) patent license to make, have made,
78
+ use, offer to sell, sell, import, and otherwise transfer the Work,
79
+ where such license applies only to those patent claims licensable
80
+ by such Contributor that are necessarily infringed by their
81
+ Contribution(s) alone or by combination of their Contribution(s)
82
+ with the Work to which such Contribution(s) was submitted. If You
83
+ institute patent litigation against any entity (including a
84
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
85
+ or a Contribution incorporated within the Work constitutes direct
86
+ or contributory patent infringement, then any patent licenses
87
+ granted to You under this License for that Work shall terminate
88
+ as of the date such litigation is filed.
89
+
90
+ 4. Redistribution. You may reproduce and distribute copies of the
91
+ Work or Derivative Works thereof in any medium, with or without
92
+ modifications, and in Source or Object form, provided that You
93
+ meet the following conditions:
94
+
95
+ (a) You must give any other recipients of the Work or
96
+ Derivative Works a copy of this License; and
97
+
98
+ (b) You must cause any modified files to carry prominent notices
99
+ stating that You changed the files; and
100
+
101
+ (c) You must retain, in the Source form of any Derivative Works
102
+ that You distribute, all copyright, patent, trademark, and
103
+ attribution notices from the Source form of the Work,
104
+ excluding those notices that do not pertain to any part of
105
+ the Derivative Works; and
106
+
107
+ (d) If the Work includes a "NOTICE" text file as part of its
108
+ distribution, then any Derivative Works that You distribute must
109
+ include a readable copy of the attribution notices contained
110
+ within such NOTICE file, excluding those notices that do not
111
+ pertain to any part of the Derivative Works, in at least one
112
+ of the following places: within a NOTICE text file distributed
113
+ as part of the Derivative Works; within the Source form or
114
+ documentation, if provided along with the Derivative Works; or,
115
+ within a display generated by the Derivative Works, if and
116
+ wherever such third-party notices normally appear. The contents
117
+ of the NOTICE file are for informational purposes only and
118
+ do not modify the License. You may add Your own attribution
119
+ notices within Derivative Works that You distribute, alongside
120
+ or as an addendum to the NOTICE text from the Work, provided
121
+ that such additional attribution notices cannot be construed
122
+ as modifying the License.
123
+
124
+ You may add Your own copyright statement to Your modifications and
125
+ may provide additional or different license terms and conditions
126
+ for use, reproduction, or distribution of Your modifications, or
127
+ for any such Derivative Works as a whole, provided Your use,
128
+ reproduction, and distribution of the Work otherwise complies with
129
+ the conditions stated in this License.
130
+
131
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
132
+ any Contribution intentionally submitted for inclusion in the Work
133
+ by You to the Licensor shall be under the terms and conditions of
134
+ this License, without any additional terms or conditions.
135
+ Notwithstanding the above, nothing herein shall supersede or modify
136
+ the terms of any separate license agreement you may have executed
137
+ with Licensor regarding such Contributions.
138
+
139
+ 6. Trademarks. This License does not grant permission to use the trade
140
+ names, trademarks, service marks, or product names of the Licensor,
141
+ except as required for reasonable and customary use in describing the
142
+ origin of the Work and reproducing the content of the NOTICE file.
143
+
144
+ 7. Disclaimer of Warranty. Unless required by applicable law or
145
+ agreed to in writing, Licensor provides the Work (and each
146
+ Contributor provides its Contributions) on an "AS IS" BASIS,
147
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
148
+ implied, including, without limitation, any warranties or conditions
149
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
150
+ PARTICULAR PURPOSE. You are solely responsible for determining the
151
+ appropriateness of using or redistributing the Work and assume any
152
+ risks associated with Your exercise of permissions under this License.
153
+
154
+ 8. Limitation of Liability. In no event and under no legal theory,
155
+ whether in tort (including negligence), contract, or otherwise,
156
+ unless required by applicable law (such as deliberate and grossly
157
+ negligent acts) or agreed to in writing, shall any Contributor be
158
+ liable to You for damages, including any direct, indirect, special,
159
+ incidental, or consequential damages of any character arising as a
160
+ result of this License or out of the use or inability to use the
161
+ Work (including but not limited to damages for loss of goodwill,
162
+ work stoppage, computer failure or malfunction, or any and all
163
+ other commercial damages or losses), even if such Contributor
164
+ has been advised of the possibility of such damages.
165
+
166
+ 9. Accepting Warranty or Additional Liability. While redistributing
167
+ the Work or Derivative Works thereof, You may choose to offer,
168
+ and charge a fee for, acceptance of support, warranty, indemnity,
169
+ or other liability obligations and/or rights consistent with this
170
+ License. However, in accepting such obligations, You may act only
171
+ on Your own behalf and on Your sole responsibility, not on behalf
172
+ of any other Contributor, and only if You agree to indemnify,
173
+ defend, and hold each Contributor harmless for any liability
174
+ incurred by, or claims asserted against, such Contributor by reason
175
+ of your accepting any such warranty or additional liability.
176
+
177
+ END OF TERMS AND CONDITIONS
178
+
179
+ APPENDIX: How to apply the Apache License to your work.
180
+
181
+ To apply the Apache License to your work, attach the following
182
+ boilerplate notice, with the fields enclosed by brackets "[]"
183
+ replaced with your own identifying information. (Don't include
184
+ the brackets!) The text should be enclosed in the appropriate
185
+ comment syntax for the file format. We also recommend that a
186
+ file or class name and description of purpose be included on the
187
+ same "printed page" as the copyright notice for easier
188
+ identification within third-party archives.
189
+
190
+ Copyright [yyyy] [name of copyright owner]
191
+
192
+ Licensed under the Apache License, Version 2.0 (the "License");
193
+ you may not use this file except in compliance with the License.
194
+ You may obtain a copy of the License at
195
+
196
+ http://www.apache.org/licenses/LICENSE-2.0
197
+
198
+ Unless required by applicable law or agreed to in writing, software
199
+ distributed under the License is distributed on an "AS IS" BASIS,
200
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
201
+ See the License for the specific language governing permissions and
202
+ limitations under the License.
@@ -0,0 +1,42 @@
1
+ Metadata-Version: 2.5
2
+ Name: databay-cli
3
+ Version: 0.1.0
4
+ Summary: Databay SDK and the databay CLI, generated from the Databay client contract
5
+ Project-URL: Homepage, https://databurst.tech
6
+ Project-URL: Repository, https://github.com/data-burst/databay-clients
7
+ Project-URL: Changelog, https://github.com/data-burst/databay-clients/blob/main/python/CHANGELOG.md
8
+ License-Expression: Apache-2.0
9
+ License-File: LICENSE
10
+ Classifier: Operating System :: MacOS
11
+ Classifier: Operating System :: POSIX :: Linux
12
+ Classifier: Programming Language :: Python :: 3.12
13
+ Classifier: Programming Language :: Python :: 3.13
14
+ Requires-Python: >=3.12
15
+ Requires-Dist: click<9,>=8.1.7
16
+ Requires-Dist: httpx<1,>=0.27.2
17
+ Requires-Dist: keyring<26,>=25.5.0
18
+ Requires-Dist: platformdirs<5,>=4.3.6
19
+ Requires-Dist: pydantic<3,>=2.9.2
20
+ Requires-Dist: rich>=13.9.4
21
+ Description-Content-Type: text/markdown
22
+
23
+ # databay-cli
24
+
25
+ The SDK and the `databay` command for a [Databay](https://databurst.tech) server. The agent skill that
26
+ ships with it lets an agent such as Claude Code drive the server through the command.
27
+
28
+ Needs Python 3.12 or newer, on Linux or macOS. The package is `databay-cli`; the `databay` project on
29
+ PyPI is unrelated.
30
+
31
+ Until the first PyPI release, install it from the repository:
32
+
33
+ ```bash
34
+ uv tool install "git+https://github.com/data-burst/databay-clients#subdirectory=python"
35
+ databay login --server https://<host>
36
+ databay skill install --target claude
37
+ ```
38
+
39
+ Install, sign in and releases: [docs/cli.md](https://github.com/data-burst/databay-clients/blob/main/docs/cli.md).
40
+ Changes: [CHANGELOG.md](https://github.com/data-burst/databay-clients/blob/main/python/CHANGELOG.md).
41
+
42
+ Licensed under Apache-2.0: see the `LICENSE` file in the package.
@@ -0,0 +1,20 @@
1
+ # databay-cli
2
+
3
+ The SDK and the `databay` command for a [Databay](https://databurst.tech) server. The agent skill that
4
+ ships with it lets an agent such as Claude Code drive the server through the command.
5
+
6
+ Needs Python 3.12 or newer, on Linux or macOS. The package is `databay-cli`; the `databay` project on
7
+ PyPI is unrelated.
8
+
9
+ Until the first PyPI release, install it from the repository:
10
+
11
+ ```bash
12
+ uv tool install "git+https://github.com/data-burst/databay-clients#subdirectory=python"
13
+ databay login --server https://<host>
14
+ databay skill install --target claude
15
+ ```
16
+
17
+ Install, sign in and releases: [docs/cli.md](https://github.com/data-burst/databay-clients/blob/main/docs/cli.md).
18
+ Changes: [CHANGELOG.md](https://github.com/data-burst/databay-clients/blob/main/python/CHANGELOG.md).
19
+
20
+ Licensed under Apache-2.0: see the `LICENSE` file in the package.
@@ -0,0 +1,113 @@
1
+ [project]
2
+ name = "databay-cli"
3
+ version = "0.1.0"
4
+ description = "Databay SDK and the databay CLI, generated from the Databay client contract"
5
+ readme = "README.md"
6
+ requires-python = ">=3.12"
7
+ license = "Apache-2.0"
8
+ classifiers = [
9
+ "Operating System :: POSIX :: Linux",
10
+ "Operating System :: MacOS",
11
+ "Programming Language :: Python :: 3.12",
12
+ "Programming Language :: Python :: 3.13",
13
+ ]
14
+ dependencies = [
15
+ "click>=8.1.7,<9",
16
+ "httpx>=0.27.2,<1",
17
+ "keyring>=25.5.0,<26",
18
+ "platformdirs>=4.3.6,<5",
19
+ "pydantic>=2.9.2,<3",
20
+ "rich>=13.9.4",
21
+ ]
22
+
23
+ [project.urls]
24
+ Homepage = "https://databurst.tech"
25
+ Repository = "https://github.com/data-burst/databay-clients"
26
+ Changelog = "https://github.com/data-burst/databay-clients/blob/main/python/CHANGELOG.md"
27
+
28
+ [project.scripts]
29
+ databay = "databay.cli.main:main"
30
+
31
+ [dependency-groups]
32
+ dev = [
33
+ "pytest>=8.3.4",
34
+ "pyyaml>=6.0.2",
35
+ "ruff>=0.15.12",
36
+ ]
37
+
38
+ [build-system]
39
+ # Exact, so the wheel a tag publishes is built by the backend the PR was tested with.
40
+ requires = ["hatchling==1.32.4"]
41
+ build-backend = "hatchling.build"
42
+
43
+ [tool.hatch.build.targets.wheel]
44
+ packages = ["src/databay"]
45
+
46
+ # python-semantic-release, run by the release workflow from python/; see docs/cli.md.
47
+ [tool.semantic_release]
48
+ tag_format = "python/v{version}"
49
+ commit_message = "chore(release): databay-cli v{version} [skip ci]"
50
+ # Start at 0.x like the unreleased package: without it, the first release is 1.0.0.
51
+ allow_zero_version = true
52
+ # release_client.py owns the version: pyproject.toml, uv.lock and the generated version.py.
53
+ build_command = "python3 tools/release_client.py stamp \"$NEW_VERSION\""
54
+ # semantic-release stages these from the repository root, unlike the changelog, which it finds from python/.
55
+ assets = ["python/pyproject.toml", "python/uv.lock", "python/src/databay/version.py"]
56
+
57
+ [tool.semantic_release.changelog]
58
+ mode = "update"
59
+
60
+ [tool.semantic_release.changelog.default_templates]
61
+ # The first release would otherwise list every commit since the repository began.
62
+ mask_initial_release = true
63
+
64
+ [tool.pytest.ini_options]
65
+ testpaths = ["tests"]
66
+ addopts = "-ra"
67
+
68
+ [tool.ruff]
69
+ line-length = 120
70
+ # Generated by tools/gen_client.py; the regeneration check owns them.
71
+ extend-exclude = [
72
+ "src/databay/models",
73
+ "src/databay/operations",
74
+ "src/databay/resources",
75
+ "src/databay/cli/commands",
76
+ "src/databay/api.py",
77
+ "src/databay/spec.py",
78
+ "src/databay/error_codes.py",
79
+ "src/databay/version.py",
80
+ ]
81
+
82
+ [tool.ruff.lint]
83
+ select = ["ALL"]
84
+ ignore = [
85
+ "D1",
86
+ "D203",
87
+ "D211",
88
+ "D212",
89
+ "COM812",
90
+ "ISC001",
91
+ "EM101",
92
+ "EM102",
93
+ "TRY003",
94
+ "CPY001",
95
+ "S101",
96
+ "PLR0913",
97
+ "FBT001",
98
+ "FBT002",
99
+ # Docstrings say what a function returns ("The project ``op`` is sent for.").
100
+ "D401",
101
+ # The exception names are part of the SDK's API (DatabayServerUnavailable, DatabayResponseInvalid).
102
+ "N818",
103
+ "PLR0917",
104
+ "C901",
105
+ "PLR0912",
106
+ "PLR0915",
107
+ ]
108
+
109
+ [tool.ruff.lint.per-file-ignores]
110
+ # Command-line scripts run by path: they print their result, the type mapping returns early per case, and
111
+ # the generator imports the client's runtime modules only after registering the package namespace.
112
+ "tools/**" = ["T201", "INP001", "PLR0911", "PLC0415"]
113
+ "tests/**" = ["ANN", "D", "INP001", "PLR2004", "S105", "S106", "S603", "S607", "SLF001", "ARG001", "PT011", "PLC0415", "TC002", "TC003"]
@@ -0,0 +1,5 @@
1
+ """Databay SDK and CLI: ``from databay import Databay``."""
2
+
3
+ from .sdk import Databay
4
+
5
+ __all__ = ["Databay"]
@@ -0,0 +1,7 @@
1
+ """Run ``python -m databay`` like the ``databay`` command."""
2
+
3
+ import sys
4
+
5
+ from databay.cli.main import main
6
+
7
+ sys.exit(main())
@@ -0,0 +1,184 @@
1
+ """
2
+ The agent skill that ships in ``databay/skill/``: where each agent loads it, and installing it there.
3
+
4
+ The installed ``SKILL.md`` carries the CLI version in its frontmatter (``metadata``), so
5
+ ``databay status`` can tell a copy from another CLI version. Standard library only.
6
+ """
7
+
8
+ from __future__ import annotations
9
+
10
+ import re
11
+ import shutil
12
+ import uuid
13
+ from dataclasses import dataclass
14
+ from pathlib import Path
15
+ from typing import Literal
16
+
17
+ from databay.errors import DatabayError, DatabayUsageError
18
+
19
+ Scope = Literal["user", "project"]
20
+ SCOPES: tuple[Scope, ...] = ("user", "project")
21
+
22
+ #: Each supported agent's skills folder, under the home (user scope) or the working directory
23
+ #: (project scope). Codex reads ``~/.agents/skills`` and ``.agents/skills`` from the working
24
+ #: directory up to the project root (openai/codex ``codex-rs/ext/skills/src/host_roots.rs``).
25
+ TARGETS: dict[str, Path] = {"claude": Path(".claude") / "skills", "codex": Path(".agents") / "skills"}
26
+
27
+ SKILL_NAME = "databay"
28
+ VERSION_KEY = "databay-cli-version"
29
+ SOURCE = Path(__file__).resolve().parent / "skill"
30
+ _VERSION_LINE = re.compile(rf"^\s+{re.escape(VERSION_KEY)}:\s*\"?([^\"\s]+)\"?\s*$", re.MULTILINE)
31
+
32
+
33
+ @dataclass(frozen=True, slots=True)
34
+ class Installed:
35
+ """
36
+ A skill folder found at ``path``.
37
+
38
+ ``version`` is the CLI version its ``SKILL.md`` records; when it is ``None``, ``problem`` says
39
+ why (no ``SKILL.md``, unreadable, no frontmatter, or no version in it).
40
+ """
41
+
42
+ target: str
43
+ scope: Scope
44
+ path: Path
45
+ version: str | None
46
+ problem: str | None
47
+
48
+
49
+ def skill_dir(target: str, scope: Scope, *, home: Path, cwd: Path) -> Path:
50
+ """The folder ``target`` loads the skill from; an unknown target is ``unsupported_target``."""
51
+ if target not in TARGETS:
52
+ raise DatabayUsageError(
53
+ f"no skill format for target {target!r}; supported targets: {', '.join(TARGETS)}",
54
+ code="unsupported_target",
55
+ details={"target": target},
56
+ )
57
+ base = home if scope == "user" else cwd
58
+ return base / TARGETS[target] / SKILL_NAME
59
+
60
+
61
+ def _present(path: Path) -> bool:
62
+ """Something is at ``path``: a folder, a file or a symlink, broken or not."""
63
+ return path.exists() or path.is_symlink()
64
+
65
+
66
+ def _frontmatter_end(text: str) -> int | None:
67
+ """The index of the closing ``---`` line of ``text``'s frontmatter, or ``None`` when it has none."""
68
+ if not text.startswith("---\n"):
69
+ return None
70
+ end = text.find("\n---\n", 3)
71
+ return end if end >= 0 else None
72
+
73
+
74
+ def rendered_skill(version: str) -> str:
75
+ """The packaged ``SKILL.md`` with ``version`` added to its frontmatter as ``metadata.databay-cli-version``."""
76
+ path = SOURCE / "SKILL.md"
77
+ text = path.read_text(encoding="utf-8")
78
+ end = _frontmatter_end(text)
79
+ if end is None:
80
+ raise DatabayError(f"{path} has no --- frontmatter")
81
+ if re.search(r"^metadata:", text[:end], re.MULTILINE):
82
+ raise DatabayError(f"{path} declares metadata itself; the installer writes that block")
83
+ return f'{text[:end]}\nmetadata:\n {VERSION_KEY}: "{version}"{text[end:]}'
84
+
85
+
86
+ def read_installed(target: str, scope: Scope, path: Path) -> Installed:
87
+ """The copy at ``path``: the version its ``SKILL.md`` records, or the reason none could be read."""
88
+ skill = path / "SKILL.md"
89
+ try:
90
+ # CRLF is accepted: an editor on another platform may have rewritten the file.
91
+ text = skill.read_text(encoding="utf-8").replace("\r\n", "\n")
92
+ except FileNotFoundError:
93
+ return Installed(target, scope, path, None, f"{skill} does not exist")
94
+ except (OSError, UnicodeDecodeError) as exc:
95
+ return Installed(target, scope, path, None, f"{skill} cannot be read ({type(exc).__name__})")
96
+ end = _frontmatter_end(text)
97
+ if end is None:
98
+ return Installed(target, scope, path, None, f"{skill} has no --- frontmatter")
99
+ found = _VERSION_LINE.search(text[:end])
100
+ if found is None:
101
+ return Installed(target, scope, path, None, f"{skill} records no metadata.{VERSION_KEY}")
102
+ return Installed(target, scope, path, found.group(1), None)
103
+
104
+
105
+ def project_dirs(*, home: Path, cwd: Path) -> list[Path]:
106
+ """
107
+ ``cwd`` and its parents, where a project-scope copy may sit, nearest first.
108
+
109
+ The walk stops at the home: a copy there is the user-scope one.
110
+ """
111
+ found = []
112
+ for directory in [cwd, *cwd.parents]:
113
+ if directory == home or directory in home.parents:
114
+ break
115
+ found.append(directory)
116
+ return found
117
+
118
+
119
+ def find_installed(*, home: Path, cwd: Path) -> list[Installed]:
120
+ """Every installed copy: per target, the user one, then project ones from ``cwd`` up."""
121
+ bases: list[tuple[Scope, Path]] = [("user", home), *[("project", d) for d in project_dirs(home=home, cwd=cwd)]]
122
+ found = []
123
+ for target, folder in TARGETS.items():
124
+ for scope, base in bases:
125
+ path = base / folder / SKILL_NAME
126
+ if _present(path):
127
+ found.append(read_installed(target, scope, path))
128
+ return found
129
+
130
+
131
+ def install(
132
+ target: str, scope: Scope, *, force: bool, version: str, home: Path, cwd: Path
133
+ ) -> tuple[Path, Installed | None]:
134
+ """
135
+ Write the skill (``SKILL.md`` and ``references/``) where ``target`` loads it.
136
+
137
+ Returns the folder it wrote and the copy it replaced, if any. A copy from another version
138
+ (or of no readable version) is replaced only with ``force``; otherwise it is ``skill_exists``.
139
+ The new copy is staged beside the old one and swapped in; a failed swap puts the old one back.
140
+ """
141
+ destination = skill_dir(target, scope, home=home, cwd=cwd)
142
+ previous = read_installed(target, scope, destination) if _present(destination) else None
143
+ if previous is not None and previous.version != version and not force:
144
+ installed = previous.version or f"an unknown version ({previous.problem})"
145
+ raise DatabayUsageError(
146
+ f"{destination} holds the databay skill of CLI {installed}; this CLI is {version}",
147
+ code="skill_exists",
148
+ next_command=f"databay skill install --target {target} --scope {scope} --force",
149
+ details={"path": str(destination), "installed_version": previous.version, "cli_version": version},
150
+ )
151
+ staging = destination.parent / f".{SKILL_NAME}-new-{uuid.uuid4().hex}"
152
+ try:
153
+ destination.parent.mkdir(parents=True, exist_ok=True)
154
+ shutil.copytree(SOURCE / "references", staging / "references")
155
+ (staging / "SKILL.md").write_text(rendered_skill(version), encoding="utf-8")
156
+ _swap(staging, destination, has_previous=previous is not None)
157
+ except OSError as exc:
158
+ raise DatabayError(
159
+ f"could not write the skill to {destination}: {type(exc).__name__}: {exc.strerror or exc}",
160
+ code="skill_write_failed",
161
+ details={"path": str(destination)},
162
+ ) from None
163
+ finally:
164
+ if staging.exists():
165
+ shutil.rmtree(staging)
166
+ return destination, previous
167
+
168
+
169
+ def _swap(staging: Path, destination: Path, *, has_previous: bool) -> None:
170
+ """Move ``staging`` to ``destination``; the copy already there is moved aside first and removed after."""
171
+ if not has_previous:
172
+ staging.rename(destination)
173
+ return
174
+ aside = destination.parent / f".{SKILL_NAME}-old-{uuid.uuid4().hex}"
175
+ destination.rename(aside)
176
+ try:
177
+ staging.rename(destination)
178
+ except OSError:
179
+ aside.rename(destination)
180
+ raise
181
+ if aside.is_symlink() or not aside.is_dir():
182
+ aside.unlink()
183
+ return
184
+ shutil.rmtree(aside)