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.
- databay_cli-0.1.0/.gitignore +5 -0
- databay_cli-0.1.0/CHANGELOG.md +46 -0
- databay_cli-0.1.0/LICENSE +202 -0
- databay_cli-0.1.0/PKG-INFO +42 -0
- databay_cli-0.1.0/README.md +20 -0
- databay_cli-0.1.0/pyproject.toml +113 -0
- databay_cli-0.1.0/src/databay/__init__.py +5 -0
- databay_cli-0.1.0/src/databay/__main__.py +7 -0
- databay_cli-0.1.0/src/databay/agent_skill.py +184 -0
- databay_cli-0.1.0/src/databay/api.py +626 -0
- databay_cli-0.1.0/src/databay/cli/__init__.py +0 -0
- databay_cli-0.1.0/src/databay/cli/auth.py +377 -0
- databay_cli-0.1.0/src/databay/cli/build.py +89 -0
- databay_cli-0.1.0/src/databay/cli/commands/__init__.py +0 -0
- databay_cli-0.1.0/src/databay/cli/commands/alerting_webhook.py +19 -0
- databay_cli-0.1.0/src/databay/cli/commands/alerting_webhook_tag.py +14 -0
- databay_cli-0.1.0/src/databay/cli/commands/alerting_webhook_type.py +14 -0
- databay_cli-0.1.0/src/databay/cli/commands/alerting_webhook_undelivered.py +15 -0
- databay_cli-0.1.0/src/databay/cli/commands/announcement.py +17 -0
- databay_cli-0.1.0/src/databay/cli/commands/api_key.py +18 -0
- databay_cli-0.1.0/src/databay/cli/commands/api_key_project.py +16 -0
- databay_cli-0.1.0/src/databay/cli/commands/backfill_reason_code.py +14 -0
- databay_cli-0.1.0/src/databay/cli/commands/backfill_run.py +17 -0
- databay_cli-0.1.0/src/databay/cli/commands/canvas.py +16 -0
- databay_cli-0.1.0/src/databay/cli/commands/canvas_graph.py +15 -0
- databay_cli-0.1.0/src/databay/cli/commands/canvas_table_check.py +15 -0
- databay_cli-0.1.0/src/databay/cli/commands/dashboards.py +21 -0
- databay_cli-0.1.0/src/databay/cli/commands/dashboards_card.py +20 -0
- databay_cli-0.1.0/src/databay/cli/commands/dashboards_dataset.py +14 -0
- databay_cli-0.1.0/src/databay/cli/commands/dashboards_folder.py +16 -0
- databay_cli-0.1.0/src/databay/cli/commands/dashboards_home.py +17 -0
- databay_cli-0.1.0/src/databay/cli/commands/dashboards_placement.py +16 -0
- databay_cli-0.1.0/src/databay/cli/commands/db.py +19 -0
- databay_cli-0.1.0/src/databay/cli/commands/db_column.py +14 -0
- databay_cli-0.1.0/src/databay/cli/commands/docs_article.py +16 -0
- databay_cli-0.1.0/src/databay/cli/commands/dq_result.py +14 -0
- databay_cli-0.1.0/src/databay/cli/commands/dq_rule.py +16 -0
- databay_cli-0.1.0/src/databay/cli/commands/feature.py +14 -0
- databay_cli-0.1.0/src/databay/cli/commands/google_ads_source.py +14 -0
- databay_cli-0.1.0/src/databay/cli/commands/google_analytics_source.py +14 -0
- databay_cli-0.1.0/src/databay/cli/commands/instagram_account.py +14 -0
- databay_cli-0.1.0/src/databay/cli/commands/instagram_source.py +14 -0
- databay_cli-0.1.0/src/databay/cli/commands/linkedin_account.py +14 -0
- databay_cli-0.1.0/src/databay/cli/commands/linkedin_source.py +14 -0
- databay_cli-0.1.0/src/databay/cli/commands/me.py +14 -0
- databay_cli-0.1.0/src/databay/cli/commands/meta_ads_source.py +14 -0
- databay_cli-0.1.0/src/databay/cli/commands/metric_models.py +26 -0
- databay_cli-0.1.0/src/databay/cli/commands/metrics.py +14 -0
- databay_cli-0.1.0/src/databay/cli/commands/models.py +16 -0
- databay_cli-0.1.0/src/databay/cli/commands/nlq.py +15 -0
- databay_cli-0.1.0/src/databay/cli/commands/notebook_credential.py +16 -0
- databay_cli-0.1.0/src/databay/cli/commands/org.py +14 -0
- databay_cli-0.1.0/src/databay/cli/commands/org_member.py +17 -0
- databay_cli-0.1.0/src/databay/cli/commands/org_offboarding.py +14 -0
- databay_cli-0.1.0/src/databay/cli/commands/pipe.py +26 -0
- databay_cli-0.1.0/src/databay/cli/commands/pipe_backfill_run.py +14 -0
- databay_cli-0.1.0/src/databay/cli/commands/pipe_config_option.py +14 -0
- databay_cli-0.1.0/src/databay/cli/commands/pipe_destination.py +16 -0
- databay_cli-0.1.0/src/databay/cli/commands/pipe_leftover.py +16 -0
- databay_cli-0.1.0/src/databay/cli/commands/pipe_sink_type.py +14 -0
- databay_cli-0.1.0/src/databay/cli/commands/pipe_source_type.py +14 -0
- databay_cli-0.1.0/src/databay/cli/commands/pipe_status_bucket.py +14 -0
- databay_cli-0.1.0/src/databay/cli/commands/pipe_stuck_delete.py +14 -0
- databay_cli-0.1.0/src/databay/cli/commands/plan.py +14 -0
- databay_cli-0.1.0/src/databay/cli/commands/project.py +21 -0
- databay_cli-0.1.0/src/databay/cli/commands/project_budget.py +15 -0
- databay_cli-0.1.0/src/databay/cli/commands/project_member.py +18 -0
- databay_cli-0.1.0/src/databay/cli/commands/project_privilege.py +16 -0
- databay_cli-0.1.0/src/databay/cli/commands/project_share.py +16 -0
- databay_cli-0.1.0/src/databay/cli/commands/provision.py +14 -0
- databay_cli-0.1.0/src/databay/cli/commands/provisioning.py +14 -0
- databay_cli-0.1.0/src/databay/cli/commands/registry.py +14 -0
- databay_cli-0.1.0/src/databay/cli/commands/resource_home.py +14 -0
- databay_cli-0.1.0/src/databay/cli/commands/schema_change.py +18 -0
- databay_cli-0.1.0/src/databay/cli/commands/schema_history.py +17 -0
- databay_cli-0.1.0/src/databay/cli/commands/schema_version.py +16 -0
- databay_cli-0.1.0/src/databay/cli/commands/shopify_store.py +14 -0
- databay_cli-0.1.0/src/databay/cli/commands/sink_data_type.py +14 -0
- databay_cli-0.1.0/src/databay/cli/commands/source.py +24 -0
- databay_cli-0.1.0/src/databay/cli/commands/source_catalog.py +15 -0
- databay_cli-0.1.0/src/databay/cli/commands/source_check_run.py +17 -0
- databay_cli-0.1.0/src/databay/cli/commands/source_hidden_type.py +14 -0
- databay_cli-0.1.0/src/databay/cli/commands/source_name.py +14 -0
- databay_cli-0.1.0/src/databay/cli/commands/source_pipe.py +14 -0
- databay_cli-0.1.0/src/databay/cli/commands/source_publication.py +16 -0
- databay_cli-0.1.0/src/databay/cli/commands/source_readiness_override.py +15 -0
- databay_cli-0.1.0/src/databay/cli/commands/source_setup_choice.py +16 -0
- databay_cli-0.1.0/src/databay/cli/commands/source_stream.py +15 -0
- databay_cli-0.1.0/src/databay/cli/commands/source_table.py +14 -0
- databay_cli-0.1.0/src/databay/cli/commands/ssbi_job.py +18 -0
- databay_cli-0.1.0/src/databay/cli/commands/transform_type.py +14 -0
- databay_cli-0.1.0/src/databay/cli/commands/usage.py +14 -0
- databay_cli-0.1.0/src/databay/cli/commands/warehouse.py +21 -0
- databay_cli-0.1.0/src/databay/cli/commands/warehouse_access_assignment.py +16 -0
- databay_cli-0.1.0/src/databay/cli/commands/warehouse_access_role.py +22 -0
- databay_cli-0.1.0/src/databay/cli/commands/warehouse_access_settings.py +17 -0
- databay_cli-0.1.0/src/databay/cli/commands/warehouse_login.py +20 -0
- databay_cli-0.1.0/src/databay/cli/commands/warehouse_principal.py +17 -0
- databay_cli-0.1.0/src/databay/cli/commands/warehouse_service_account.py +17 -0
- databay_cli-0.1.0/src/databay/cli/commands/warehouse_service_account_credential.py +18 -0
- databay_cli-0.1.0/src/databay/cli/common.py +93 -0
- databay_cli-0.1.0/src/databay/cli/console.py +121 -0
- databay_cli-0.1.0/src/databay/cli/flags.py +183 -0
- databay_cli-0.1.0/src/databay/cli/handwritten.py +22 -0
- databay_cli-0.1.0/src/databay/cli/main.py +198 -0
- databay_cli-0.1.0/src/databay/cli/metrics.py +171 -0
- databay_cli-0.1.0/src/databay/cli/org.py +193 -0
- databay_cli-0.1.0/src/databay/cli/output.py +134 -0
- databay_cli-0.1.0/src/databay/cli/pipe_wait.py +357 -0
- databay_cli-0.1.0/src/databay/cli/profile.py +230 -0
- databay_cli-0.1.0/src/databay/cli/runner.py +432 -0
- databay_cli-0.1.0/src/databay/cli/skill.py +64 -0
- databay_cli-0.1.0/src/databay/cli/sql.py +84 -0
- databay_cli-0.1.0/src/databay/compat.py +161 -0
- databay_cli-0.1.0/src/databay/credentials.py +217 -0
- databay_cli-0.1.0/src/databay/error_catalog.py +226 -0
- databay_cli-0.1.0/src/databay/error_codes.py +3265 -0
- databay_cli-0.1.0/src/databay/errors.py +222 -0
- databay_cli-0.1.0/src/databay/feature_header.py +40 -0
- databay_cli-0.1.0/src/databay/invoke.py +225 -0
- databay_cli-0.1.0/src/databay/locks.py +41 -0
- databay_cli-0.1.0/src/databay/login_flow.py +245 -0
- databay_cli-0.1.0/src/databay/model_base.py +40 -0
- databay_cli-0.1.0/src/databay/models/__init__.py +0 -0
- databay_cli-0.1.0/src/databay/models/alerting_webhook.py +46 -0
- databay_cli-0.1.0/src/databay/models/alerting_webhook_tag.py +11 -0
- databay_cli-0.1.0/src/databay/models/alerting_webhook_type.py +11 -0
- databay_cli-0.1.0/src/databay/models/alerting_webhook_undelivered.py +23 -0
- databay_cli-0.1.0/src/databay/models/announcement.py +37 -0
- databay_cli-0.1.0/src/databay/models/api_key.py +81 -0
- databay_cli-0.1.0/src/databay/models/api_key_project.py +29 -0
- databay_cli-0.1.0/src/databay/models/backfill_reason_code.py +11 -0
- databay_cli-0.1.0/src/databay/models/backfill_run.py +41 -0
- databay_cli-0.1.0/src/databay/models/canvas.py +68 -0
- databay_cli-0.1.0/src/databay/models/canvas_graph.py +86 -0
- databay_cli-0.1.0/src/databay/models/canvas_table_check.py +181 -0
- databay_cli-0.1.0/src/databay/models/dashboards.py +79 -0
- databay_cli-0.1.0/src/databay/models/dashboards_card.py +37 -0
- databay_cli-0.1.0/src/databay/models/dashboards_dataset.py +27 -0
- databay_cli-0.1.0/src/databay/models/dashboards_folder.py +18 -0
- databay_cli-0.1.0/src/databay/models/dashboards_home.py +28 -0
- databay_cli-0.1.0/src/databay/models/db.py +34 -0
- databay_cli-0.1.0/src/databay/models/db_column.py +11 -0
- databay_cli-0.1.0/src/databay/models/docs_article.py +59 -0
- databay_cli-0.1.0/src/databay/models/dq_result.py +27 -0
- databay_cli-0.1.0/src/databay/models/dq_rule.py +43 -0
- databay_cli-0.1.0/src/databay/models/feature.py +15 -0
- databay_cli-0.1.0/src/databay/models/google_ads_source.py +11 -0
- databay_cli-0.1.0/src/databay/models/google_analytics_source.py +11 -0
- databay_cli-0.1.0/src/databay/models/instagram_source.py +11 -0
- databay_cli-0.1.0/src/databay/models/linkedin_source.py +11 -0
- databay_cli-0.1.0/src/databay/models/me.py +71 -0
- databay_cli-0.1.0/src/databay/models/meta_ads_source.py +11 -0
- databay_cli-0.1.0/src/databay/models/metric_models.py +274 -0
- databay_cli-0.1.0/src/databay/models/metrics.py +158 -0
- databay_cli-0.1.0/src/databay/models/models.py +73 -0
- databay_cli-0.1.0/src/databay/models/nlq.py +92 -0
- databay_cli-0.1.0/src/databay/models/notebook_credential.py +51 -0
- databay_cli-0.1.0/src/databay/models/org.py +44 -0
- databay_cli-0.1.0/src/databay/models/org_member.py +123 -0
- databay_cli-0.1.0/src/databay/models/org_offboarding.py +36 -0
- databay_cli-0.1.0/src/databay/models/pipe.py +340 -0
- databay_cli-0.1.0/src/databay/models/pipe_config_option.py +25 -0
- databay_cli-0.1.0/src/databay/models/pipe_destination.py +128 -0
- databay_cli-0.1.0/src/databay/models/pipe_leftover.py +51 -0
- databay_cli-0.1.0/src/databay/models/pipe_sink_type.py +11 -0
- databay_cli-0.1.0/src/databay/models/pipe_source_type.py +11 -0
- databay_cli-0.1.0/src/databay/models/pipe_status_bucket.py +13 -0
- databay_cli-0.1.0/src/databay/models/pipe_stuck_delete.py +25 -0
- databay_cli-0.1.0/src/databay/models/plan.py +37 -0
- databay_cli-0.1.0/src/databay/models/project.py +154 -0
- databay_cli-0.1.0/src/databay/models/project_budget.py +22 -0
- databay_cli-0.1.0/src/databay/models/project_member.py +67 -0
- databay_cli-0.1.0/src/databay/models/project_privilege.py +21 -0
- databay_cli-0.1.0/src/databay/models/project_share.py +76 -0
- databay_cli-0.1.0/src/databay/models/provision.py +12 -0
- databay_cli-0.1.0/src/databay/models/provisioning.py +20 -0
- databay_cli-0.1.0/src/databay/models/registry.py +18 -0
- databay_cli-0.1.0/src/databay/models/resource_home.py +35 -0
- databay_cli-0.1.0/src/databay/models/schema_change.py +96 -0
- databay_cli-0.1.0/src/databay/models/schema_history.py +32 -0
- databay_cli-0.1.0/src/databay/models/schema_version.py +23 -0
- databay_cli-0.1.0/src/databay/models/shared.py +875 -0
- databay_cli-0.1.0/src/databay/models/shopify_store.py +19 -0
- databay_cli-0.1.0/src/databay/models/sink_data_type.py +11 -0
- databay_cli-0.1.0/src/databay/models/source.py +263 -0
- databay_cli-0.1.0/src/databay/models/source_catalog.py +82 -0
- databay_cli-0.1.0/src/databay/models/source_check_run.py +63 -0
- databay_cli-0.1.0/src/databay/models/source_hidden_type.py +13 -0
- databay_cli-0.1.0/src/databay/models/source_name.py +18 -0
- databay_cli-0.1.0/src/databay/models/source_pipe.py +16 -0
- databay_cli-0.1.0/src/databay/models/source_publication.py +30 -0
- databay_cli-0.1.0/src/databay/models/source_readiness_override.py +13 -0
- databay_cli-0.1.0/src/databay/models/source_setup_choice.py +33 -0
- databay_cli-0.1.0/src/databay/models/source_stream.py +65 -0
- databay_cli-0.1.0/src/databay/models/source_table.py +27 -0
- databay_cli-0.1.0/src/databay/models/sql.py +31 -0
- databay_cli-0.1.0/src/databay/models/ssbi_job.py +97 -0
- databay_cli-0.1.0/src/databay/models/transform_type.py +40 -0
- databay_cli-0.1.0/src/databay/models/usage.py +112 -0
- databay_cli-0.1.0/src/databay/models/warehouse.py +38 -0
- databay_cli-0.1.0/src/databay/models/warehouse_access_assignment.py +70 -0
- databay_cli-0.1.0/src/databay/models/warehouse_access_role.py +148 -0
- databay_cli-0.1.0/src/databay/models/warehouse_access_settings.py +35 -0
- databay_cli-0.1.0/src/databay/models/warehouse_login.py +20 -0
- databay_cli-0.1.0/src/databay/models/warehouse_principal.py +49 -0
- databay_cli-0.1.0/src/databay/models/warehouse_service_account.py +35 -0
- databay_cli-0.1.0/src/databay/models/warehouse_service_account_credential.py +11 -0
- databay_cli-0.1.0/src/databay/oidc.py +205 -0
- databay_cli-0.1.0/src/databay/operation.py +191 -0
- databay_cli-0.1.0/src/databay/operations/__init__.py +0 -0
- databay_cli-0.1.0/src/databay/operations/alerting_webhook.py +317 -0
- databay_cli-0.1.0/src/databay/operations/alerting_webhook_tag.py +35 -0
- databay_cli-0.1.0/src/databay/operations/alerting_webhook_type.py +35 -0
- databay_cli-0.1.0/src/databay/operations/alerting_webhook_undelivered.py +74 -0
- databay_cli-0.1.0/src/databay/operations/announcement.py +135 -0
- databay_cli-0.1.0/src/databay/operations/api_key.py +198 -0
- databay_cli-0.1.0/src/databay/operations/api_key_project.py +130 -0
- databay_cli-0.1.0/src/databay/operations/backfill_reason_code.py +35 -0
- databay_cli-0.1.0/src/databay/operations/backfill_run.py +245 -0
- databay_cli-0.1.0/src/databay/operations/canvas.py +136 -0
- databay_cli-0.1.0/src/databay/operations/canvas_graph.py +102 -0
- databay_cli-0.1.0/src/databay/operations/canvas_table_check.py +101 -0
- databay_cli-0.1.0/src/databay/operations/dashboards.py +441 -0
- databay_cli-0.1.0/src/databay/operations/dashboards_card.py +406 -0
- databay_cli-0.1.0/src/databay/operations/dashboards_dataset.py +50 -0
- databay_cli-0.1.0/src/databay/operations/dashboards_folder.py +146 -0
- databay_cli-0.1.0/src/databay/operations/dashboards_home.py +176 -0
- databay_cli-0.1.0/src/databay/operations/dashboards_placement.py +152 -0
- databay_cli-0.1.0/src/databay/operations/db.py +337 -0
- databay_cli-0.1.0/src/databay/operations/db_column.py +57 -0
- databay_cli-0.1.0/src/databay/operations/docs_article.py +101 -0
- databay_cli-0.1.0/src/databay/operations/dq_result.py +43 -0
- databay_cli-0.1.0/src/databay/operations/dq_rule.py +155 -0
- databay_cli-0.1.0/src/databay/operations/feature.py +35 -0
- databay_cli-0.1.0/src/databay/operations/google_ads_source.py +40 -0
- databay_cli-0.1.0/src/databay/operations/google_analytics_source.py +40 -0
- databay_cli-0.1.0/src/databay/operations/instagram_account.py +47 -0
- databay_cli-0.1.0/src/databay/operations/instagram_source.py +40 -0
- databay_cli-0.1.0/src/databay/operations/linkedin_account.py +47 -0
- databay_cli-0.1.0/src/databay/operations/linkedin_source.py +40 -0
- databay_cli-0.1.0/src/databay/operations/me.py +57 -0
- databay_cli-0.1.0/src/databay/operations/meta_ads_source.py +40 -0
- databay_cli-0.1.0/src/databay/operations/metric_models.py +612 -0
- databay_cli-0.1.0/src/databay/operations/metrics.py +218 -0
- databay_cli-0.1.0/src/databay/operations/models.py +123 -0
- databay_cli-0.1.0/src/databay/operations/nlq.py +100 -0
- databay_cli-0.1.0/src/databay/operations/notebook_credential.py +95 -0
- databay_cli-0.1.0/src/databay/operations/org.py +79 -0
- databay_cli-0.1.0/src/databay/operations/org_member.py +192 -0
- databay_cli-0.1.0/src/databay/operations/org_offboarding.py +43 -0
- databay_cli-0.1.0/src/databay/operations/pipe.py +882 -0
- databay_cli-0.1.0/src/databay/operations/pipe_backfill_run.py +72 -0
- databay_cli-0.1.0/src/databay/operations/pipe_config_option.py +50 -0
- databay_cli-0.1.0/src/databay/operations/pipe_destination.py +178 -0
- databay_cli-0.1.0/src/databay/operations/pipe_leftover.py +110 -0
- databay_cli-0.1.0/src/databay/operations/pipe_sink_type.py +35 -0
- databay_cli-0.1.0/src/databay/operations/pipe_source_type.py +35 -0
- databay_cli-0.1.0/src/databay/operations/pipe_status_bucket.py +35 -0
- databay_cli-0.1.0/src/databay/operations/pipe_stuck_delete.py +52 -0
- databay_cli-0.1.0/src/databay/operations/plan.py +35 -0
- databay_cli-0.1.0/src/databay/operations/project.py +346 -0
- databay_cli-0.1.0/src/databay/operations/project_budget.py +135 -0
- databay_cli-0.1.0/src/databay/operations/project_member.py +226 -0
- databay_cli-0.1.0/src/databay/operations/project_privilege.py +143 -0
- databay_cli-0.1.0/src/databay/operations/project_share.py +160 -0
- databay_cli-0.1.0/src/databay/operations/provision.py +35 -0
- databay_cli-0.1.0/src/databay/operations/provisioning.py +35 -0
- databay_cli-0.1.0/src/databay/operations/registry.py +35 -0
- databay_cli-0.1.0/src/databay/operations/resource_home.py +80 -0
- databay_cli-0.1.0/src/databay/operations/schema_change.py +222 -0
- databay_cli-0.1.0/src/databay/operations/schema_history.py +136 -0
- databay_cli-0.1.0/src/databay/operations/schema_version.py +115 -0
- databay_cli-0.1.0/src/databay/operations/shopify_store.py +40 -0
- databay_cli-0.1.0/src/databay/operations/sink_data_type.py +43 -0
- databay_cli-0.1.0/src/databay/operations/source.py +1207 -0
- databay_cli-0.1.0/src/databay/operations/source_catalog.py +135 -0
- databay_cli-0.1.0/src/databay/operations/source_check_run.py +242 -0
- databay_cli-0.1.0/src/databay/operations/source_hidden_type.py +59 -0
- databay_cli-0.1.0/src/databay/operations/source_name.py +69 -0
- databay_cli-0.1.0/src/databay/operations/source_pipe.py +57 -0
- databay_cli-0.1.0/src/databay/operations/source_publication.py +139 -0
- databay_cli-0.1.0/src/databay/operations/source_readiness_override.py +96 -0
- databay_cli-0.1.0/src/databay/operations/source_setup_choice.py +161 -0
- databay_cli-0.1.0/src/databay/operations/source_stream.py +99 -0
- databay_cli-0.1.0/src/databay/operations/source_table.py +59 -0
- databay_cli-0.1.0/src/databay/operations/sql.py +54 -0
- databay_cli-0.1.0/src/databay/operations/ssbi_job.py +242 -0
- databay_cli-0.1.0/src/databay/operations/transform_type.py +35 -0
- databay_cli-0.1.0/src/databay/operations/usage.py +35 -0
- databay_cli-0.1.0/src/databay/operations/warehouse.py +343 -0
- databay_cli-0.1.0/src/databay/operations/warehouse_access_assignment.py +179 -0
- databay_cli-0.1.0/src/databay/operations/warehouse_access_role.py +473 -0
- databay_cli-0.1.0/src/databay/operations/warehouse_access_settings.py +172 -0
- databay_cli-0.1.0/src/databay/operations/warehouse_login.py +308 -0
- databay_cli-0.1.0/src/databay/operations/warehouse_principal.py +174 -0
- databay_cli-0.1.0/src/databay/operations/warehouse_service_account.py +206 -0
- databay_cli-0.1.0/src/databay/operations/warehouse_service_account_credential.py +285 -0
- databay_cli-0.1.0/src/databay/paths.py +32 -0
- databay_cli-0.1.0/src/databay/platform_check.py +20 -0
- databay_cli-0.1.0/src/databay/profiles.py +181 -0
- databay_cli-0.1.0/src/databay/redact.py +22 -0
- databay_cli-0.1.0/src/databay/reference.py +218 -0
- databay_cli-0.1.0/src/databay/resource.py +167 -0
- databay_cli-0.1.0/src/databay/resources/__init__.py +0 -0
- databay_cli-0.1.0/src/databay/resources/alerting_webhook.py +84 -0
- databay_cli-0.1.0/src/databay/resources/alerting_webhook_tag.py +21 -0
- databay_cli-0.1.0/src/databay/resources/alerting_webhook_type.py +21 -0
- databay_cli-0.1.0/src/databay/resources/alerting_webhook_undelivered.py +35 -0
- databay_cli-0.1.0/src/databay/resources/announcement.py +45 -0
- databay_cli-0.1.0/src/databay/resources/api_key.py +56 -0
- databay_cli-0.1.0/src/databay/resources/api_key_project.py +47 -0
- databay_cli-0.1.0/src/databay/resources/backfill_reason_code.py +21 -0
- databay_cli-0.1.0/src/databay/resources/backfill_run.py +78 -0
- databay_cli-0.1.0/src/databay/resources/canvas.py +43 -0
- databay_cli-0.1.0/src/databay/resources/canvas_graph.py +38 -0
- databay_cli-0.1.0/src/databay/resources/canvas_table_check.py +38 -0
- databay_cli-0.1.0/src/databay/resources/dashboards.py +105 -0
- databay_cli-0.1.0/src/databay/resources/dashboards_card.py +97 -0
- databay_cli-0.1.0/src/databay/resources/dashboards_dataset.py +27 -0
- databay_cli-0.1.0/src/databay/resources/dashboards_folder.py +47 -0
- databay_cli-0.1.0/src/databay/resources/dashboards_home.py +59 -0
- databay_cli-0.1.0/src/databay/resources/dashboards_placement.py +47 -0
- databay_cli-0.1.0/src/databay/resources/db.py +87 -0
- databay_cli-0.1.0/src/databay/resources/db_column.py +28 -0
- databay_cli-0.1.0/src/databay/resources/docs_article.py +37 -0
- databay_cli-0.1.0/src/databay/resources/dq_result.py +25 -0
- databay_cli-0.1.0/src/databay/resources/dq_rule.py +48 -0
- databay_cli-0.1.0/src/databay/resources/feature.py +21 -0
- databay_cli-0.1.0/src/databay/resources/google_ads_source.py +25 -0
- databay_cli-0.1.0/src/databay/resources/google_analytics_source.py +25 -0
- databay_cli-0.1.0/src/databay/resources/instagram_account.py +27 -0
- databay_cli-0.1.0/src/databay/resources/instagram_source.py +25 -0
- databay_cli-0.1.0/src/databay/resources/linkedin_account.py +27 -0
- databay_cli-0.1.0/src/databay/resources/linkedin_source.py +25 -0
- databay_cli-0.1.0/src/databay/resources/me.py +27 -0
- databay_cli-0.1.0/src/databay/resources/meta_ads_source.py +25 -0
- databay_cli-0.1.0/src/databay/resources/metric_models.py +154 -0
- databay_cli-0.1.0/src/databay/resources/metrics.py +57 -0
- databay_cli-0.1.0/src/databay/resources/models.py +42 -0
- databay_cli-0.1.0/src/databay/resources/nlq.py +34 -0
- databay_cli-0.1.0/src/databay/resources/notebook_credential.py +41 -0
- databay_cli-0.1.0/src/databay/resources/org.py +29 -0
- databay_cli-0.1.0/src/databay/resources/org_member.py +53 -0
- databay_cli-0.1.0/src/databay/resources/org_offboarding.py +25 -0
- databay_cli-0.1.0/src/databay/resources/pipe.py +208 -0
- databay_cli-0.1.0/src/databay/resources/pipe_backfill_run.py +28 -0
- databay_cli-0.1.0/src/databay/resources/pipe_config_option.py +26 -0
- databay_cli-0.1.0/src/databay/resources/pipe_destination.py +49 -0
- databay_cli-0.1.0/src/databay/resources/pipe_leftover.py +42 -0
- databay_cli-0.1.0/src/databay/resources/pipe_sink_type.py +21 -0
- databay_cli-0.1.0/src/databay/resources/pipe_source_type.py +21 -0
- databay_cli-0.1.0/src/databay/resources/pipe_status_bucket.py +21 -0
- databay_cli-0.1.0/src/databay/resources/pipe_stuck_delete.py +27 -0
- databay_cli-0.1.0/src/databay/resources/plan.py +21 -0
- databay_cli-0.1.0/src/databay/resources/project.py +92 -0
- databay_cli-0.1.0/src/databay/resources/project_budget.py +38 -0
- databay_cli-0.1.0/src/databay/resources/project_member.py +68 -0
- databay_cli-0.1.0/src/databay/resources/project_privilege.py +48 -0
- databay_cli-0.1.0/src/databay/resources/project_share.py +47 -0
- databay_cli-0.1.0/src/databay/resources/provision.py +21 -0
- databay_cli-0.1.0/src/databay/resources/provisioning.py +21 -0
- databay_cli-0.1.0/src/databay/resources/registry.py +21 -0
- databay_cli-0.1.0/src/databay/resources/resource_home.py +29 -0
- databay_cli-0.1.0/src/databay/resources/schema_change.py +62 -0
- databay_cli-0.1.0/src/databay/resources/schema_history.py +52 -0
- databay_cli-0.1.0/src/databay/resources/schema_version.py +43 -0
- databay_cli-0.1.0/src/databay/resources/shopify_store.py +25 -0
- databay_cli-0.1.0/src/databay/resources/sink_data_type.py +25 -0
- databay_cli-0.1.0/src/databay/resources/source.py +132 -0
- databay_cli-0.1.0/src/databay/resources/source_catalog.py +34 -0
- databay_cli-0.1.0/src/databay/resources/source_check_run.py +67 -0
- databay_cli-0.1.0/src/databay/resources/source_hidden_type.py +25 -0
- databay_cli-0.1.0/src/databay/resources/source_name.py +27 -0
- databay_cli-0.1.0/src/databay/resources/source_pipe.py +28 -0
- databay_cli-0.1.0/src/databay/resources/source_publication.py +47 -0
- databay_cli-0.1.0/src/databay/resources/source_readiness_override.py +37 -0
- databay_cli-0.1.0/src/databay/resources/source_setup_choice.py +50 -0
- databay_cli-0.1.0/src/databay/resources/source_stream.py +38 -0
- databay_cli-0.1.0/src/databay/resources/source_table.py +27 -0
- databay_cli-0.1.0/src/databay/resources/sql.py +27 -0
- databay_cli-0.1.0/src/databay/resources/ssbi_job.py +69 -0
- databay_cli-0.1.0/src/databay/resources/transform_type.py +21 -0
- databay_cli-0.1.0/src/databay/resources/usage.py +21 -0
- databay_cli-0.1.0/src/databay/resources/warehouse.py +136 -0
- databay_cli-0.1.0/src/databay/resources/warehouse_access_assignment.py +51 -0
- databay_cli-0.1.0/src/databay/resources/warehouse_access_role.py +118 -0
- databay_cli-0.1.0/src/databay/resources/warehouse_access_settings.py +56 -0
- databay_cli-0.1.0/src/databay/resources/warehouse_login.py +81 -0
- databay_cli-0.1.0/src/databay/resources/warehouse_principal.py +51 -0
- databay_cli-0.1.0/src/databay/resources/warehouse_service_account.py +61 -0
- databay_cli-0.1.0/src/databay/resources/warehouse_service_account_credential.py +78 -0
- databay_cli-0.1.0/src/databay/sdk.py +77 -0
- databay_cli-0.1.0/src/databay/settings.py +90 -0
- databay_cli-0.1.0/src/databay/skill/SKILL.md +357 -0
- databay_cli-0.1.0/src/databay/skill/references/commands.md +7025 -0
- databay_cli-0.1.0/src/databay/skill/references/errors.md +727 -0
- databay_cli-0.1.0/src/databay/spec.py +362 -0
- databay_cli-0.1.0/src/databay/stored_token.py +134 -0
- databay_cli-0.1.0/src/databay/tokens.py +108 -0
- databay_cli-0.1.0/src/databay/transport.py +357 -0
- databay_cli-0.1.0/src/databay/update_check.py +151 -0
- databay_cli-0.1.0/src/databay/version.py +6 -0
- databay_cli-0.1.0/src/databay/waits.py +330 -0
- databay_cli-0.1.0/tests/cli_parse.py +62 -0
- databay_cli-0.1.0/tests/conftest.py +214 -0
- databay_cli-0.1.0/tests/test_cli.py +630 -0
- databay_cli-0.1.0/tests/test_contract_reader.py +135 -0
- databay_cli-0.1.0/tests/test_dashboards.py +216 -0
- databay_cli-0.1.0/tests/test_errors.py +279 -0
- databay_cli-0.1.0/tests/test_examples.py +54 -0
- databay_cli-0.1.0/tests/test_generator.py +340 -0
- databay_cli-0.1.0/tests/test_handwritten.py +217 -0
- databay_cli-0.1.0/tests/test_login.py +453 -0
- databay_cli-0.1.0/tests/test_metrics.py +325 -0
- databay_cli-0.1.0/tests/test_org.py +307 -0
- databay_cli-0.1.0/tests/test_pipe_wait.py +751 -0
- databay_cli-0.1.0/tests/test_release_client.py +322 -0
- databay_cli-0.1.0/tests/test_retries.py +135 -0
- databay_cli-0.1.0/tests/test_schema_change.py +45 -0
- databay_cli-0.1.0/tests/test_skill.py +320 -0
- databay_cli-0.1.0/tests/test_source_create.py +249 -0
- databay_cli-0.1.0/tests/test_startup.py +49 -0
- databay_cli-0.1.0/tests/test_tokens.py +424 -0
- databay_cli-0.1.0/tests/test_update_check.py +212 -0
- databay_cli-0.1.0/tests/test_waits.py +512 -0
- databay_cli-0.1.0/tools/contract.py +157 -0
- databay_cli-0.1.0/tools/gen_client.py +1257 -0
- databay_cli-0.1.0/tools/release_client.py +150 -0
- databay_cli-0.1.0/tools/smoke_client_wheel.sh +45 -0
- databay_cli-0.1.0/uv.lock +652 -0
|
@@ -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,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)
|