harbor-framework-client 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.
- harbor_framework_client-0.1.0/LICENSE +201 -0
- harbor_framework_client-0.1.0/MANIFEST.in +1 -0
- harbor_framework_client-0.1.0/PKG-INFO +134 -0
- harbor_framework_client-0.1.0/README.md +107 -0
- harbor_framework_client-0.1.0/pyproject.toml +38 -0
- harbor_framework_client-0.1.0/setup.cfg +4 -0
- harbor_framework_client-0.1.0/setup.py +75 -0
- harbor_framework_client-0.1.0/src/harbor_client/__init__.py +49 -0
- harbor_framework_client-0.1.0/src/harbor_client/_openapi.json.gz +0 -0
- harbor_framework_client-0.1.0/src/harbor_client/account/__init__.py +3 -0
- harbor_framework_client-0.1.0/src/harbor_client/account/client.py +236 -0
- harbor_framework_client-0.1.0/src/harbor_client/agents/__init__.py +3 -0
- harbor_framework_client-0.1.0/src/harbor_client/agents/client.py +230 -0
- harbor_framework_client-0.1.0/src/harbor_client/api_keys/__init__.py +3 -0
- harbor_framework_client-0.1.0/src/harbor_client/api_keys/client.py +457 -0
- harbor_framework_client-0.1.0/src/harbor_client/api_keys/types/__init__.py +13 -0
- harbor_framework_client-0.1.0/src/harbor_client/api_keys/types/api_keys_list_bad_request_response.py +13 -0
- harbor_framework_client-0.1.0/src/harbor_client/base_client.py +912 -0
- harbor_framework_client-0.1.0/src/harbor_client/client.py +207 -0
- harbor_framework_client-0.1.0/src/harbor_client/core/__init__.py +20 -0
- harbor_framework_client-0.1.0/src/harbor_client/core/api_error.py +3 -0
- harbor_framework_client-0.1.0/src/harbor_client/core/client_wrapper.py +73 -0
- harbor_framework_client-0.1.0/src/harbor_client/core/file.py +57 -0
- harbor_framework_client-0.1.0/src/harbor_client/core/http_response.py +5 -0
- harbor_framework_client-0.1.0/src/harbor_client/core/httpx_session.py +136 -0
- harbor_framework_client-0.1.0/src/harbor_client/core/jsonable_encoder.py +52 -0
- harbor_framework_client-0.1.0/src/harbor_client/core/remove_none_from_dict.py +5 -0
- harbor_framework_client-0.1.0/src/harbor_client/core/request_options.py +47 -0
- harbor_framework_client-0.1.0/src/harbor_client/environment.py +4 -0
- harbor_framework_client-0.1.0/src/harbor_client/errors.py +119 -0
- harbor_framework_client-0.1.0/src/harbor_client/jobs/__init__.py +3 -0
- harbor_framework_client-0.1.0/src/harbor_client/jobs/client.py +2994 -0
- harbor_framework_client-0.1.0/src/harbor_client/jobs/types/__init__.py +97 -0
- harbor_framework_client-0.1.0/src/harbor_client/jobs/types/jobs_get_filters_request_field.py +3 -0
- harbor_framework_client-0.1.0/src/harbor_client/jobs/types/jobs_get_overview_request_force_combined.py +3 -0
- harbor_framework_client-0.1.0/src/harbor_client/jobs/types/jobs_list_bad_request_response.py +13 -0
- harbor_framework_client-0.1.0/src/harbor_client/jobs/types/jobs_list_request_sort.py +3 -0
- harbor_framework_client-0.1.0/src/harbor_client/jobs/types/jobs_list_tasks_bad_request_response.py +13 -0
- harbor_framework_client-0.1.0/src/harbor_client/jobs/types/jobs_list_tasks_request_sort_by.py +3 -0
- harbor_framework_client-0.1.0/src/harbor_client/jobs/types/jobs_list_tasks_request_sort_order.py +3 -0
- harbor_framework_client-0.1.0/src/harbor_client/jobs/types/jobs_submit_response.py +3 -0
- harbor_framework_client-0.1.0/src/harbor_client/jobs/types/result_job_create_visibility.py +3 -0
- harbor_framework_client-0.1.0/src/harbor_client/jobs/types/submit_job_request_config.py +3 -0
- harbor_framework_client-0.1.0/src/harbor_client/jobs/types/submit_job_request_config_agent_setup_timeout_multiplier.py +3 -0
- harbor_framework_client-0.1.0/src/harbor_client/jobs/types/submit_job_request_config_agent_setup_timeout_multiplier_one.py +3 -0
- harbor_framework_client-0.1.0/src/harbor_client/jobs/types/submit_job_request_config_agent_timeout_multiplier.py +3 -0
- harbor_framework_client-0.1.0/src/harbor_client/jobs/types/submit_job_request_config_agent_timeout_multiplier_one.py +3 -0
- harbor_framework_client-0.1.0/src/harbor_client/jobs/types/submit_job_request_config_artifacts_item.py +3 -0
- harbor_framework_client-0.1.0/src/harbor_client/jobs/types/submit_job_request_config_credential_mode.py +3 -0
- harbor_framework_client-0.1.0/src/harbor_client/jobs/types/submit_job_request_config_environment_build_timeout_multiplier.py +3 -0
- harbor_framework_client-0.1.0/src/harbor_client/jobs/types/submit_job_request_config_environment_build_timeout_multiplier_one.py +3 -0
- harbor_framework_client-0.1.0/src/harbor_client/jobs/types/submit_job_request_config_timeout_multiplier.py +3 -0
- harbor_framework_client-0.1.0/src/harbor_client/jobs/types/submit_job_request_config_timeout_multiplier_one.py +3 -0
- harbor_framework_client-0.1.0/src/harbor_client/jobs/types/submit_job_request_config_verifier_timeout_multiplier.py +3 -0
- harbor_framework_client-0.1.0/src/harbor_client/jobs/types/submit_job_request_config_verifier_timeout_multiplier_one.py +3 -0
- harbor_framework_client-0.1.0/src/harbor_client/jobs/types/submit_job_request_regrade.py +3 -0
- harbor_framework_client-0.1.0/src/harbor_client/jobs/types/submit_job_request_regrade_source_trial_id.py +3 -0
- harbor_framework_client-0.1.0/src/harbor_client/jobs/types/update_job_sharing_request_visibility.py +3 -0
- harbor_framework_client-0.1.0/src/harbor_client/leaderboards/__init__.py +3 -0
- harbor_framework_client-0.1.0/src/harbor_client/leaderboards/client.py +1354 -0
- harbor_framework_client-0.1.0/src/harbor_client/leaderboards/types/__init__.py +61 -0
- harbor_framework_client-0.1.0/src/harbor_client/leaderboards/types/leaderboards_create_request_visibility.py +3 -0
- harbor_framework_client-0.1.0/src/harbor_client/leaderboards/types/leaderboards_list_bad_request_response.py +13 -0
- harbor_framework_client-0.1.0/src/harbor_client/leaderboards/types/leaderboards_list_rows_bad_request_response.py +13 -0
- harbor_framework_client-0.1.0/src/harbor_client/leaderboards/types/leaderboards_list_trials_bad_request_response.py +13 -0
- harbor_framework_client-0.1.0/src/harbor_client/leaderboards/types/leaderboards_update_request_definition.py +3 -0
- harbor_framework_client-0.1.0/src/harbor_client/leaderboards/types/leaderboards_update_request_definition_visibility.py +3 -0
- harbor_framework_client-0.1.0/src/harbor_client/leaderboards/types/leaderboards_update_request_row_deletes_item.py +3 -0
- harbor_framework_client-0.1.0/src/harbor_client/leaderboards/types/leaderboards_update_request_row_updates_item.py +3 -0
- harbor_framework_client-0.1.0/src/harbor_client/leaderboards/types/leaderboards_update_request_row_updates_item_status.py +3 -0
- harbor_framework_client-0.1.0/src/harbor_client/leaderboards/types/leaderboards_update_request_trial_updates_item.py +3 -0
- harbor_framework_client-0.1.0/src/harbor_client/leaderboards/types/leaderboards_update_request_trial_updates_item_operation.py +3 -0
- harbor_framework_client-0.1.0/src/harbor_client/net/__init__.py +0 -0
- harbor_framework_client-0.1.0/src/harbor_client/net/environment/__init__.py +4 -0
- harbor_framework_client-0.1.0/src/harbor_client/net/environment/environment.py +32 -0
- harbor_framework_client-0.1.0/src/harbor_client/net/headers/__init__.py +0 -0
- harbor_framework_client-0.1.0/src/harbor_client/net/headers/access_token_auth.py +75 -0
- harbor_framework_client-0.1.0/src/harbor_client/net/headers/base_header.py +34 -0
- harbor_framework_client-0.1.0/src/harbor_client/net/request_chain/__init__.py +0 -0
- harbor_framework_client-0.1.0/src/harbor_client/net/request_chain/handlers/__init__.py +0 -0
- harbor_framework_client-0.1.0/src/harbor_client/net/request_chain/handlers/base_handler.py +51 -0
- harbor_framework_client-0.1.0/src/harbor_client/net/request_chain/handlers/http_handler.py +607 -0
- harbor_framework_client-0.1.0/src/harbor_client/net/request_chain/handlers/logging_handler.py +186 -0
- harbor_framework_client-0.1.0/src/harbor_client/net/request_chain/handlers/retry_handler.py +295 -0
- harbor_framework_client-0.1.0/src/harbor_client/net/request_chain/request_chain.py +76 -0
- harbor_framework_client-0.1.0/src/harbor_client/net/sdk_config.py +101 -0
- harbor_framework_client-0.1.0/src/harbor_client/net/transport/__init__.py +0 -0
- harbor_framework_client-0.1.0/src/harbor_client/net/transport/api_error.py +118 -0
- harbor_framework_client-0.1.0/src/harbor_client/net/transport/http_response.py +83 -0
- harbor_framework_client-0.1.0/src/harbor_client/net/transport/pagination.py +156 -0
- harbor_framework_client-0.1.0/src/harbor_client/net/transport/request.py +190 -0
- harbor_framework_client-0.1.0/src/harbor_client/net/transport/request_error.py +34 -0
- harbor_framework_client-0.1.0/src/harbor_client/net/transport/response.py +456 -0
- harbor_framework_client-0.1.0/src/harbor_client/net/transport/serializer.py +490 -0
- harbor_framework_client-0.1.0/src/harbor_client/net/transport/utils.py +41 -0
- harbor_framework_client-0.1.0/src/harbor_client/organizations/__init__.py +3 -0
- harbor_framework_client-0.1.0/src/harbor_client/organizations/client.py +346 -0
- harbor_framework_client-0.1.0/src/harbor_client/packages/__init__.py +3 -0
- harbor_framework_client-0.1.0/src/harbor_client/packages/client.py +2277 -0
- harbor_framework_client-0.1.0/src/harbor_client/packages/types/__init__.py +53 -0
- harbor_framework_client-0.1.0/src/harbor_client/packages/types/packages_list_version_catalog_bad_request_response.py +13 -0
- harbor_framework_client-0.1.0/src/harbor_client/packages/types/packages_list_version_catalog_request_include_yanked.py +3 -0
- harbor_framework_client-0.1.0/src/harbor_client/packages/types/packages_list_version_catalog_request_type.py +3 -0
- harbor_framework_client-0.1.0/src/harbor_client/packages/types/packages_list_version_files_bad_request_response.py +13 -0
- harbor_framework_client-0.1.0/src/harbor_client/packages/types/packages_list_versions_bad_request_response.py +13 -0
- harbor_framework_client-0.1.0/src/harbor_client/packages/types/packages_list_versions_request_include_yanked.py +3 -0
- harbor_framework_client-0.1.0/src/harbor_client/packages/types/packages_set_visibility_request_visibility.py +3 -0
- harbor_framework_client-0.1.0/src/harbor_client/packages/types/packages_update_organization_access_request_action.py +3 -0
- harbor_framework_client-0.1.0/src/harbor_client/py.typed +1 -0
- harbor_framework_client-0.1.0/src/harbor_client/rollouts/__init__.py +3 -0
- harbor_framework_client-0.1.0/src/harbor_client/rollouts/client.py +1364 -0
- harbor_framework_client-0.1.0/src/harbor_client/rollouts/types/__init__.py +31 -0
- harbor_framework_client-0.1.0/src/harbor_client/rollouts/types/rollouts_get_filters_request_attempts.py +3 -0
- harbor_framework_client-0.1.0/src/harbor_client/rollouts/types/rollouts_get_filters_request_failed_only.py +3 -0
- harbor_framework_client-0.1.0/src/harbor_client/rollouts/types/rollouts_get_filters_request_field.py +3 -0
- harbor_framework_client-0.1.0/src/harbor_client/rollouts/types/rollouts_get_filters_request_terminal.py +3 -0
- harbor_framework_client-0.1.0/src/harbor_client/rollouts/types/rollouts_list_bad_request_response.py +13 -0
- harbor_framework_client-0.1.0/src/harbor_client/rollouts/types/rollouts_list_request_attempts.py +3 -0
- harbor_framework_client-0.1.0/src/harbor_client/rollouts/types/rollouts_list_request_failed_only.py +3 -0
- harbor_framework_client-0.1.0/src/harbor_client/rollouts/types/rollouts_list_request_sort.py +3 -0
- harbor_framework_client-0.1.0/src/harbor_client/rollouts/types/rollouts_list_request_terminal.py +3 -0
- harbor_framework_client-0.1.0/src/harbor_client/secrets/__init__.py +3 -0
- harbor_framework_client-0.1.0/src/harbor_client/secrets/client.py +1309 -0
- harbor_framework_client-0.1.0/src/harbor_client/secrets/types/__init__.py +61 -0
- harbor_framework_client-0.1.0/src/harbor_client/secrets/types/registry_credential_upsert_encoded_provider.py +3 -0
- harbor_framework_client-0.1.0/src/harbor_client/secrets/types/secrets_list_bad_request_response.py +13 -0
- harbor_framework_client-0.1.0/src/harbor_client/secrets/types/secrets_list_registry_credentials_request_status.py +3 -0
- harbor_framework_client-0.1.0/src/harbor_client/secrets/types/secrets_list_registry_credentials_response.py +3 -0
- harbor_framework_client-0.1.0/src/harbor_client/secrets/types/secrets_list_request_status_filter.py +3 -0
- harbor_framework_client-0.1.0/src/harbor_client/secrets/types/secrets_preflight_request_config.py +3 -0
- harbor_framework_client-0.1.0/src/harbor_client/secrets/types/secrets_preflight_request_config_credential_mode.py +3 -0
- harbor_framework_client-0.1.0/src/harbor_client/secrets/types/secrets_revoke_registry_credential_request_purge.py +3 -0
- harbor_framework_client-0.1.0/src/harbor_client/secrets/types/secrets_revoke_request_scope.py +3 -0
- harbor_framework_client-0.1.0/src/harbor_client/secrets/types/secrets_revoke_response.py +3 -0
- harbor_framework_client-0.1.0/src/harbor_client/secrets/types/secrets_upsert_conflict_response.py +13 -0
- harbor_framework_client-0.1.0/src/harbor_client/secrets/types/secrets_upsert_registry_credential_conflict_response.py +11 -0
- harbor_framework_client-0.1.0/src/harbor_client/secrets/types/secrets_upsert_request_scope.py +3 -0
- harbor_framework_client-0.1.0/src/harbor_client/services/__init__.py +0 -0
- harbor_framework_client-0.1.0/src/harbor_client/services/async_/__init__.py +0 -0
- harbor_framework_client-0.1.0/src/harbor_client/services/async_/utils/__init__.py +0 -0
- harbor_framework_client-0.1.0/src/harbor_client/services/async_/utils/to_async.py +20 -0
- harbor_framework_client-0.1.0/src/harbor_client/services/utils/__init__.py +0 -0
- harbor_framework_client-0.1.0/src/harbor_client/services/utils/base_service.py +408 -0
- harbor_framework_client-0.1.0/src/harbor_client/services/utils/default_headers.py +69 -0
- harbor_framework_client-0.1.0/src/harbor_client/services/utils/validator.py +474 -0
- harbor_framework_client-0.1.0/src/harbor_client/storage/__init__.py +3 -0
- harbor_framework_client-0.1.0/src/harbor_client/storage/client.py +269 -0
- harbor_framework_client-0.1.0/src/harbor_client/transfers.py +724 -0
- harbor_framework_client-0.1.0/src/harbor_client/trials/__init__.py +3 -0
- harbor_framework_client-0.1.0/src/harbor_client/trials/client.py +1939 -0
- harbor_framework_client-0.1.0/src/harbor_client/trials/types/__init__.py +29 -0
- harbor_framework_client-0.1.0/src/harbor_client/trials/types/trials_get_filters_request_attempts.py +3 -0
- harbor_framework_client-0.1.0/src/harbor_client/trials/types/trials_get_filters_request_failed_only.py +3 -0
- harbor_framework_client-0.1.0/src/harbor_client/trials/types/trials_get_filters_request_field.py +3 -0
- harbor_framework_client-0.1.0/src/harbor_client/trials/types/trials_get_filters_request_terminal.py +3 -0
- harbor_framework_client-0.1.0/src/harbor_client/trials/types/trials_list_bad_request_response.py +13 -0
- harbor_framework_client-0.1.0/src/harbor_client/trials/types/trials_list_request_attempts.py +3 -0
- harbor_framework_client-0.1.0/src/harbor_client/trials/types/trials_list_request_failed_only.py +3 -0
- harbor_framework_client-0.1.0/src/harbor_client/trials/types/trials_list_request_sort.py +3 -0
- harbor_framework_client-0.1.0/src/harbor_client/trials/types/trials_list_request_terminal.py +3 -0
- harbor_framework_client-0.1.0/src/harbor_client/types/__init__.py +1006 -0
- harbor_framework_client-0.1.0/src/harbor_client/types/account_identity.py +15 -0
- harbor_framework_client-0.1.0/src/harbor_client/types/agent_identity.py +19 -0
- harbor_framework_client-0.1.0/src/harbor_client/types/agent_options.py +1 -0
- harbor_framework_client-0.1.0/src/harbor_client/types/agent_source.py +40 -0
- harbor_framework_client-0.1.0/src/harbor_client/types/agent_source_manifest.py +57 -0
- harbor_framework_client-0.1.0/src/harbor_client/types/agent_source_runtime.py +33 -0
- harbor_framework_client-0.1.0/src/harbor_client/types/agents_response.py +16 -0
- harbor_framework_client-0.1.0/src/harbor_client/types/api_key_create.py +19 -0
- harbor_framework_client-0.1.0/src/harbor_client/types/api_key_created.py +44 -0
- harbor_framework_client-0.1.0/src/harbor_client/types/api_key_metadata.py +41 -0
- harbor_framework_client-0.1.0/src/harbor_client/types/api_key_metadata_page.py +24 -0
- harbor_framework_client-0.1.0/src/harbor_client/types/api_keys_list_bad_request_response.py +35 -0
- harbor_framework_client-0.1.0/src/harbor_client/types/artifact_config.py +26 -0
- harbor_framework_client-0.1.0/src/harbor_client/types/available_dataset_task_dependency.py +97 -0
- harbor_framework_client-0.1.0/src/harbor_client/types/bad_request_encoded.py +79 -0
- harbor_framework_client-0.1.0/src/harbor_client/types/bad_request_error_body.py +35 -0
- harbor_framework_client-0.1.0/src/harbor_client/types/cancel_job_request.py +15 -0
- harbor_framework_client-0.1.0/src/harbor_client/types/cancel_trial_request.py +15 -0
- harbor_framework_client-0.1.0/src/harbor_client/types/conflict_encoded.py +77 -0
- harbor_framework_client-0.1.0/src/harbor_client/types/conflict_error_body.py +38 -0
- harbor_framework_client-0.1.0/src/harbor_client/types/create_leaderboard_response.py +22 -0
- harbor_framework_client-0.1.0/src/harbor_client/types/create_leaderboard_row_input.py +32 -0
- harbor_framework_client-0.1.0/src/harbor_client/types/created_result_job.py +49 -0
- harbor_framework_client-0.1.0/src/harbor_client/types/created_result_trial.py +28 -0
- harbor_framework_client-0.1.0/src/harbor_client/types/credential_proxy_header_transform.py +16 -0
- harbor_framework_client-0.1.0/src/harbor_client/types/credential_proxy_path_match.py +15 -0
- harbor_framework_client-0.1.0/src/harbor_client/types/credential_proxy_policy_rule.py +21 -0
- harbor_framework_client-0.1.0/src/harbor_client/types/credential_proxy_request_match.py +20 -0
- harbor_framework_client-0.1.0/src/harbor_client/types/dataset_publish_task_reference.py +21 -0
- harbor_framework_client-0.1.0/src/harbor_client/types/dataset_version_detail.py +95 -0
- harbor_framework_client-0.1.0/src/harbor_client/types/dataset_version_file.py +50 -0
- harbor_framework_client-0.1.0/src/harbor_client/types/dataset_version_manifest.py +91 -0
- harbor_framework_client-0.1.0/src/harbor_client/types/dataset_version_revision_summary.py +22 -0
- harbor_framework_client-0.1.0/src/harbor_client/types/delete_jobs_request.py +17 -0
- harbor_framework_client-0.1.0/src/harbor_client/types/delete_jobs_response.py +22 -0
- harbor_framework_client-0.1.0/src/harbor_client/types/dry_run_response.py +15 -0
- harbor_framework_client-0.1.0/src/harbor_client/types/ensure_organization_response.py +18 -0
- harbor_framework_client-0.1.0/src/harbor_client/types/evaluation_comparison.py +27 -0
- harbor_framework_client-0.1.0/src/harbor_client/types/evaluation_comparison_agent_model.py +34 -0
- harbor_framework_client-0.1.0/src/harbor_client/types/evaluation_comparison_cell.py +109 -0
- harbor_framework_client-0.1.0/src/harbor_client/types/evaluation_comparison_task.py +22 -0
- harbor_framework_client-0.1.0/src/harbor_client/types/evaluation_job_reference.py +48 -0
- harbor_framework_client-0.1.0/src/harbor_client/types/evaluation_metric_set.py +42 -0
- harbor_framework_client-0.1.0/src/harbor_client/types/evaluation_summary.py +21 -0
- harbor_framework_client-0.1.0/src/harbor_client/types/evaluation_summary_row.py +128 -0
- harbor_framework_client-0.1.0/src/harbor_client/types/existing_registry_credential.py +28 -0
- harbor_framework_client-0.1.0/src/harbor_client/types/existing_secret_summary.py +31 -0
- harbor_framework_client-0.1.0/src/harbor_client/types/filter_values_response.py +72 -0
- harbor_framework_client-0.1.0/src/harbor_client/types/forbidden_encoded.py +79 -0
- harbor_framework_client-0.1.0/src/harbor_client/types/hosted_agent_config.py +72 -0
- harbor_framework_client-0.1.0/src/harbor_client/types/hosted_dataset_config.py +62 -0
- harbor_framework_client-0.1.0/src/harbor_client/types/hosted_diff_selectors.py +22 -0
- harbor_framework_client-0.1.0/src/harbor_client/types/hosted_github_agent_source.py +30 -0
- harbor_framework_client-0.1.0/src/harbor_client/types/hosted_job_trial_regrade_source.py +19 -0
- harbor_framework_client-0.1.0/src/harbor_client/types/hosted_local_task_requirements.py +20 -0
- harbor_framework_client-0.1.0/src/harbor_client/types/hosted_preflight_environment_config.py +24 -0
- harbor_framework_client-0.1.0/src/harbor_client/types/hosted_retry_config.py +32 -0
- harbor_framework_client-0.1.0/src/harbor_client/types/hosted_secret_selection.py +21 -0
- harbor_framework_client-0.1.0/src/harbor_client/types/hosted_submission_credential_proxy_path_match.py +17 -0
- harbor_framework_client-0.1.0/src/harbor_client/types/hosted_submission_credential_proxy_policy_rule.py +23 -0
- harbor_framework_client-0.1.0/src/harbor_client/types/hosted_submission_credential_proxy_request_match.py +22 -0
- harbor_framework_client-0.1.0/src/harbor_client/types/hosted_submission_dataset_config.py +64 -0
- harbor_framework_client-0.1.0/src/harbor_client/types/hosted_submission_environment_config.py +26 -0
- harbor_framework_client-0.1.0/src/harbor_client/types/hosted_submission_retry_config.py +32 -0
- harbor_framework_client-0.1.0/src/harbor_client/types/hosted_submission_task_config.py +45 -0
- harbor_framework_client-0.1.0/src/harbor_client/types/hosted_task_config.py +45 -0
- harbor_framework_client-0.1.0/src/harbor_client/types/hosted_task_environment_requirement.py +26 -0
- harbor_framework_client-0.1.0/src/harbor_client/types/hosted_verifier_config.py +75 -0
- harbor_framework_client-0.1.0/src/harbor_client/types/internal_server_error_encoded.py +93 -0
- harbor_framework_client-0.1.0/src/harbor_client/types/invalid_page_size_encoded.py +58 -0
- harbor_framework_client-0.1.0/src/harbor_client/types/invalid_page_token_encoded.py +60 -0
- harbor_framework_client-0.1.0/src/harbor_client/types/job_artifact_type.py +5 -0
- harbor_framework_client-0.1.0/src/harbor_client/types/job_bucket_circuit_state.py +93 -0
- harbor_framework_client-0.1.0/src/harbor_client/types/job_cancellation_summary.py +47 -0
- harbor_framework_client-0.1.0/src/harbor_client/types/job_circuit_state.py +90 -0
- harbor_framework_client-0.1.0/src/harbor_client/types/job_creator.py +28 -0
- harbor_framework_client-0.1.0/src/harbor_client/types/job_detail.py +84 -0
- harbor_framework_client-0.1.0/src/harbor_client/types/job_manual_pause_summary.py +66 -0
- harbor_framework_client-0.1.0/src/harbor_client/types/job_overview.py +332 -0
- harbor_framework_client-0.1.0/src/harbor_client/types/job_overview_statistics.py +97 -0
- harbor_framework_client-0.1.0/src/harbor_client/types/job_owner_organization.py +28 -0
- harbor_framework_client-0.1.0/src/harbor_client/types/job_package_run_target.py +21 -0
- harbor_framework_client-0.1.0/src/harbor_client/types/job_page.py +24 -0
- harbor_framework_client-0.1.0/src/harbor_client/types/job_path_run_target.py +24 -0
- harbor_framework_client-0.1.0/src/harbor_client/types/job_response.py +17 -0
- harbor_framework_client-0.1.0/src/harbor_client/types/job_reward_metric_set.py +42 -0
- harbor_framework_client-0.1.0/src/harbor_client/types/job_share_organization_summary.py +22 -0
- harbor_framework_client-0.1.0/src/harbor_client/types/job_sharing.py +38 -0
- harbor_framework_client-0.1.0/src/harbor_client/types/job_summary.py +73 -0
- harbor_framework_client-0.1.0/src/harbor_client/types/job_task_page.py +24 -0
- harbor_framework_client-0.1.0/src/harbor_client/types/job_task_summary.py +146 -0
- harbor_framework_client-0.1.0/src/harbor_client/types/job_trial_status.py +4 -0
- harbor_framework_client-0.1.0/src/harbor_client/types/job_trial_status_item.py +128 -0
- harbor_framework_client-0.1.0/src/harbor_client/types/jobs_copy_request.py +22 -0
- harbor_framework_client-0.1.0/src/harbor_client/types/jobs_get_filters_request_field.py +17 -0
- harbor_framework_client-0.1.0/src/harbor_client/types/jobs_get_overview_request_force_combined.py +7 -0
- harbor_framework_client-0.1.0/src/harbor_client/types/jobs_list_bad_request_response.py +35 -0
- harbor_framework_client-0.1.0/src/harbor_client/types/jobs_list_request_sort.py +21 -0
- harbor_framework_client-0.1.0/src/harbor_client/types/jobs_list_tasks_bad_request_response.py +35 -0
- harbor_framework_client-0.1.0/src/harbor_client/types/jobs_list_tasks_request_sort_by.py +25 -0
- harbor_framework_client-0.1.0/src/harbor_client/types/jobs_list_tasks_request_sort_order.py +5 -0
- harbor_framework_client-0.1.0/src/harbor_client/types/jobs_rename_request.py +15 -0
- harbor_framework_client-0.1.0/src/harbor_client/types/jobs_submit_response.py +15 -0
- harbor_framework_client-0.1.0/src/harbor_client/types/jobs_transfer_request.py +22 -0
- harbor_framework_client-0.1.0/src/harbor_client/types/leaderboard_change_summary.py +37 -0
- harbor_framework_client-0.1.0/src/harbor_client/types/leaderboard_definition.py +67 -0
- harbor_framework_client-0.1.0/src/harbor_client/types/leaderboard_detail.py +17 -0
- harbor_framework_client-0.1.0/src/harbor_client/types/leaderboard_mutation_record.py +64 -0
- harbor_framework_client-0.1.0/src/harbor_client/types/leaderboard_mutation_row.py +43 -0
- harbor_framework_client-0.1.0/src/harbor_client/types/leaderboard_package_selector_encoded.py +16 -0
- harbor_framework_client-0.1.0/src/harbor_client/types/leaderboard_ranked_row.py +44 -0
- harbor_framework_client-0.1.0/src/harbor_client/types/leaderboard_read_column_definition.py +55 -0
- harbor_framework_client-0.1.0/src/harbor_client/types/leaderboard_read_ranking_rule.py +30 -0
- harbor_framework_client-0.1.0/src/harbor_client/types/leaderboard_row_detail.py +17 -0
- harbor_framework_client-0.1.0/src/harbor_client/types/leaderboard_rows_page.py +28 -0
- harbor_framework_client-0.1.0/src/harbor_client/types/leaderboard_summary.py +64 -0
- harbor_framework_client-0.1.0/src/harbor_client/types/leaderboard_summary_page.py +24 -0
- harbor_framework_client-0.1.0/src/harbor_client/types/leaderboard_trial_link.py +18 -0
- harbor_framework_client-0.1.0/src/harbor_client/types/leaderboard_trial_link_page.py +23 -0
- harbor_framework_client-0.1.0/src/harbor_client/types/leaderboard_write_column_definition.py +55 -0
- harbor_framework_client-0.1.0/src/harbor_client/types/leaderboard_write_ranking_rule.py +30 -0
- harbor_framework_client-0.1.0/src/harbor_client/types/leaderboards_create_request.py +59 -0
- harbor_framework_client-0.1.0/src/harbor_client/types/leaderboards_list_bad_request_response.py +37 -0
- harbor_framework_client-0.1.0/src/harbor_client/types/leaderboards_list_rows_bad_request_response.py +37 -0
- harbor_framework_client-0.1.0/src/harbor_client/types/leaderboards_list_trials_bad_request_response.py +39 -0
- harbor_framework_client-0.1.0/src/harbor_client/types/leaderboards_update_request.py +152 -0
- harbor_framework_client-0.1.0/src/harbor_client/types/mean_aggregate.py +19 -0
- harbor_framework_client-0.1.0/src/harbor_client/types/metric_config.py +20 -0
- harbor_framework_client-0.1.0/src/harbor_client/types/model_identity.py +22 -0
- harbor_framework_client-0.1.0/src/harbor_client/types/my_organizations.py +4 -0
- harbor_framework_client-0.1.0/src/harbor_client/types/my_organizations_item.py +36 -0
- harbor_framework_client-0.1.0/src/harbor_client/types/not_found_encoded.py +77 -0
- harbor_framework_client-0.1.0/src/harbor_client/types/organization_detail.py +38 -0
- harbor_framework_client-0.1.0/src/harbor_client/types/organizations_ensure_request.py +15 -0
- harbor_framework_client-0.1.0/src/harbor_client/types/owner_organization.py +31 -0
- harbor_framework_client-0.1.0/src/harbor_client/types/package_access.py +46 -0
- harbor_framework_client-0.1.0/src/harbor_client/types/package_access_grant_creator.py +22 -0
- harbor_framework_client-0.1.0/src/harbor_client/types/package_access_organization_summary.py +30 -0
- harbor_framework_client-0.1.0/src/harbor_client/types/package_name_reference.py +18 -0
- harbor_framework_client-0.1.0/src/harbor_client/types/package_organization_grant.py +44 -0
- harbor_framework_client-0.1.0/src/harbor_client/types/package_public_grant.py +40 -0
- harbor_framework_client-0.1.0/src/harbor_client/types/package_tag.py +24 -0
- harbor_framework_client-0.1.0/src/harbor_client/types/package_tags.py +4 -0
- harbor_framework_client-0.1.0/src/harbor_client/types/package_version_catalog_page.py +21 -0
- harbor_framework_client-0.1.0/src/harbor_client/types/package_version_detail.py +27 -0
- harbor_framework_client-0.1.0/src/harbor_client/types/package_version_file_page.py +21 -0
- harbor_framework_client-0.1.0/src/harbor_client/types/package_version_manifest.py +27 -0
- harbor_framework_client-0.1.0/src/harbor_client/types/package_version_summary.py +69 -0
- harbor_framework_client-0.1.0/src/harbor_client/types/packages_list_version_catalog_bad_request_response.py +41 -0
- harbor_framework_client-0.1.0/src/harbor_client/types/packages_list_version_catalog_request_include_yanked.py +7 -0
- harbor_framework_client-0.1.0/src/harbor_client/types/packages_list_version_catalog_request_type.py +7 -0
- harbor_framework_client-0.1.0/src/harbor_client/types/packages_list_version_files_bad_request_response.py +41 -0
- harbor_framework_client-0.1.0/src/harbor_client/types/packages_list_versions_bad_request_response.py +37 -0
- harbor_framework_client-0.1.0/src/harbor_client/types/packages_list_versions_request_include_yanked.py +7 -0
- harbor_framework_client-0.1.0/src/harbor_client/types/packages_set_visibility_request.py +27 -0
- harbor_framework_client-0.1.0/src/harbor_client/types/packages_update_organization_access_request.py +26 -0
- harbor_framework_client-0.1.0/src/harbor_client/types/registry_credential.py +44 -0
- harbor_framework_client-0.1.0/src/harbor_client/types/registry_credential_replacement_required_encoded.py +86 -0
- harbor_framework_client-0.1.0/src/harbor_client/types/registry_credential_replacement_stale_encoded.py +79 -0
- harbor_framework_client-0.1.0/src/harbor_client/types/registry_credential_revoke_result.py +21 -0
- harbor_framework_client-0.1.0/src/harbor_client/types/registry_credential_summary.py +46 -0
- harbor_framework_client-0.1.0/src/harbor_client/types/registry_credential_upsert_encoded.py +48 -0
- harbor_framework_client-0.1.0/src/harbor_client/types/registry_package.py +37 -0
- harbor_framework_client-0.1.0/src/harbor_client/types/registry_package_version.py +44 -0
- harbor_framework_client-0.1.0/src/harbor_client/types/registry_package_version_page.py +25 -0
- harbor_framework_client-0.1.0/src/harbor_client/types/registry_version_file.py +47 -0
- harbor_framework_client-0.1.0/src/harbor_client/types/rename_job_response.py +21 -0
- harbor_framework_client-0.1.0/src/harbor_client/types/reserve_temporary_package_request.py +25 -0
- harbor_framework_client-0.1.0/src/harbor_client/types/reserve_temporary_task_response.py +27 -0
- harbor_framework_client-0.1.0/src/harbor_client/types/resolved_task_step.py +38 -0
- harbor_framework_client-0.1.0/src/harbor_client/types/result_job_create.py +40 -0
- harbor_framework_client-0.1.0/src/harbor_client/types/result_model_usage.py +31 -0
- harbor_framework_client-0.1.0/src/harbor_client/types/result_trial_create.py +92 -0
- harbor_framework_client-0.1.0/src/harbor_client/types/retry_rollout_response.py +15 -0
- harbor_framework_client-0.1.0/src/harbor_client/types/retry_trial_response.py +15 -0
- harbor_framework_client-0.1.0/src/harbor_client/types/reward_value.py +3 -0
- harbor_framework_client-0.1.0/src/harbor_client/types/rollout_response.py +17 -0
- harbor_framework_client-0.1.0/src/harbor_client/types/rollouts_get_filters_request_attempts.py +7 -0
- harbor_framework_client-0.1.0/src/harbor_client/types/rollouts_get_filters_request_failed_only.py +7 -0
- harbor_framework_client-0.1.0/src/harbor_client/types/rollouts_get_filters_request_field.py +18 -0
- harbor_framework_client-0.1.0/src/harbor_client/types/rollouts_get_filters_request_terminal.py +7 -0
- harbor_framework_client-0.1.0/src/harbor_client/types/rollouts_list_bad_request_response.py +34 -0
- harbor_framework_client-0.1.0/src/harbor_client/types/rollouts_list_request_attempts.py +5 -0
- harbor_framework_client-0.1.0/src/harbor_client/types/rollouts_list_request_failed_only.py +7 -0
- harbor_framework_client-0.1.0/src/harbor_client/types/rollouts_list_request_sort.py +47 -0
- harbor_framework_client-0.1.0/src/harbor_client/types/rollouts_list_request_terminal.py +5 -0
- harbor_framework_client-0.1.0/src/harbor_client/types/run_state.py +10 -0
- harbor_framework_client-0.1.0/src/harbor_client/types/secret_metadata.py +54 -0
- harbor_framework_client-0.1.0/src/harbor_client/types/secret_metadata_page.py +21 -0
- harbor_framework_client-0.1.0/src/harbor_client/types/secret_preflight.py +152 -0
- harbor_framework_client-0.1.0/src/harbor_client/types/secret_replacement_required_encoded.py +72 -0
- harbor_framework_client-0.1.0/src/harbor_client/types/secret_replacement_stale_encoded.py +67 -0
- harbor_framework_client-0.1.0/src/harbor_client/types/secret_write_result.py +51 -0
- harbor_framework_client-0.1.0/src/harbor_client/types/secrets_list_bad_request_response.py +35 -0
- harbor_framework_client-0.1.0/src/harbor_client/types/secrets_list_registry_credentials_request_status.py +7 -0
- harbor_framework_client-0.1.0/src/harbor_client/types/secrets_list_registry_credentials_response.py +18 -0
- harbor_framework_client-0.1.0/src/harbor_client/types/secrets_list_request_status_filter.py +7 -0
- harbor_framework_client-0.1.0/src/harbor_client/types/secrets_preflight_request.py +76 -0
- harbor_framework_client-0.1.0/src/harbor_client/types/secrets_revoke_registry_credential_request_purge.py +7 -0
- harbor_framework_client-0.1.0/src/harbor_client/types/secrets_revoke_request.py +33 -0
- harbor_framework_client-0.1.0/src/harbor_client/types/secrets_revoke_response.py +34 -0
- harbor_framework_client-0.1.0/src/harbor_client/types/secrets_upsert_conflict_response.py +39 -0
- harbor_framework_client-0.1.0/src/harbor_client/types/secrets_upsert_registry_credential_conflict_response.py +40 -0
- harbor_framework_client-0.1.0/src/harbor_client/types/secrets_upsert_request.py +43 -0
- harbor_framework_client-0.1.0/src/harbor_client/types/selected_secret.py +48 -0
- harbor_framework_client-0.1.0/src/harbor_client/types/service_unavailable_encoded.py +85 -0
- harbor_framework_client-0.1.0/src/harbor_client/types/set_package_visibility_response.py +50 -0
- harbor_framework_client-0.1.0/src/harbor_client/types/storage_copy_result.py +60 -0
- harbor_framework_client-0.1.0/src/harbor_client/types/storage_dataset_upload_create.py +50 -0
- harbor_framework_client-0.1.0/src/harbor_client/types/storage_dataset_upload_metadata.py +49 -0
- harbor_framework_client-0.1.0/src/harbor_client/types/storage_dataset_upload_result.py +50 -0
- harbor_framework_client-0.1.0/src/harbor_client/types/storage_download.py +64 -0
- harbor_framework_client-0.1.0/src/harbor_client/types/storage_http_transfer.py +33 -0
- harbor_framework_client-0.1.0/src/harbor_client/types/storage_job_upload_create.py +39 -0
- harbor_framework_client-0.1.0/src/harbor_client/types/storage_job_upload_metadata.py +45 -0
- harbor_framework_client-0.1.0/src/harbor_client/types/storage_publication_file.py +25 -0
- harbor_framework_client-0.1.0/src/harbor_client/types/storage_result_upload_result.py +15 -0
- harbor_framework_client-0.1.0/src/harbor_client/types/storage_task_upload_create.py +50 -0
- harbor_framework_client-0.1.0/src/harbor_client/types/storage_task_upload_metadata.py +79 -0
- harbor_framework_client-0.1.0/src/harbor_client/types/storage_task_upload_result.py +39 -0
- harbor_framework_client-0.1.0/src/harbor_client/types/storage_trial_upload_create.py +41 -0
- harbor_framework_client-0.1.0/src/harbor_client/types/storage_tus_transfer.py +56 -0
- harbor_framework_client-0.1.0/src/harbor_client/types/storage_upload_create.py +44 -0
- harbor_framework_client-0.1.0/src/harbor_client/types/storage_upload_file.py +63 -0
- harbor_framework_client-0.1.0/src/harbor_client/types/storage_upload_file_input.py +32 -0
- harbor_framework_client-0.1.0/src/harbor_client/types/storage_upload_receipt.py +53 -0
- harbor_framework_client-0.1.0/src/harbor_client/types/storage_upload_session.py +61 -0
- harbor_framework_client-0.1.0/src/harbor_client/types/submit_job_request.py +277 -0
- harbor_framework_client-0.1.0/src/harbor_client/types/submit_job_response.py +51 -0
- harbor_framework_client-0.1.0/src/harbor_client/types/sum_aggregate.py +19 -0
- harbor_framework_client-0.1.0/src/harbor_client/types/tag_package_version_request.py +15 -0
- harbor_framework_client-0.1.0/src/harbor_client/types/tag_package_version_response.py +18 -0
- harbor_framework_client-0.1.0/src/harbor_client/types/task_environment_requirement.py +26 -0
- harbor_framework_client-0.1.0/src/harbor_client/types/task_identity.py +22 -0
- harbor_framework_client-0.1.0/src/harbor_client/types/task_publish_step.py +47 -0
- harbor_framework_client-0.1.0/src/harbor_client/types/task_version_detail.py +115 -0
- harbor_framework_client-0.1.0/src/harbor_client/types/task_version_manifest.py +119 -0
- harbor_framework_client-0.1.0/src/harbor_client/types/too_many_requests_encoded.py +81 -0
- harbor_framework_client-0.1.0/src/harbor_client/types/transfer_job_response.py +36 -0
- harbor_framework_client-0.1.0/src/harbor_client/types/trial_artifact_type.py +5 -0
- harbor_framework_client-0.1.0/src/harbor_client/types/trial_counts.py +33 -0
- harbor_framework_client-0.1.0/src/harbor_client/types/trial_detail.py +103 -0
- harbor_framework_client-0.1.0/src/harbor_client/types/trial_filter_values_response.py +76 -0
- harbor_framework_client-0.1.0/src/harbor_client/types/trial_page.py +24 -0
- harbor_framework_client-0.1.0/src/harbor_client/types/trial_response.py +17 -0
- harbor_framework_client-0.1.0/src/harbor_client/types/trial_summary.py +83 -0
- harbor_framework_client-0.1.0/src/harbor_client/types/trials_copy_request.py +22 -0
- harbor_framework_client-0.1.0/src/harbor_client/types/trials_get_filters_request_attempts.py +7 -0
- harbor_framework_client-0.1.0/src/harbor_client/types/trials_get_filters_request_failed_only.py +7 -0
- harbor_framework_client-0.1.0/src/harbor_client/types/trials_get_filters_request_field.py +18 -0
- harbor_framework_client-0.1.0/src/harbor_client/types/trials_get_filters_request_terminal.py +7 -0
- harbor_framework_client-0.1.0/src/harbor_client/types/trials_list_bad_request_response.py +35 -0
- harbor_framework_client-0.1.0/src/harbor_client/types/trials_list_request_attempts.py +5 -0
- harbor_framework_client-0.1.0/src/harbor_client/types/trials_list_request_failed_only.py +5 -0
- harbor_framework_client-0.1.0/src/harbor_client/types/trials_list_request_sort.py +47 -0
- harbor_framework_client-0.1.0/src/harbor_client/types/trials_list_request_terminal.py +5 -0
- harbor_framework_client-0.1.0/src/harbor_client/types/unauthorized_encoded.py +79 -0
- harbor_framework_client-0.1.0/src/harbor_client/types/unavailable_dataset_task_dependency.py +43 -0
- harbor_framework_client-0.1.0/src/harbor_client/types/update_job_sharing_request.py +36 -0
- harbor_framework_client-0.1.0/src/harbor_client/types/update_leaderboard_response.py +29 -0
- harbor_framework_client-0.1.0/src/harbor_client/types/update_package_access_response.py +65 -0
- harbor_framework_client-0.1.0/src/harbor_client/types/usage.py +25 -0
- harbor_framework_client-0.1.0/src/harbor_client/types/usage_aggregates.py +26 -0
- harbor_framework_client-0.1.0/src/harbor_client/types/utils/__init__.py +0 -0
- harbor_framework_client-0.1.0/src/harbor_client/types/utils/base_error.py +127 -0
- harbor_framework_client-0.1.0/src/harbor_client/types/utils/base_model.py +439 -0
- harbor_framework_client-0.1.0/src/harbor_client/types/utils/cast_models.py +226 -0
- harbor_framework_client-0.1.0/src/harbor_client/types/utils/json_map.py +84 -0
- harbor_framework_client-0.1.0/src/harbor_client/types/utils/one_of_base_model.py +173 -0
- harbor_framework_client-0.1.0/src/harbor_client/types/utils/sentinel.py +19 -0
- harbor_framework_client-0.1.0/src/harbor_client/validation.py +335 -0
- harbor_framework_client-0.1.0/src/harbor_client/version.py +9 -0
- harbor_framework_client-0.1.0/src/harbor_framework_client.egg-info/PKG-INFO +134 -0
- harbor_framework_client-0.1.0/src/harbor_framework_client.egg-info/SOURCES.txt +453 -0
- harbor_framework_client-0.1.0/src/harbor_framework_client.egg-info/dependency_links.txt +1 -0
- harbor_framework_client-0.1.0/src/harbor_framework_client.egg-info/requires.txt +7 -0
- harbor_framework_client-0.1.0/src/harbor_framework_client.egg-info/top_level.txt +1 -0
- harbor_framework_client-0.1.0/tests/test_codegen_contracts.py +249 -0
- harbor_framework_client-0.1.0/tests/test_contract.py +428 -0
- harbor_framework_client-0.1.0/tests/test_execution_controls.py +163 -0
- harbor_framework_client-0.1.0/tests/test_job_sort_contract.py +60 -0
- harbor_framework_client-0.1.0/tests/test_model_fidelity.py +65 -0
- harbor_framework_client-0.1.0/tests/test_native_operations.py +184 -0
- harbor_framework_client-0.1.0/tests/test_nullable_rewards.py +166 -0
- harbor_framework_client-0.1.0/tests/test_optional_execution_data.py +109 -0
- harbor_framework_client-0.1.0/tests/test_package_access_contract.py +150 -0
- harbor_framework_client-0.1.0/tests/test_package_metadata.py +46 -0
- harbor_framework_client-0.1.0/tests/test_pagination.py +393 -0
- harbor_framework_client-0.1.0/tests/test_public_client.py +444 -0
- harbor_framework_client-0.1.0/tests/test_query_parameters.py +101 -0
- harbor_framework_client-0.1.0/tests/test_sdk.py +301 -0
- harbor_framework_client-0.1.0/tests/test_server_selection.py +161 -0
- harbor_framework_client-0.1.0/tests/test_shared_execution_models.py +85 -0
- harbor_framework_client-0.1.0/tests/test_transfers.py +885 -0
|
@@ -0,0 +1,201 @@
|
|
|
1
|
+
Apache License
|
|
2
|
+
Version 2.0, January 2004
|
|
3
|
+
http://www.apache.org/licenses/
|
|
4
|
+
|
|
5
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
6
|
+
|
|
7
|
+
1. Definitions.
|
|
8
|
+
|
|
9
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
|
10
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
|
11
|
+
|
|
12
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
|
13
|
+
the copyright owner that is granting the License.
|
|
14
|
+
|
|
15
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
|
16
|
+
other entities that control, are controlled by, or are under common
|
|
17
|
+
control with that entity. For the purposes of this definition,
|
|
18
|
+
"control" means (i) the power, direct or indirect, to cause the
|
|
19
|
+
direction or management of such entity, whether by contract or
|
|
20
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
21
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
22
|
+
|
|
23
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
|
24
|
+
exercising permissions granted by this License.
|
|
25
|
+
|
|
26
|
+
"Source" form shall mean the preferred form for making modifications,
|
|
27
|
+
including but not limited to software source code, documentation
|
|
28
|
+
source, and configuration files.
|
|
29
|
+
|
|
30
|
+
"Object" form shall mean any form resulting from mechanical
|
|
31
|
+
transformation or translation of a Source form, including but
|
|
32
|
+
not limited to compiled object code, generated documentation,
|
|
33
|
+
and conversions to other media types.
|
|
34
|
+
|
|
35
|
+
"Work" shall mean the work of authorship, whether in Source or
|
|
36
|
+
Object form, made available under the License, as indicated by a
|
|
37
|
+
copyright notice that is included in or attached to the work
|
|
38
|
+
(an example is provided in the Appendix below).
|
|
39
|
+
|
|
40
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
|
41
|
+
form, that is based on (or derived from) the Work and for which the
|
|
42
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
43
|
+
represent, as a whole, an original work of authorship. For the purposes
|
|
44
|
+
of this License, Derivative Works shall not include works that remain
|
|
45
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
|
46
|
+
the Work and Derivative Works thereof.
|
|
47
|
+
|
|
48
|
+
"Contribution" shall mean any work of authorship, including
|
|
49
|
+
the original version of the Work and any modifications or additions
|
|
50
|
+
to that Work or Derivative Works thereof, that is intentionally
|
|
51
|
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
52
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
|
53
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
|
54
|
+
means any form of electronic, verbal, or written communication sent
|
|
55
|
+
to the Licensor or its representatives, including but not limited to
|
|
56
|
+
communication on electronic mailing lists, source code control systems,
|
|
57
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
|
58
|
+
Licensor for the purpose of discussing and improving the Work, but
|
|
59
|
+
excluding communication that is conspicuously marked or otherwise
|
|
60
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
|
61
|
+
|
|
62
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
63
|
+
on behalf of whom a Contribution has been received by Licensor and
|
|
64
|
+
subsequently incorporated within the Work.
|
|
65
|
+
|
|
66
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
67
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
68
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
69
|
+
copyright license to reproduce, prepare Derivative Works of,
|
|
70
|
+
publicly display, publicly perform, sublicense, and distribute the
|
|
71
|
+
Work and such Derivative Works in Source or Object form.
|
|
72
|
+
|
|
73
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
|
74
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
75
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
76
|
+
(except as stated in this section) patent license to make, have made,
|
|
77
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
78
|
+
where such license applies only to those patent claims licensable
|
|
79
|
+
by such Contributor that are necessarily infringed by their
|
|
80
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
|
81
|
+
with the Work to which such Contribution(s) was submitted. If You
|
|
82
|
+
institute patent litigation against any entity (including a
|
|
83
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
84
|
+
or a Contribution incorporated within the Work constitutes direct
|
|
85
|
+
or contributory patent infringement, then any patent licenses
|
|
86
|
+
granted to You under this License for that Work shall terminate
|
|
87
|
+
as of the date such litigation is filed.
|
|
88
|
+
|
|
89
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
|
90
|
+
Work or Derivative Works thereof in any medium, with or without
|
|
91
|
+
modifications, and in Source or Object form, provided that You
|
|
92
|
+
meet the following conditions:
|
|
93
|
+
|
|
94
|
+
(a) You must give any other recipients of the Work or
|
|
95
|
+
Derivative Works a copy of this License; and
|
|
96
|
+
|
|
97
|
+
(b) You must cause any modified files to carry prominent notices
|
|
98
|
+
stating that You changed the files; and
|
|
99
|
+
|
|
100
|
+
(c) You must retain, in the Source form of any Derivative Works
|
|
101
|
+
that You distribute, all copyright, patent, trademark, and
|
|
102
|
+
attribution notices from the Source form of the Work,
|
|
103
|
+
excluding those notices that do not pertain to any part of
|
|
104
|
+
the Derivative Works; and
|
|
105
|
+
|
|
106
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
|
107
|
+
distribution, then any Derivative Works that You distribute must
|
|
108
|
+
include a readable copy of the attribution notices contained
|
|
109
|
+
within such NOTICE file, excluding those notices that do not
|
|
110
|
+
pertain to any part of the Derivative Works, in at least one
|
|
111
|
+
of the following places: within a NOTICE text file distributed
|
|
112
|
+
as part of the Derivative Works; within the Source form or
|
|
113
|
+
documentation, if provided along with the Derivative Works; or,
|
|
114
|
+
within a display generated by the Derivative Works, if and
|
|
115
|
+
wherever such third-party notices normally appear. The contents
|
|
116
|
+
of the NOTICE file are for informational purposes only and
|
|
117
|
+
do not modify the License. You may add Your own attribution
|
|
118
|
+
notices within Derivative Works that You distribute, alongside
|
|
119
|
+
or as an addendum to the NOTICE text from the Work, provided
|
|
120
|
+
that such additional attribution notices cannot be construed
|
|
121
|
+
as modifying the License.
|
|
122
|
+
|
|
123
|
+
You may add Your own copyright statement to Your modifications and
|
|
124
|
+
may provide additional or different license terms and conditions
|
|
125
|
+
for use, reproduction, or distribution of Your modifications, or
|
|
126
|
+
for any such Derivative Works as a whole, provided Your use,
|
|
127
|
+
reproduction, and distribution of the Work otherwise complies with
|
|
128
|
+
the conditions stated in this License.
|
|
129
|
+
|
|
130
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
131
|
+
any Contribution intentionally submitted for inclusion in the Work
|
|
132
|
+
by You to the Licensor shall be under the terms and conditions of
|
|
133
|
+
this License, without any additional terms or conditions.
|
|
134
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
|
135
|
+
the terms of any separate license agreement you may have executed
|
|
136
|
+
with Licensor regarding such Contributions.
|
|
137
|
+
|
|
138
|
+
6. Trademarks. This License does not grant permission to use the trade
|
|
139
|
+
names, trademarks, service marks, or product names of the Licensor,
|
|
140
|
+
except as required for reasonable and customary use in describing the
|
|
141
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
|
142
|
+
|
|
143
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
144
|
+
agreed to in writing, Licensor provides the Work (and each
|
|
145
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
146
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
147
|
+
implied, including, without limitation, any warranties or conditions
|
|
148
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
149
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
150
|
+
appropriateness of using or redistributing the Work and assume any
|
|
151
|
+
risks associated with Your exercise of permissions under this License.
|
|
152
|
+
|
|
153
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
|
154
|
+
whether in tort (including negligence), contract, or otherwise,
|
|
155
|
+
unless required by applicable law (such as deliberate and grossly
|
|
156
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
|
157
|
+
liable to You for damages, including any direct, indirect, special,
|
|
158
|
+
incidental, or consequential damages of any character arising as a
|
|
159
|
+
result of this License or out of the use or inability to use the
|
|
160
|
+
Work (including but not limited to damages for loss of goodwill,
|
|
161
|
+
work stoppage, computer failure or malfunction, or any and all
|
|
162
|
+
other commercial damages or losses), even if such Contributor
|
|
163
|
+
has been advised of the possibility of such damages.
|
|
164
|
+
|
|
165
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
|
166
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
|
167
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
168
|
+
or other liability obligations and/or rights consistent with this
|
|
169
|
+
License. However, in accepting such obligations, You may act only
|
|
170
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
|
171
|
+
of any other Contributor, and only if You agree to indemnify,
|
|
172
|
+
defend, and hold each Contributor harmless for any liability
|
|
173
|
+
incurred by, or claims asserted against, such Contributor by reason
|
|
174
|
+
of your accepting any such warranty or additional liability.
|
|
175
|
+
|
|
176
|
+
END OF TERMS AND CONDITIONS
|
|
177
|
+
|
|
178
|
+
APPENDIX: How to apply the Apache License to your work.
|
|
179
|
+
|
|
180
|
+
To apply the Apache License to your work, attach the following
|
|
181
|
+
boilerplate notice, with the fields enclosed by brackets "[]"
|
|
182
|
+
replaced with your own identifying information. (Don't include
|
|
183
|
+
the brackets!) The text should be enclosed in the appropriate
|
|
184
|
+
comment syntax for the file format. We also recommend that a
|
|
185
|
+
file or class name and description of purpose be included on the
|
|
186
|
+
same "printed page" as the copyright notice for easier
|
|
187
|
+
identification within third-party archives.
|
|
188
|
+
|
|
189
|
+
Copyright [yyyy] [name of copyright owner]
|
|
190
|
+
|
|
191
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
192
|
+
you may not use this file except in compliance with the License.
|
|
193
|
+
You may obtain a copy of the License at
|
|
194
|
+
|
|
195
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
196
|
+
|
|
197
|
+
Unless required by applicable law or agreed to in writing, software
|
|
198
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
199
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
200
|
+
See the License for the specific language governing permissions and
|
|
201
|
+
limitations under the License.
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
recursive-include src/harbor_client *.gz *.typed
|
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: harbor-framework-client
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: Typed synchronous and asynchronous clients for the Harbor API.
|
|
5
|
+
Project-URL: Homepage, https://harborframework.com
|
|
6
|
+
Project-URL: Issues, https://github.com/harbor-framework/harbor-client/issues
|
|
7
|
+
Project-URL: Repository, https://github.com/harbor-framework/harbor-client
|
|
8
|
+
Classifier: Development Status :: 3 - Alpha
|
|
9
|
+
Classifier: Intended Audience :: Developers
|
|
10
|
+
Classifier: License :: OSI Approved :: Apache Software License
|
|
11
|
+
Classifier: Operating System :: OS Independent
|
|
12
|
+
Classifier: Programming Language :: Python :: 3
|
|
13
|
+
Classifier: Programming Language :: Python :: 3 :: Only
|
|
14
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
15
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
16
|
+
Classifier: Typing :: Typed
|
|
17
|
+
Requires-Python: >=3.12
|
|
18
|
+
Description-Content-Type: text/markdown
|
|
19
|
+
License-File: LICENSE
|
|
20
|
+
Requires-Dist: requests>=2.31.0
|
|
21
|
+
Requires-Dist: pydantic<3,>=2.14.0
|
|
22
|
+
Requires-Dist: httpx>=0.27.0
|
|
23
|
+
Requires-Dist: jsonschema>=4.23.0
|
|
24
|
+
Provides-Extra: tus
|
|
25
|
+
Requires-Dist: tuspy<2,>=1.1.0; extra == "tus"
|
|
26
|
+
Dynamic: license-file
|
|
27
|
+
|
|
28
|
+
# Harbor API Python SDK
|
|
29
|
+
|
|
30
|
+
Typed synchronous and asynchronous clients for the [Harbor](https://harborframework.com) API.
|
|
31
|
+
|
|
32
|
+
```sh
|
|
33
|
+
pip install harbor-framework-client
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
The distribution is named `harbor-framework-client` and the import package is `harbor_client`. The unrelated `harbor-client` project on PyPI is a different package. Python 3.12 or newer is required. Install the `tus` extra for resumable uploads: `pip install "harbor-framework-client[tus]"`.
|
|
37
|
+
|
|
38
|
+
## Quickstart
|
|
39
|
+
|
|
40
|
+
```python
|
|
41
|
+
from harbor_client import HarborAPIClient
|
|
42
|
+
|
|
43
|
+
with HarborAPIClient(token="your-api-key") as client:
|
|
44
|
+
for job in client.jobs.list(state="running"):
|
|
45
|
+
print(job.id, job.name)
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
`token` takes a string or a callable that returns the current token. Each client owns one connection pool; use it as a context manager or call `close()`.
|
|
49
|
+
|
|
50
|
+
### Async
|
|
51
|
+
|
|
52
|
+
```python
|
|
53
|
+
import asyncio
|
|
54
|
+
|
|
55
|
+
from harbor_client import AsyncHarborAPIClient
|
|
56
|
+
|
|
57
|
+
|
|
58
|
+
async def main() -> None:
|
|
59
|
+
async with AsyncHarborAPIClient(token="your-api-key") as client:
|
|
60
|
+
async for job in client.jobs.list():
|
|
61
|
+
print(job.id, job.name)
|
|
62
|
+
|
|
63
|
+
|
|
64
|
+
asyncio.run(main())
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
`AsyncHarborAPIClient` also accepts `async_token`, an async callable that returns the token. Call `await client.aclose()` when you do not use the context manager.
|
|
68
|
+
|
|
69
|
+
## Pagination
|
|
70
|
+
|
|
71
|
+
List methods return pagers. Iterate a pager for items across all pages, or use `iter_pages()` for one page at a time:
|
|
72
|
+
|
|
73
|
+
```python
|
|
74
|
+
pager = client.jobs.list(page_size="50")
|
|
75
|
+
for page in pager.iter_pages():
|
|
76
|
+
print(len(page))
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
## Errors
|
|
80
|
+
|
|
81
|
+
HTTP errors raise `harbor_client.core.ApiError` or one of its subclasses exported from `harbor_client`, such as `NotFoundError`, `UnauthorizedError` and `ConflictError`. The error carries `status_code` and the parsed problem `body`; its message shows the problem's `detail`. Error messages never include request or response headers.
|
|
82
|
+
|
|
83
|
+
```python
|
|
84
|
+
from harbor_client import NotFoundError
|
|
85
|
+
|
|
86
|
+
try:
|
|
87
|
+
client.jobs.get(job_id="3f6c2a1e-8b4d-4e2a-9c1f-5d7e8a9b0c12")
|
|
88
|
+
except NotFoundError as error:
|
|
89
|
+
print(error.status_code, error.body)
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
The client validates requests and responses against the API contract it was built from. A request or response that does not match raises `harbor_client.ContractError`.
|
|
93
|
+
|
|
94
|
+
## Configuration
|
|
95
|
+
|
|
96
|
+
| Option | Purpose |
|
|
97
|
+
| --- | --- |
|
|
98
|
+
| `base_url` | Target another deployment. `client.set_base_url(...)` changes it later. |
|
|
99
|
+
| `harbor_api_version` | API version sent in the `Harbor-API-Version` header. Defaults to the version this release was generated from. |
|
|
100
|
+
| `timeout`, `retry` | Default request timeout in seconds and retry policy. |
|
|
101
|
+
| `headers` | Extra headers sent with every request. |
|
|
102
|
+
| `transport` | A custom `httpx.BaseTransport`, for example for proxies or tests. |
|
|
103
|
+
| `httpx_client`, `http_client` | Reuse an `httpx.Client` or a `requests.Session`. An `httpx.AsyncClient` is not accepted. |
|
|
104
|
+
|
|
105
|
+
Per call, pass `request_options={"timeout_in_seconds": 30, "max_retries": 2}`, or `additional_headers` and `additional_query_parameters`.
|
|
106
|
+
|
|
107
|
+
## File transfers
|
|
108
|
+
|
|
109
|
+
`StorageTransfers` uploads and downloads task, dataset, job and trial files through signed storage grants, including resumable TUS uploads:
|
|
110
|
+
|
|
111
|
+
```python
|
|
112
|
+
from pathlib import Path
|
|
113
|
+
|
|
114
|
+
from harbor_client import UploadFile
|
|
115
|
+
from harbor_client.transfers import StorageTransfers
|
|
116
|
+
|
|
117
|
+
transfers = StorageTransfers(client)
|
|
118
|
+
transfers.download(
|
|
119
|
+
kind="job",
|
|
120
|
+
resource_id="3f6c2a1e-8b4d-4e2a-9c1f-5d7e8a9b0c12",
|
|
121
|
+
role="archive",
|
|
122
|
+
destination=Path("job.tar.gz"),
|
|
123
|
+
)
|
|
124
|
+
```
|
|
125
|
+
|
|
126
|
+
Use `AsyncStorageTransfers` with `AsyncHarborAPIClient`. Upload sources must stay unchanged until the upload completes. A failed transfer raises `StorageTransferError`, which carries `upload_id` so `complete_upload` can resume a finished upload.
|
|
127
|
+
|
|
128
|
+
## Reference
|
|
129
|
+
|
|
130
|
+
[reference.md](https://github.com/harbor-framework/harbor-client/blob/main/reference.md) lists every resource and method.
|
|
131
|
+
|
|
132
|
+
## License
|
|
133
|
+
|
|
134
|
+
Apache-2.0. See [LICENSE](https://github.com/harbor-framework/harbor-client/blob/main/LICENSE).
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
# Harbor API Python SDK
|
|
2
|
+
|
|
3
|
+
Typed synchronous and asynchronous clients for the [Harbor](https://harborframework.com) API.
|
|
4
|
+
|
|
5
|
+
```sh
|
|
6
|
+
pip install harbor-framework-client
|
|
7
|
+
```
|
|
8
|
+
|
|
9
|
+
The distribution is named `harbor-framework-client` and the import package is `harbor_client`. The unrelated `harbor-client` project on PyPI is a different package. Python 3.12 or newer is required. Install the `tus` extra for resumable uploads: `pip install "harbor-framework-client[tus]"`.
|
|
10
|
+
|
|
11
|
+
## Quickstart
|
|
12
|
+
|
|
13
|
+
```python
|
|
14
|
+
from harbor_client import HarborAPIClient
|
|
15
|
+
|
|
16
|
+
with HarborAPIClient(token="your-api-key") as client:
|
|
17
|
+
for job in client.jobs.list(state="running"):
|
|
18
|
+
print(job.id, job.name)
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
`token` takes a string or a callable that returns the current token. Each client owns one connection pool; use it as a context manager or call `close()`.
|
|
22
|
+
|
|
23
|
+
### Async
|
|
24
|
+
|
|
25
|
+
```python
|
|
26
|
+
import asyncio
|
|
27
|
+
|
|
28
|
+
from harbor_client import AsyncHarborAPIClient
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
async def main() -> None:
|
|
32
|
+
async with AsyncHarborAPIClient(token="your-api-key") as client:
|
|
33
|
+
async for job in client.jobs.list():
|
|
34
|
+
print(job.id, job.name)
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
asyncio.run(main())
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
`AsyncHarborAPIClient` also accepts `async_token`, an async callable that returns the token. Call `await client.aclose()` when you do not use the context manager.
|
|
41
|
+
|
|
42
|
+
## Pagination
|
|
43
|
+
|
|
44
|
+
List methods return pagers. Iterate a pager for items across all pages, or use `iter_pages()` for one page at a time:
|
|
45
|
+
|
|
46
|
+
```python
|
|
47
|
+
pager = client.jobs.list(page_size="50")
|
|
48
|
+
for page in pager.iter_pages():
|
|
49
|
+
print(len(page))
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
## Errors
|
|
53
|
+
|
|
54
|
+
HTTP errors raise `harbor_client.core.ApiError` or one of its subclasses exported from `harbor_client`, such as `NotFoundError`, `UnauthorizedError` and `ConflictError`. The error carries `status_code` and the parsed problem `body`; its message shows the problem's `detail`. Error messages never include request or response headers.
|
|
55
|
+
|
|
56
|
+
```python
|
|
57
|
+
from harbor_client import NotFoundError
|
|
58
|
+
|
|
59
|
+
try:
|
|
60
|
+
client.jobs.get(job_id="3f6c2a1e-8b4d-4e2a-9c1f-5d7e8a9b0c12")
|
|
61
|
+
except NotFoundError as error:
|
|
62
|
+
print(error.status_code, error.body)
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
The client validates requests and responses against the API contract it was built from. A request or response that does not match raises `harbor_client.ContractError`.
|
|
66
|
+
|
|
67
|
+
## Configuration
|
|
68
|
+
|
|
69
|
+
| Option | Purpose |
|
|
70
|
+
| --- | --- |
|
|
71
|
+
| `base_url` | Target another deployment. `client.set_base_url(...)` changes it later. |
|
|
72
|
+
| `harbor_api_version` | API version sent in the `Harbor-API-Version` header. Defaults to the version this release was generated from. |
|
|
73
|
+
| `timeout`, `retry` | Default request timeout in seconds and retry policy. |
|
|
74
|
+
| `headers` | Extra headers sent with every request. |
|
|
75
|
+
| `transport` | A custom `httpx.BaseTransport`, for example for proxies or tests. |
|
|
76
|
+
| `httpx_client`, `http_client` | Reuse an `httpx.Client` or a `requests.Session`. An `httpx.AsyncClient` is not accepted. |
|
|
77
|
+
|
|
78
|
+
Per call, pass `request_options={"timeout_in_seconds": 30, "max_retries": 2}`, or `additional_headers` and `additional_query_parameters`.
|
|
79
|
+
|
|
80
|
+
## File transfers
|
|
81
|
+
|
|
82
|
+
`StorageTransfers` uploads and downloads task, dataset, job and trial files through signed storage grants, including resumable TUS uploads:
|
|
83
|
+
|
|
84
|
+
```python
|
|
85
|
+
from pathlib import Path
|
|
86
|
+
|
|
87
|
+
from harbor_client import UploadFile
|
|
88
|
+
from harbor_client.transfers import StorageTransfers
|
|
89
|
+
|
|
90
|
+
transfers = StorageTransfers(client)
|
|
91
|
+
transfers.download(
|
|
92
|
+
kind="job",
|
|
93
|
+
resource_id="3f6c2a1e-8b4d-4e2a-9c1f-5d7e8a9b0c12",
|
|
94
|
+
role="archive",
|
|
95
|
+
destination=Path("job.tar.gz"),
|
|
96
|
+
)
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
Use `AsyncStorageTransfers` with `AsyncHarborAPIClient`. Upload sources must stay unchanged until the upload completes. A failed transfer raises `StorageTransferError`, which carries `upload_id` so `complete_upload` can resume a finished upload.
|
|
100
|
+
|
|
101
|
+
## Reference
|
|
102
|
+
|
|
103
|
+
[reference.md](https://github.com/harbor-framework/harbor-client/blob/main/reference.md) lists every resource and method.
|
|
104
|
+
|
|
105
|
+
## License
|
|
106
|
+
|
|
107
|
+
Apache-2.0. See [LICENSE](https://github.com/harbor-framework/harbor-client/blob/main/LICENSE).
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
[project.optional-dependencies]
|
|
2
|
+
tus = ["tuspy>=1.1.0,<2"]
|
|
3
|
+
|
|
4
|
+
[tool.setuptools.package-data]
|
|
5
|
+
harbor_client = ["py.typed", "_openapi.json.gz", "**/*.pyi"]
|
|
6
|
+
|
|
7
|
+
[build-system]
|
|
8
|
+
requires = ["setuptools>=61.0"]
|
|
9
|
+
build-backend = "setuptools.build_meta"
|
|
10
|
+
|
|
11
|
+
[project]
|
|
12
|
+
name = "harbor-framework-client"
|
|
13
|
+
version = "0.1.0"
|
|
14
|
+
description = "Typed synchronous and asynchronous clients for the Harbor API."
|
|
15
|
+
readme = "README.md"
|
|
16
|
+
requires-python = ">=3.12"
|
|
17
|
+
classifiers = [
|
|
18
|
+
"Development Status :: 3 - Alpha",
|
|
19
|
+
"Intended Audience :: Developers",
|
|
20
|
+
"License :: OSI Approved :: Apache Software License",
|
|
21
|
+
"Operating System :: OS Independent",
|
|
22
|
+
"Programming Language :: Python :: 3",
|
|
23
|
+
"Programming Language :: Python :: 3 :: Only",
|
|
24
|
+
"Programming Language :: Python :: 3.12",
|
|
25
|
+
"Programming Language :: Python :: 3.13",
|
|
26
|
+
"Typing :: Typed"
|
|
27
|
+
]
|
|
28
|
+
dependencies = [
|
|
29
|
+
"requests>=2.31.0",
|
|
30
|
+
"pydantic>=2.14.0,<3",
|
|
31
|
+
"httpx>=0.27.0",
|
|
32
|
+
"jsonschema>=4.23.0"
|
|
33
|
+
]
|
|
34
|
+
|
|
35
|
+
[project.urls]
|
|
36
|
+
Homepage = "https://harborframework.com"
|
|
37
|
+
Issues = "https://github.com/harbor-framework/harbor-client/issues"
|
|
38
|
+
Repository = "https://github.com/harbor-framework/harbor-client"
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
"""Build static exports from Fern's lazy model registry for wheel consumers."""
|
|
2
|
+
|
|
3
|
+
import ast
|
|
4
|
+
from pathlib import Path
|
|
5
|
+
from setuptools import setup
|
|
6
|
+
from setuptools.command.build_py import build_py
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
def generate_export_stubs(directory: Path) -> None:
|
|
10
|
+
"""Expose lazy runtime model exports to static type checkers."""
|
|
11
|
+
registry = ast.parse((directory / "types/__init__.py").read_text())
|
|
12
|
+
mapping = next(
|
|
13
|
+
(
|
|
14
|
+
ast.literal_eval(node.value)
|
|
15
|
+
for node in registry.body
|
|
16
|
+
if isinstance(node, ast.Assign)
|
|
17
|
+
and any(
|
|
18
|
+
isinstance(target, ast.Name) and target.id == "_MODEL_TO_MODULE"
|
|
19
|
+
for target in node.targets
|
|
20
|
+
)
|
|
21
|
+
),
|
|
22
|
+
None,
|
|
23
|
+
)
|
|
24
|
+
if not isinstance(mapping, dict) or not all(
|
|
25
|
+
isinstance(name, str)
|
|
26
|
+
and name.isidentifier()
|
|
27
|
+
and isinstance(module, str)
|
|
28
|
+
and all(part.isidentifier() for part in module.split("."))
|
|
29
|
+
for name, module in mapping.items()
|
|
30
|
+
):
|
|
31
|
+
raise SystemExit("The generated SDK has no valid lazy model export registry")
|
|
32
|
+
header = "# Generated from the SDK's lazy export registry; do not edit.\n\n"
|
|
33
|
+
(directory / "types/__init__.pyi").write_text(
|
|
34
|
+
header
|
|
35
|
+
+ "".join(
|
|
36
|
+
f"from .{module} import {name} as {name}\n"
|
|
37
|
+
for name, module in sorted(mapping.items())
|
|
38
|
+
)
|
|
39
|
+
)
|
|
40
|
+
exports = []
|
|
41
|
+
public = set()
|
|
42
|
+
body = ast.parse((directory / "__init__.py").read_text()).body
|
|
43
|
+
imports = list(body)
|
|
44
|
+
for node in body:
|
|
45
|
+
if (
|
|
46
|
+
isinstance(node, ast.If)
|
|
47
|
+
and isinstance(node.test, ast.Name)
|
|
48
|
+
and node.test.id == "TYPE_CHECKING"
|
|
49
|
+
):
|
|
50
|
+
imports.extend(node.body)
|
|
51
|
+
for node in imports:
|
|
52
|
+
if isinstance(node, ast.ImportFrom):
|
|
53
|
+
for item in node.names:
|
|
54
|
+
alias = item.asname or item.name
|
|
55
|
+
if alias.startswith("_") and alias != "__version__":
|
|
56
|
+
continue
|
|
57
|
+
exports.append(
|
|
58
|
+
f"from {'.' * node.level}{node.module or ''} import {item.name} as {alias}\n"
|
|
59
|
+
)
|
|
60
|
+
public.add(alias)
|
|
61
|
+
exports.extend(
|
|
62
|
+
f"from .types import {name} as {name}\n"
|
|
63
|
+
for name in sorted(mapping)
|
|
64
|
+
if name not in public
|
|
65
|
+
)
|
|
66
|
+
(directory / "__init__.pyi").write_text(header + "".join(exports))
|
|
67
|
+
|
|
68
|
+
|
|
69
|
+
class TypedBuildPy(build_py):
|
|
70
|
+
def run(self):
|
|
71
|
+
super().run()
|
|
72
|
+
generate_export_stubs(Path(self.build_lib) / "harbor_client")
|
|
73
|
+
|
|
74
|
+
|
|
75
|
+
setup(cmdclass={"build_py": TypedBuildPy})
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
from typing import TYPE_CHECKING
|
|
2
|
+
|
|
3
|
+
from .client import HarborAPIClient, AsyncHarborAPIClient
|
|
4
|
+
from .net.environment import HarborApiClientEnvironment
|
|
5
|
+
from .version import __version__
|
|
6
|
+
from .errors import (
|
|
7
|
+
BadRequestError,
|
|
8
|
+
ConflictError,
|
|
9
|
+
ForbiddenError,
|
|
10
|
+
InternalServerError,
|
|
11
|
+
NotFoundError,
|
|
12
|
+
ServiceUnavailableError,
|
|
13
|
+
TooManyRequestsError,
|
|
14
|
+
UnauthorizedError,
|
|
15
|
+
)
|
|
16
|
+
|
|
17
|
+
if TYPE_CHECKING:
|
|
18
|
+
from .validation import ContractError
|
|
19
|
+
from .transfers import StorageTransferError, UploadFile
|
|
20
|
+
|
|
21
|
+
from . import types as _models
|
|
22
|
+
|
|
23
|
+
import importlib
|
|
24
|
+
|
|
25
|
+
_LAZY_EXPORTS = {
|
|
26
|
+
"ContractError": ".validation",
|
|
27
|
+
"StorageTransferError": ".transfers",
|
|
28
|
+
"UploadFile": ".transfers",
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
def __getattr__(name):
|
|
33
|
+
"""Falls back to the lazy ``.types`` registry for any name not re-exported above."""
|
|
34
|
+
module = _LAZY_EXPORTS.get(name)
|
|
35
|
+
if module is not None:
|
|
36
|
+
value = getattr(importlib.import_module(module, __name__), name)
|
|
37
|
+
globals()[name] = value
|
|
38
|
+
return value
|
|
39
|
+
try:
|
|
40
|
+
return getattr(_models, name)
|
|
41
|
+
except AttributeError:
|
|
42
|
+
raise AttributeError(f"module {__name__!r} has no attribute {name!r}") from None
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
def __dir__():
|
|
46
|
+
return sorted(set(globals()) | set(dir(_models)) | set(_LAZY_EXPORTS))
|
|
47
|
+
|
|
48
|
+
# Preserve the established environment import across generator naming changes.
|
|
49
|
+
from .net.environment import HarborAPIClientEnvironment
|
|
Binary file
|