label-studio-sdk 1.0.20__py3-none-any.whl → 2.0.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of label-studio-sdk might be problematic. Click here for more details.
- label_studio_sdk/__init__.py +325 -180
- label_studio_sdk/actions/__init__.py +4 -0
- label_studio_sdk/actions/client.py +46 -10
- label_studio_sdk/actions/types/__init__.py +4 -0
- label_studio_sdk/actions/types/actions_create_request_filters.py +2 -2
- label_studio_sdk/actions/types/actions_create_request_filters_items_item.py +2 -2
- label_studio_sdk/actions/types/actions_create_request_id.py +7 -7
- label_studio_sdk/actions/types/actions_create_request_selected_items_excluded.py +2 -2
- label_studio_sdk/actions/types/actions_create_request_selected_items_included.py +2 -2
- label_studio_sdk/actions/types/actions_list_response_item.py +25 -0
- label_studio_sdk/actions/types/actions_list_response_item_dialog.py +22 -0
- label_studio_sdk/annotations/__init__.py +2 -2
- label_studio_sdk/annotations/client.py +379 -243
- label_studio_sdk/annotations/types/__init__.py +4 -2
- label_studio_sdk/annotations/types/annotation_bulk_serializer_with_selected_items_request_last_action.py +7 -0
- label_studio_sdk/annotations/types/annotations_create_bulk_response_item.py +8 -5
- label_studio_sdk/base_client.py +28 -24
- label_studio_sdk/comments/client.py +378 -140
- label_studio_sdk/converter/README.md +207 -0
- label_studio_sdk/converter/imports/coco.py +132 -23
- label_studio_sdk/core/__init__.py +4 -0
- label_studio_sdk/core/unchecked_base_model.py +305 -0
- label_studio_sdk/environment.py +1 -1
- label_studio_sdk/errors/__init__.py +10 -1
- label_studio_sdk/errors/forbidden_error.py +9 -0
- label_studio_sdk/errors/method_not_allowed_error.py +9 -0
- label_studio_sdk/export_storage/__init__.py +1 -24
- label_studio_sdk/export_storage/azure/__init__.py +0 -3
- label_studio_sdk/export_storage/azure/client.py +231 -273
- label_studio_sdk/export_storage/client.py +5 -5
- label_studio_sdk/export_storage/gcs/__init__.py +0 -3
- label_studio_sdk/export_storage/gcs/client.py +231 -273
- label_studio_sdk/export_storage/local/__init__.py +0 -3
- label_studio_sdk/export_storage/local/client.py +211 -253
- label_studio_sdk/export_storage/redis/__init__.py +0 -3
- label_studio_sdk/export_storage/redis/client.py +239 -281
- label_studio_sdk/export_storage/s3/__init__.py +0 -3
- label_studio_sdk/export_storage/s3/client.py +254 -296
- label_studio_sdk/export_storage/s3s/client.py +694 -210
- label_studio_sdk/export_storage/types/export_storage_list_types_response_item.py +2 -2
- label_studio_sdk/files/client.py +52 -71
- label_studio_sdk/import_storage/__init__.py +1 -24
- label_studio_sdk/import_storage/azure/__init__.py +0 -3
- label_studio_sdk/import_storage/azure/client.py +249 -299
- label_studio_sdk/import_storage/client.py +5 -5
- label_studio_sdk/import_storage/gcs/__init__.py +0 -3
- label_studio_sdk/import_storage/gcs/client.py +249 -299
- label_studio_sdk/import_storage/local/__init__.py +0 -3
- label_studio_sdk/import_storage/local/client.py +211 -257
- label_studio_sdk/import_storage/redis/__init__.py +0 -3
- label_studio_sdk/import_storage/redis/client.py +239 -285
- label_studio_sdk/import_storage/s3/__init__.py +0 -3
- label_studio_sdk/import_storage/s3/client.py +274 -324
- label_studio_sdk/import_storage/s3s/client.py +728 -434
- label_studio_sdk/import_storage/types/import_storage_list_types_response_item.py +2 -2
- label_studio_sdk/jwt_settings/client.py +56 -58
- label_studio_sdk/label_interface/control_tags.py +48 -8
- label_studio_sdk/label_interface/interface.py +261 -56
- label_studio_sdk/ml/__init__.py +2 -16
- label_studio_sdk/ml/client.py +196 -179
- label_studio_sdk/ml/types/__init__.py +2 -12
- label_studio_sdk/ml/types/ml_list_model_versions_response.py +20 -0
- label_studio_sdk/model_providers/__init__.py +3 -0
- label_studio_sdk/model_providers/client.py +280 -228
- label_studio_sdk/model_providers/types/__init__.py +5 -0
- label_studio_sdk/{prompts/types/prompts_batch_predictions_response.py → model_providers/types/model_providers_list_model_provider_choices_response.py} +3 -3
- label_studio_sdk/organizations/__init__.py +5 -0
- label_studio_sdk/organizations/client.py +331 -0
- label_studio_sdk/organizations/members/__init__.py +2 -0
- label_studio_sdk/organizations/members/client.py +290 -0
- label_studio_sdk/predictions/client.py +29 -77
- label_studio_sdk/projects/__init__.py +18 -9
- label_studio_sdk/projects/client.py +905 -414
- label_studio_sdk/projects/exports/__init__.py +2 -2
- label_studio_sdk/projects/exports/client.py +336 -396
- label_studio_sdk/projects/exports/client_ext.py +30 -30
- label_studio_sdk/projects/exports/types/__init__.py +1 -2
- label_studio_sdk/projects/exports/types/exports_convert_response.py +5 -9
- label_studio_sdk/projects/pauses/client.py +114 -105
- label_studio_sdk/projects/stats/__init__.py +5 -0
- label_studio_sdk/projects/stats/client.py +175 -0
- label_studio_sdk/projects/stats/types/__init__.py +8 -0
- label_studio_sdk/projects/stats/types/stats_iaa_response.py +44 -0
- label_studio_sdk/projects/stats/types/stats_iaa_response_common_tasks.py +7 -0
- label_studio_sdk/projects/stats/types/stats_iaa_response_iaa.py +5 -0
- label_studio_sdk/{types/base_task_file_upload.py → projects/stats/types/stats_iaa_response_std.py} +1 -1
- label_studio_sdk/projects/types/__init__.py +10 -6
- label_studio_sdk/projects/types/lse_project_create_request_sampling.py +7 -0
- label_studio_sdk/projects/types/lse_project_create_request_skip_queue.py +7 -0
- label_studio_sdk/projects/types/patched_lse_project_update_request_sampling.py +7 -0
- label_studio_sdk/projects/types/patched_lse_project_update_request_skip_queue.py +7 -0
- label_studio_sdk/{prompts/types/prompts_batch_failed_predictions_response.py → projects/types/projects_duplicate_response.py} +8 -5
- label_studio_sdk/projects/types/projects_import_tasks_response.py +2 -2
- label_studio_sdk/projects/types/projects_list_request_filter.py +1 -1
- label_studio_sdk/prompts/__init__.py +4 -10
- label_studio_sdk/prompts/client.py +511 -442
- label_studio_sdk/prompts/indicators/__init__.py +3 -0
- label_studio_sdk/prompts/indicators/client.py +47 -49
- label_studio_sdk/prompts/indicators/types/__init__.py +5 -0
- label_studio_sdk/{types/key_indicator_value.py → prompts/indicators/types/indicators_list_response_item.py} +3 -3
- label_studio_sdk/prompts/runs/client.py +113 -135
- label_studio_sdk/prompts/types/__init__.py +2 -12
- label_studio_sdk/prompts/types/prompts_compatible_projects_request_project_type.py +7 -0
- label_studio_sdk/prompts/versions/client.py +372 -312
- label_studio_sdk/tasks/__init__.py +2 -2
- label_studio_sdk/tasks/client.py +514 -213
- label_studio_sdk/tasks/types/__init__.py +1 -2
- label_studio_sdk/tokens/client.py +160 -152
- label_studio_sdk/tokens/client_ext.py +3 -3
- label_studio_sdk/types/__init__.py +258 -142
- label_studio_sdk/{webhooks/types/webhooks_update_request_actions_item.py → types/actions_enum.py} +4 -1
- label_studio_sdk/types/all_roles_project_list.py +197 -0
- label_studio_sdk/types/all_roles_project_list_sampling.py +7 -0
- label_studio_sdk/types/all_roles_project_list_skip_queue.py +7 -0
- label_studio_sdk/types/annotated_enum.py +5 -0
- label_studio_sdk/types/annotation.py +24 -10
- label_studio_sdk/types/annotation_last_action.py +3 -15
- label_studio_sdk/types/{annotations_dm_field.py → annotation_request.py} +21 -30
- label_studio_sdk/types/annotation_request_last_action.py +7 -0
- label_studio_sdk/types/assignment_settings.py +31 -0
- label_studio_sdk/types/assignment_settings_label_stream_task_distribution.py +7 -0
- label_studio_sdk/types/assignment_settings_request.py +32 -0
- label_studio_sdk/types/assignment_settings_request_label_stream_task_distribution.py +7 -0
- label_studio_sdk/types/{key_indicators_item_additional_kpis_item.py → associated_project.py} +9 -6
- label_studio_sdk/types/auth_method_enum.py +5 -0
- label_studio_sdk/types/azure_blob_export_storage.py +8 -12
- label_studio_sdk/types/azure_blob_import_storage.py +8 -12
- label_studio_sdk/types/{prompt_associated_projects_item_id.py → batch_failed_predictions.py} +4 -4
- label_studio_sdk/types/{access_token_response.py → batch_predictions.py} +6 -8
- label_studio_sdk/types/blank_enum.py +5 -0
- label_studio_sdk/types/{key_indicators_item_extra_kpis_item.py → blueprint_list.py} +12 -6
- label_studio_sdk/types/budget_reset_period_enum.py +5 -0
- label_studio_sdk/types/child_filter.py +44 -0
- label_studio_sdk/types/comment.py +39 -14
- label_studio_sdk/types/comment_request.py +32 -0
- label_studio_sdk/types/comment_serializer_with_expanded_user.py +53 -0
- label_studio_sdk/types/converted_format.py +5 -5
- label_studio_sdk/types/{api_token_response.py → converted_format_request.py} +8 -15
- label_studio_sdk/types/custom_scripts_editable_by_enum.py +5 -0
- label_studio_sdk/types/default_role_enum.py +5 -0
- label_studio_sdk/types/edition_enum.py +5 -0
- label_studio_sdk/types/export.py +7 -7
- label_studio_sdk/types/file_upload.py +5 -5
- label_studio_sdk/types/filter.py +9 -6
- label_studio_sdk/types/filter_group.py +3 -3
- label_studio_sdk/types/finished_enum.py +5 -0
- label_studio_sdk/types/gcs_export_storage.py +8 -12
- label_studio_sdk/types/gcs_import_storage.py +8 -12
- label_studio_sdk/types/{rotate_token_response.py → hotkeys.py} +5 -8
- label_studio_sdk/types/{base_task.py → import_api_request.py} +11 -34
- label_studio_sdk/types/inference_run_cost_estimate.py +2 -2
- label_studio_sdk/types/label_stream_task_distribution_enum.py +5 -0
- label_studio_sdk/types/{annotations_dm_field_last_action.py → last_action_enum.py} +1 -1
- label_studio_sdk/types/local_files_export_storage.py +8 -12
- label_studio_sdk/types/local_files_import_storage.py +8 -12
- label_studio_sdk/types/{annotation_filter_options.py → lse_annotation_filter_options.py} +12 -2
- label_studio_sdk/types/lse_annotation_filter_options_request.py +42 -0
- label_studio_sdk/types/lse_annotation_filter_options_request_reviewed.py +7 -0
- label_studio_sdk/types/lse_annotation_filter_options_reviewed.py +7 -0
- label_studio_sdk/types/{export_snapshot.py → lse_export_create.py} +11 -11
- label_studio_sdk/types/lse_fields.py +49 -0
- label_studio_sdk/types/lse_fields_onboarding_state.py +8 -0
- label_studio_sdk/types/lse_fields_trial_role.py +8 -0
- label_studio_sdk/types/lse_key_indicator_value.py +35 -0
- label_studio_sdk/types/lse_organization.py +57 -0
- label_studio_sdk/types/lse_organization_custom_scripts_editable_by.py +7 -0
- label_studio_sdk/types/lse_project_create.py +196 -0
- label_studio_sdk/types/lse_project_create_sampling.py +7 -0
- label_studio_sdk/types/lse_project_create_skip_queue.py +7 -0
- label_studio_sdk/types/lse_project_update.py +215 -0
- label_studio_sdk/types/lse_project_update_sampling.py +7 -0
- label_studio_sdk/types/lse_project_update_skip_queue.py +7 -0
- label_studio_sdk/types/lse_s3export_storage.py +134 -0
- label_studio_sdk/{import_storage/s3/types/s3create_response.py → types/lse_s3export_storage_request.py} +47 -21
- label_studio_sdk/{import_storage/s3/types/s3update_response.py → types/lse_s3import_storage.py} +60 -21
- label_studio_sdk/types/{s3s_import_storage.py → lse_s3import_storage_request.py} +32 -21
- label_studio_sdk/types/lse_task.py +117 -0
- label_studio_sdk/types/{data_manager_task_serializer_drafts_item.py → lse_task_drafts_item.py} +2 -2
- label_studio_sdk/types/lse_task_filter_options.py +63 -0
- label_studio_sdk/types/lse_task_filter_options_annotated.py +7 -0
- label_studio_sdk/types/lse_task_filter_options_finished.py +7 -0
- label_studio_sdk/types/lse_task_filter_options_request.py +63 -0
- label_studio_sdk/types/lse_task_filter_options_request_annotated.py +7 -0
- label_studio_sdk/types/lse_task_filter_options_request_finished.py +7 -0
- label_studio_sdk/types/lse_task_filter_options_request_reviewed.py +7 -0
- label_studio_sdk/types/lse_task_filter_options_request_skipped.py +7 -0
- label_studio_sdk/types/lse_task_filter_options_reviewed.py +7 -0
- label_studio_sdk/types/lse_task_filter_options_skipped.py +7 -0
- label_studio_sdk/types/{data_manager_task_serializer_predictions_item.py → lse_task_predictions_item.py} +4 -5
- label_studio_sdk/types/lse_task_serializer_for_annotators.py +54 -0
- label_studio_sdk/types/lse_task_serializer_for_annotators_drafts_item.py +22 -0
- label_studio_sdk/types/lse_task_serializer_for_annotators_predictions_item.py +28 -0
- label_studio_sdk/types/lse_task_serializer_for_reviewers.py +117 -0
- label_studio_sdk/types/lse_task_serializer_for_reviewers_drafts_item.py +22 -0
- label_studio_sdk/types/lse_task_serializer_for_reviewers_predictions_item.py +28 -0
- label_studio_sdk/types/lse_user.py +49 -0
- label_studio_sdk/types/{base_user.py → lse_user_api.py} +17 -6
- label_studio_sdk/types/lseapi_token_create.py +21 -0
- label_studio_sdk/types/lseapi_token_list.py +21 -0
- label_studio_sdk/types/lsejwt_settings.py +32 -0
- label_studio_sdk/types/maybe_expanded_comment.py +7 -0
- label_studio_sdk/types/ml_backend.py +16 -17
- label_studio_sdk/types/mode_enum.py +5 -0
- label_studio_sdk/types/model_interface.py +44 -0
- label_studio_sdk/types/model_interface_request.py +40 -0
- label_studio_sdk/types/model_interface_serializer_get.py +45 -0
- label_studio_sdk/types/model_provider_connection.py +48 -17
- label_studio_sdk/types/model_provider_connection_budget_reset_period.py +3 -1
- label_studio_sdk/types/model_provider_connection_request.py +71 -0
- label_studio_sdk/types/model_run.py +40 -0
- label_studio_sdk/types/{inference_run_status.py → model_run_status_enum.py} +1 -1
- label_studio_sdk/types/null_enum.py +3 -0
- label_studio_sdk/types/onboarding_state_enum.py +7 -0
- label_studio_sdk/types/organization_billing.py +20 -0
- label_studio_sdk/types/organization_id.py +28 -0
- label_studio_sdk/types/organization_invite.py +20 -0
- label_studio_sdk/types/organization_member.py +37 -0
- label_studio_sdk/types/organization_membership.py +24 -0
- label_studio_sdk/{projects/types/projects_list_response.py → types/paginated_all_roles_project_list_list.py} +5 -5
- label_studio_sdk/types/{jwt_settings_response.py → paginated_role_based_task_list.py} +11 -9
- label_studio_sdk/types/pause.py +55 -14
- label_studio_sdk/types/pause_request.py +41 -0
- label_studio_sdk/types/prediction.py +7 -11
- label_studio_sdk/types/prediction_request.py +56 -0
- label_studio_sdk/types/project.py +32 -39
- label_studio_sdk/types/project_import.py +12 -13
- label_studio_sdk/types/project_label_config.py +2 -2
- label_studio_sdk/types/project_label_config_request.py +22 -0
- label_studio_sdk/types/project_sampling.py +3 -3
- label_studio_sdk/types/project_skip_queue.py +3 -1
- label_studio_sdk/types/project_subset_enum.py +5 -0
- label_studio_sdk/types/{prompt_version_provider.py → provider_enum.py} +1 -1
- label_studio_sdk/types/reason_enum.py +7 -0
- label_studio_sdk/types/redis_export_storage.py +8 -12
- label_studio_sdk/types/redis_import_storage.py +8 -12
- label_studio_sdk/types/refined_prompt_response.py +5 -6
- label_studio_sdk/types/requeue_rejected_tasks_mode_enum.py +5 -0
- label_studio_sdk/types/review_criteria_enum.py +5 -0
- label_studio_sdk/types/review_settings.py +80 -0
- label_studio_sdk/types/review_settings_request.py +80 -0
- label_studio_sdk/types/review_settings_request_requeue_rejected_tasks_mode.py +8 -0
- label_studio_sdk/types/review_settings_request_review_criteria.py +7 -0
- label_studio_sdk/types/review_settings_requeue_rejected_tasks_mode.py +8 -0
- label_studio_sdk/types/review_settings_review_criteria.py +7 -0
- label_studio_sdk/types/reviewed_enum.py +5 -0
- label_studio_sdk/types/role_based_task.py +8 -0
- label_studio_sdk/types/s3export_storage.py +8 -12
- label_studio_sdk/types/s3import_storage.py +8 -12
- label_studio_sdk/types/sampling_enum.py +7 -0
- label_studio_sdk/types/scope_enum.py +5 -0
- label_studio_sdk/types/selected_items_request.py +23 -0
- label_studio_sdk/types/serialization_option.py +2 -6
- label_studio_sdk/types/serialization_option_request.py +22 -0
- label_studio_sdk/types/serialization_options.py +17 -5
- label_studio_sdk/types/serialization_options_request.py +47 -0
- label_studio_sdk/types/skill_name_enum.py +5 -0
- label_studio_sdk/types/skip_queue_enum.py +5 -0
- label_studio_sdk/types/skipped_enum.py +5 -0
- label_studio_sdk/types/state_enum.py +5 -0
- label_studio_sdk/types/status7bf_enum.py +5 -0
- label_studio_sdk/types/{azure_blob_import_storage_status.py → status_c5a_enum.py} +2 -2
- label_studio_sdk/types/third_party_model_version.py +65 -0
- label_studio_sdk/types/third_party_model_version_request.py +54 -0
- label_studio_sdk/types/token_refresh_response.py +19 -0
- label_studio_sdk/types/token_rotate_response.py +19 -0
- label_studio_sdk/types/trial_role_enum.py +16 -0
- label_studio_sdk/types/user_simple.py +8 -5
- label_studio_sdk/types/user_simple_request.py +28 -0
- label_studio_sdk/types/version_response.py +49 -0
- label_studio_sdk/types/view.py +8 -15
- label_studio_sdk/types/webhook.py +9 -13
- label_studio_sdk/types/webhook_serializer_for_update.py +15 -13
- label_studio_sdk/types/workspace.py +14 -34
- label_studio_sdk/types/workspace_member_create.py +27 -0
- label_studio_sdk/types/workspace_member_list.py +24 -0
- label_studio_sdk/users/client.py +604 -87
- label_studio_sdk/users/types/users_get_token_response.py +4 -11
- label_studio_sdk/users/types/users_reset_token_response.py +4 -11
- label_studio_sdk/versions/__init__.py +0 -3
- label_studio_sdk/versions/client.py +14 -14
- label_studio_sdk/views/client.py +227 -141
- label_studio_sdk/views/types/views_create_request_data.py +2 -2
- label_studio_sdk/views/types/views_create_request_data_filters.py +2 -2
- label_studio_sdk/views/types/views_create_request_data_filters_items_item.py +2 -2
- label_studio_sdk/views/types/views_update_request_data.py +2 -2
- label_studio_sdk/views/types/views_update_request_data_filters.py +2 -2
- label_studio_sdk/views/types/views_update_request_data_filters_items_item.py +2 -2
- label_studio_sdk/webhooks/__init__.py +36 -2
- label_studio_sdk/webhooks/client.py +173 -367
- label_studio_sdk/webhooks/types/__init__.py +34 -2
- label_studio_sdk/webhooks/types/webhooks_info_response.py +80 -0
- label_studio_sdk/webhooks/types/webhooks_info_response_annotation_created.py +24 -0
- label_studio_sdk/webhooks/types/webhooks_info_response_annotation_updated.py +24 -0
- label_studio_sdk/webhooks/types/webhooks_info_response_annotations_created.py +24 -0
- label_studio_sdk/webhooks/types/webhooks_info_response_annotations_deleted.py +24 -0
- label_studio_sdk/webhooks/types/webhooks_info_response_label_link_created.py +24 -0
- label_studio_sdk/webhooks/types/webhooks_info_response_label_link_deleted.py +24 -0
- label_studio_sdk/webhooks/types/webhooks_info_response_label_link_updated.py +24 -0
- label_studio_sdk/webhooks/types/webhooks_info_response_project_created.py +24 -0
- label_studio_sdk/webhooks/types/webhooks_info_response_project_deleted.py +24 -0
- label_studio_sdk/webhooks/types/webhooks_info_response_project_updated.py +24 -0
- label_studio_sdk/webhooks/types/webhooks_info_response_review_created.py +24 -0
- label_studio_sdk/webhooks/types/webhooks_info_response_review_updated.py +24 -0
- label_studio_sdk/webhooks/types/webhooks_info_response_reviews_deleted.py +24 -0
- label_studio_sdk/webhooks/types/webhooks_info_response_tasks_created.py +24 -0
- label_studio_sdk/webhooks/types/webhooks_info_response_tasks_deleted.py +24 -0
- label_studio_sdk/workspaces/__init__.py +1 -2
- label_studio_sdk/workspaces/client.py +97 -117
- label_studio_sdk/workspaces/members/__init__.py +0 -3
- label_studio_sdk/workspaces/members/client.py +65 -81
- {label_studio_sdk-1.0.20.dist-info → label_studio_sdk-2.0.0.dist-info}/METADATA +1 -1
- label_studio_sdk-2.0.0.dist-info/RECORD +424 -0
- {label_studio_sdk-1.0.20.dist-info → label_studio_sdk-2.0.0.dist-info}/WHEEL +1 -1
- label_studio_sdk/annotations/types/annotations_create_bulk_request_selected_items.py +0 -34
- label_studio_sdk/export_storage/azure/types/__init__.py +0 -6
- label_studio_sdk/export_storage/azure/types/azure_create_response.py +0 -57
- label_studio_sdk/export_storage/azure/types/azure_update_response.py +0 -57
- label_studio_sdk/export_storage/gcs/types/__init__.py +0 -6
- label_studio_sdk/export_storage/gcs/types/gcs_create_response.py +0 -57
- label_studio_sdk/export_storage/gcs/types/gcs_update_response.py +0 -57
- label_studio_sdk/export_storage/local/types/__init__.py +0 -6
- label_studio_sdk/export_storage/local/types/local_create_response.py +0 -47
- label_studio_sdk/export_storage/local/types/local_update_response.py +0 -47
- label_studio_sdk/export_storage/redis/types/__init__.py +0 -6
- label_studio_sdk/export_storage/redis/types/redis_create_response.py +0 -62
- label_studio_sdk/export_storage/redis/types/redis_update_response.py +0 -62
- label_studio_sdk/export_storage/s3/types/__init__.py +0 -6
- label_studio_sdk/export_storage/s3/types/s3create_response.py +0 -81
- label_studio_sdk/export_storage/s3/types/s3update_response.py +0 -81
- label_studio_sdk/import_storage/azure/types/__init__.py +0 -6
- label_studio_sdk/import_storage/azure/types/azure_create_response.py +0 -72
- label_studio_sdk/import_storage/azure/types/azure_update_response.py +0 -72
- label_studio_sdk/import_storage/gcs/types/__init__.py +0 -6
- label_studio_sdk/import_storage/gcs/types/gcs_create_response.py +0 -72
- label_studio_sdk/import_storage/gcs/types/gcs_update_response.py +0 -72
- label_studio_sdk/import_storage/local/types/__init__.py +0 -6
- label_studio_sdk/import_storage/local/types/local_create_response.py +0 -47
- label_studio_sdk/import_storage/local/types/local_update_response.py +0 -47
- label_studio_sdk/import_storage/redis/types/__init__.py +0 -6
- label_studio_sdk/import_storage/redis/types/redis_create_response.py +0 -62
- label_studio_sdk/import_storage/redis/types/redis_update_response.py +0 -62
- label_studio_sdk/import_storage/s3/types/__init__.py +0 -6
- label_studio_sdk/ml/types/ml_create_response.py +0 -68
- label_studio_sdk/ml/types/ml_create_response_auth_method.py +0 -5
- label_studio_sdk/ml/types/ml_update_response.py +0 -68
- label_studio_sdk/ml/types/ml_update_response_auth_method.py +0 -5
- label_studio_sdk/projects/exports/types/exports_list_formats_response_item.py +0 -44
- label_studio_sdk/projects/types/projects_create_response.py +0 -91
- label_studio_sdk/projects/types/projects_update_response.py +0 -96
- label_studio_sdk/prompts/types/prompts_batch_failed_predictions_request_failed_predictions_item.py +0 -32
- label_studio_sdk/prompts/types/prompts_batch_predictions_request_results_item.py +0 -59
- label_studio_sdk/tasks/types/tasks_list_response.py +0 -38
- label_studio_sdk/types/annotation_completed_by.py +0 -6
- label_studio_sdk/types/azure_blob_export_storage_status.py +0 -7
- label_studio_sdk/types/base_task_updated_by.py +0 -7
- label_studio_sdk/types/comment_created_by.py +0 -5
- label_studio_sdk/types/converted_format_status.py +0 -5
- label_studio_sdk/types/data_manager_task_serializer.py +0 -118
- label_studio_sdk/types/data_manager_task_serializer_annotators_item.py +0 -5
- label_studio_sdk/types/data_manager_task_serializer_comment_authors_item.py +0 -5
- label_studio_sdk/types/data_manager_task_serializer_predictions_item_model_run.py +0 -5
- label_studio_sdk/types/export_format.py +0 -25
- label_studio_sdk/types/export_snapshot_status.py +0 -5
- label_studio_sdk/types/export_status.py +0 -5
- label_studio_sdk/types/gcs_export_storage_status.py +0 -7
- label_studio_sdk/types/gcs_import_storage_status.py +0 -7
- label_studio_sdk/types/inference_run.py +0 -34
- label_studio_sdk/types/inference_run_created_by.py +0 -5
- label_studio_sdk/types/inference_run_organization.py +0 -5
- label_studio_sdk/types/inference_run_project_subset.py +0 -5
- label_studio_sdk/types/key_indicators.py +0 -6
- label_studio_sdk/types/key_indicators_item.py +0 -41
- label_studio_sdk/types/local_files_export_storage_status.py +0 -7
- label_studio_sdk/types/local_files_import_storage_status.py +0 -7
- label_studio_sdk/types/ml_backend_auth_method.py +0 -5
- label_studio_sdk/types/ml_backend_state.py +0 -5
- label_studio_sdk/types/model_provider_connection_created_by.py +0 -5
- label_studio_sdk/types/model_provider_connection_organization.py +0 -5
- label_studio_sdk/types/model_provider_connection_provider.py +0 -7
- label_studio_sdk/types/model_provider_connection_scope.py +0 -5
- label_studio_sdk/types/pause_paused_by.py +0 -5
- label_studio_sdk/types/project_import_status.py +0 -5
- label_studio_sdk/types/prompt.py +0 -71
- label_studio_sdk/types/prompt_associated_projects_item.py +0 -6
- label_studio_sdk/types/prompt_created_by.py +0 -5
- label_studio_sdk/types/prompt_organization.py +0 -5
- label_studio_sdk/types/prompt_version.py +0 -32
- label_studio_sdk/types/prompt_version_created_by.py +0 -5
- label_studio_sdk/types/prompt_version_organization.py +0 -5
- label_studio_sdk/types/redis_export_storage_status.py +0 -7
- label_studio_sdk/types/redis_import_storage_status.py +0 -7
- label_studio_sdk/types/refined_prompt_response_refinement_status.py +0 -7
- label_studio_sdk/types/s3export_storage_status.py +0 -7
- label_studio_sdk/types/s3import_storage_status.py +0 -7
- label_studio_sdk/types/s3s_export_storage.py +0 -73
- label_studio_sdk/types/s3s_import_storage_status.py +0 -7
- label_studio_sdk/types/task.py +0 -156
- label_studio_sdk/types/task_annotators_item.py +0 -5
- label_studio_sdk/types/task_comment_authors_item.py +0 -5
- label_studio_sdk/types/task_filter_options.py +0 -39
- label_studio_sdk/types/webhook_actions_item.py +0 -21
- label_studio_sdk/types/webhook_serializer_for_update_actions_item.py +0 -21
- label_studio_sdk/versions/types/__init__.py +0 -6
- label_studio_sdk/versions/types/versions_get_response.py +0 -73
- label_studio_sdk/versions/types/versions_get_response_edition.py +0 -5
- label_studio_sdk/workspaces/members/types/__init__.py +0 -6
- label_studio_sdk/workspaces/members/types/members_create_response.py +0 -22
- label_studio_sdk/workspaces/members/types/members_list_response_item.py +0 -22
- label_studio_sdk-1.0.20.dist-info/RECORD +0 -374
- {label_studio_sdk-1.0.20.dist-info → label_studio_sdk-2.0.0.dist-info}/LICENSE +0 -0
|
@@ -1,20 +1,13 @@
|
|
|
1
1
|
# This file was auto-generated by Fern from our API Definition.
|
|
2
2
|
|
|
3
|
-
from ...core.
|
|
3
|
+
from ...core.unchecked_base_model import UncheckedBaseModel
|
|
4
4
|
import typing
|
|
5
|
-
import pydantic
|
|
6
5
|
from ...core.pydantic_utilities import IS_PYDANTIC_V2
|
|
6
|
+
import pydantic
|
|
7
7
|
|
|
8
8
|
|
|
9
|
-
class UsersGetTokenResponse(
|
|
10
|
-
|
|
11
|
-
User token
|
|
12
|
-
"""
|
|
13
|
-
|
|
14
|
-
detail: typing.Optional[str] = pydantic.Field(default=None)
|
|
15
|
-
"""
|
|
16
|
-
Token
|
|
17
|
-
"""
|
|
9
|
+
class UsersGetTokenResponse(UncheckedBaseModel):
|
|
10
|
+
detail: typing.Optional[str] = None
|
|
18
11
|
|
|
19
12
|
if IS_PYDANTIC_V2:
|
|
20
13
|
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
|
|
@@ -1,20 +1,13 @@
|
|
|
1
1
|
# This file was auto-generated by Fern from our API Definition.
|
|
2
2
|
|
|
3
|
-
from ...core.
|
|
3
|
+
from ...core.unchecked_base_model import UncheckedBaseModel
|
|
4
4
|
import typing
|
|
5
|
-
import pydantic
|
|
6
5
|
from ...core.pydantic_utilities import IS_PYDANTIC_V2
|
|
6
|
+
import pydantic
|
|
7
7
|
|
|
8
8
|
|
|
9
|
-
class UsersResetTokenResponse(
|
|
10
|
-
|
|
11
|
-
User token
|
|
12
|
-
"""
|
|
13
|
-
|
|
14
|
-
token: typing.Optional[str] = pydantic.Field(default=None)
|
|
15
|
-
"""
|
|
16
|
-
Token
|
|
17
|
-
"""
|
|
9
|
+
class UsersResetTokenResponse(UncheckedBaseModel):
|
|
10
|
+
token: typing.Optional[str] = None
|
|
18
11
|
|
|
19
12
|
if IS_PYDANTIC_V2:
|
|
20
13
|
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
|
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
from ..core.client_wrapper import SyncClientWrapper
|
|
4
4
|
import typing
|
|
5
5
|
from ..core.request_options import RequestOptions
|
|
6
|
-
from
|
|
7
|
-
from ..core.
|
|
6
|
+
from ..types.version_response import VersionResponse
|
|
7
|
+
from ..core.unchecked_base_model import construct_type
|
|
8
8
|
from json.decoder import JSONDecodeError
|
|
9
9
|
from ..core.api_error import ApiError
|
|
10
10
|
from ..core.client_wrapper import AsyncClientWrapper
|
|
@@ -14,7 +14,7 @@ class VersionsClient:
|
|
|
14
14
|
def __init__(self, *, client_wrapper: SyncClientWrapper):
|
|
15
15
|
self._client_wrapper = client_wrapper
|
|
16
16
|
|
|
17
|
-
def get(self, *, request_options: typing.Optional[RequestOptions] = None) ->
|
|
17
|
+
def get(self, *, request_options: typing.Optional[RequestOptions] = None) -> VersionResponse:
|
|
18
18
|
"""
|
|
19
19
|
Get version information about the Label Studio instance.
|
|
20
20
|
|
|
@@ -25,7 +25,7 @@ class VersionsClient:
|
|
|
25
25
|
|
|
26
26
|
Returns
|
|
27
27
|
-------
|
|
28
|
-
|
|
28
|
+
VersionResponse
|
|
29
29
|
|
|
30
30
|
|
|
31
31
|
Examples
|
|
@@ -38,16 +38,16 @@ class VersionsClient:
|
|
|
38
38
|
client.versions.get()
|
|
39
39
|
"""
|
|
40
40
|
_response = self._client_wrapper.httpx_client.request(
|
|
41
|
-
"api/version",
|
|
41
|
+
"api/version/",
|
|
42
42
|
method="GET",
|
|
43
43
|
request_options=request_options,
|
|
44
44
|
)
|
|
45
45
|
try:
|
|
46
46
|
if 200 <= _response.status_code < 300:
|
|
47
47
|
return typing.cast(
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
type_=
|
|
48
|
+
VersionResponse,
|
|
49
|
+
construct_type(
|
|
50
|
+
type_=VersionResponse, # type: ignore
|
|
51
51
|
object_=_response.json(),
|
|
52
52
|
),
|
|
53
53
|
)
|
|
@@ -61,7 +61,7 @@ class AsyncVersionsClient:
|
|
|
61
61
|
def __init__(self, *, client_wrapper: AsyncClientWrapper):
|
|
62
62
|
self._client_wrapper = client_wrapper
|
|
63
63
|
|
|
64
|
-
async def get(self, *, request_options: typing.Optional[RequestOptions] = None) ->
|
|
64
|
+
async def get(self, *, request_options: typing.Optional[RequestOptions] = None) -> VersionResponse:
|
|
65
65
|
"""
|
|
66
66
|
Get version information about the Label Studio instance.
|
|
67
67
|
|
|
@@ -72,7 +72,7 @@ class AsyncVersionsClient:
|
|
|
72
72
|
|
|
73
73
|
Returns
|
|
74
74
|
-------
|
|
75
|
-
|
|
75
|
+
VersionResponse
|
|
76
76
|
|
|
77
77
|
|
|
78
78
|
Examples
|
|
@@ -93,16 +93,16 @@ class AsyncVersionsClient:
|
|
|
93
93
|
asyncio.run(main())
|
|
94
94
|
"""
|
|
95
95
|
_response = await self._client_wrapper.httpx_client.request(
|
|
96
|
-
"api/version",
|
|
96
|
+
"api/version/",
|
|
97
97
|
method="GET",
|
|
98
98
|
request_options=request_options,
|
|
99
99
|
)
|
|
100
100
|
try:
|
|
101
101
|
if 200 <= _response.status_code < 300:
|
|
102
102
|
return typing.cast(
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
type_=
|
|
103
|
+
VersionResponse,
|
|
104
|
+
construct_type(
|
|
105
|
+
type_=VersionResponse, # type: ignore
|
|
106
106
|
object_=_response.json(),
|
|
107
107
|
),
|
|
108
108
|
)
|
label_studio_sdk/views/client.py
CHANGED
|
@@ -4,7 +4,7 @@ import typing
|
|
|
4
4
|
from ..core.client_wrapper import SyncClientWrapper
|
|
5
5
|
from ..core.request_options import RequestOptions
|
|
6
6
|
from ..types.view import View
|
|
7
|
-
from ..core.
|
|
7
|
+
from ..core.unchecked_base_model import construct_type
|
|
8
8
|
from json.decoder import JSONDecodeError
|
|
9
9
|
from ..core.api_error import ApiError
|
|
10
10
|
from .types.views_create_request_data import ViewsCreateRequestData
|
|
@@ -25,10 +25,7 @@ class ViewsClient:
|
|
|
25
25
|
self, *, project: typing.Optional[int] = None, request_options: typing.Optional[RequestOptions] = None
|
|
26
26
|
) -> typing.List[View]:
|
|
27
27
|
"""
|
|
28
|
-
|
|
29
|
-
List all views for a specific project. A view is a tab in the Data Manager where you can set filters and customize which tasks and information appears.
|
|
30
|
-
|
|
31
|
-
You will need to provide the project ID. You can find this in the URL when viewing the project in Label Studio, or you can use [List all projects](../projects/list).
|
|
28
|
+
List all views for a specific project.
|
|
32
29
|
|
|
33
30
|
Parameters
|
|
34
31
|
----------
|
|
@@ -64,7 +61,7 @@ class ViewsClient:
|
|
|
64
61
|
if 200 <= _response.status_code < 300:
|
|
65
62
|
return typing.cast(
|
|
66
63
|
typing.List[View],
|
|
67
|
-
|
|
64
|
+
construct_type(
|
|
68
65
|
type_=typing.List[View], # type: ignore
|
|
69
66
|
object_=_response.json(),
|
|
70
67
|
),
|
|
@@ -82,10 +79,7 @@ class ViewsClient:
|
|
|
82
79
|
request_options: typing.Optional[RequestOptions] = None,
|
|
83
80
|
) -> View:
|
|
84
81
|
"""
|
|
85
|
-
|
|
86
|
-
Create a new Data Manager view for a specific project. A view is a tab in the Data Manager where you can set filters and customize what tasks and information appears.
|
|
87
|
-
|
|
88
|
-
You will need to provide the project ID. You can find this in the URL when viewing the project in Label Studio, or you can use [List all projects](../projects/list).
|
|
82
|
+
Create a view for a specific project.
|
|
89
83
|
|
|
90
84
|
Parameters
|
|
91
85
|
----------
|
|
@@ -131,7 +125,7 @@ class ViewsClient:
|
|
|
131
125
|
if 200 <= _response.status_code < 300:
|
|
132
126
|
return typing.cast(
|
|
133
127
|
View,
|
|
134
|
-
|
|
128
|
+
construct_type(
|
|
135
129
|
type_=View, # type: ignore
|
|
136
130
|
object_=_response.json(),
|
|
137
131
|
),
|
|
@@ -141,59 +135,9 @@ class ViewsClient:
|
|
|
141
135
|
raise ApiError(status_code=_response.status_code, body=_response.text)
|
|
142
136
|
raise ApiError(status_code=_response.status_code, body=_response_json)
|
|
143
137
|
|
|
144
|
-
def delete_all(self, *, project: int, request_options: typing.Optional[RequestOptions] = None) -> None:
|
|
145
|
-
"""
|
|
146
|
-
|
|
147
|
-
Delete all views for a specific project. A view is a tab in the Data Manager where you can set filters and customize what tasks appear.
|
|
148
|
-
|
|
149
|
-
You will need to provide the project ID. You can find this in the URL when viewing the project in Label Studio, or you can use [List all projects](../projects/list).
|
|
150
|
-
|
|
151
|
-
Parameters
|
|
152
|
-
----------
|
|
153
|
-
project : int
|
|
154
|
-
|
|
155
|
-
request_options : typing.Optional[RequestOptions]
|
|
156
|
-
Request-specific configuration.
|
|
157
|
-
|
|
158
|
-
Returns
|
|
159
|
-
-------
|
|
160
|
-
None
|
|
161
|
-
|
|
162
|
-
Examples
|
|
163
|
-
--------
|
|
164
|
-
from label_studio_sdk import LabelStudio
|
|
165
|
-
|
|
166
|
-
client = LabelStudio(
|
|
167
|
-
api_key="YOUR_API_KEY",
|
|
168
|
-
)
|
|
169
|
-
client.views.delete_all(
|
|
170
|
-
project=1,
|
|
171
|
-
)
|
|
172
|
-
"""
|
|
173
|
-
_response = self._client_wrapper.httpx_client.request(
|
|
174
|
-
"api/dm/views/reset/",
|
|
175
|
-
method="DELETE",
|
|
176
|
-
json={
|
|
177
|
-
"project": project,
|
|
178
|
-
},
|
|
179
|
-
headers={
|
|
180
|
-
"content-type": "application/json",
|
|
181
|
-
},
|
|
182
|
-
request_options=request_options,
|
|
183
|
-
omit=OMIT,
|
|
184
|
-
)
|
|
185
|
-
try:
|
|
186
|
-
if 200 <= _response.status_code < 300:
|
|
187
|
-
return
|
|
188
|
-
_response_json = _response.json()
|
|
189
|
-
except JSONDecodeError:
|
|
190
|
-
raise ApiError(status_code=_response.status_code, body=_response.text)
|
|
191
|
-
raise ApiError(status_code=_response.status_code, body=_response_json)
|
|
192
|
-
|
|
193
138
|
def get(self, id: str, *, request_options: typing.Optional[RequestOptions] = None) -> View:
|
|
194
139
|
"""
|
|
195
|
-
|
|
196
|
-
Get the details about a specific Data Manager view (tab). You will need to supply the view ID. You can find this using [List views](list).
|
|
140
|
+
Get the details about a specific view in the data manager
|
|
197
141
|
|
|
198
142
|
Parameters
|
|
199
143
|
----------
|
|
@@ -228,7 +172,7 @@ class ViewsClient:
|
|
|
228
172
|
if 200 <= _response.status_code < 300:
|
|
229
173
|
return typing.cast(
|
|
230
174
|
View,
|
|
231
|
-
|
|
175
|
+
construct_type(
|
|
232
176
|
type_=View, # type: ignore
|
|
233
177
|
object_=_response.json(),
|
|
234
178
|
),
|
|
@@ -240,7 +184,7 @@ class ViewsClient:
|
|
|
240
184
|
|
|
241
185
|
def delete(self, id: str, *, request_options: typing.Optional[RequestOptions] = None) -> None:
|
|
242
186
|
"""
|
|
243
|
-
Delete a specific
|
|
187
|
+
Delete a specific view by ID.
|
|
244
188
|
|
|
245
189
|
Parameters
|
|
246
190
|
----------
|
|
@@ -287,8 +231,7 @@ class ViewsClient:
|
|
|
287
231
|
request_options: typing.Optional[RequestOptions] = None,
|
|
288
232
|
) -> View:
|
|
289
233
|
"""
|
|
290
|
-
|
|
291
|
-
You can update a specific Data Manager view (tab) with additional filters and other customizations. You will need to supply the view ID. You can find this using [List views](list).
|
|
234
|
+
Update view data with additional filters and other information for a specific project.
|
|
292
235
|
|
|
293
236
|
Parameters
|
|
294
237
|
----------
|
|
@@ -339,7 +282,7 @@ class ViewsClient:
|
|
|
339
282
|
if 200 <= _response.status_code < 300:
|
|
340
283
|
return typing.cast(
|
|
341
284
|
View,
|
|
342
|
-
|
|
285
|
+
construct_type(
|
|
343
286
|
type_=View, # type: ignore
|
|
344
287
|
object_=_response.json(),
|
|
345
288
|
),
|
|
@@ -349,6 +292,102 @@ class ViewsClient:
|
|
|
349
292
|
raise ApiError(status_code=_response.status_code, body=_response.text)
|
|
350
293
|
raise ApiError(status_code=_response.status_code, body=_response_json)
|
|
351
294
|
|
|
295
|
+
def update_order(
|
|
296
|
+
self, *, project: int, ids: typing.Sequence[int], request_options: typing.Optional[RequestOptions] = None
|
|
297
|
+
) -> None:
|
|
298
|
+
"""
|
|
299
|
+
Update the order field of views based on the provided list of view IDs
|
|
300
|
+
|
|
301
|
+
Parameters
|
|
302
|
+
----------
|
|
303
|
+
project : int
|
|
304
|
+
|
|
305
|
+
ids : typing.Sequence[int]
|
|
306
|
+
A list of view IDs in the desired order.
|
|
307
|
+
|
|
308
|
+
request_options : typing.Optional[RequestOptions]
|
|
309
|
+
Request-specific configuration.
|
|
310
|
+
|
|
311
|
+
Returns
|
|
312
|
+
-------
|
|
313
|
+
None
|
|
314
|
+
|
|
315
|
+
Examples
|
|
316
|
+
--------
|
|
317
|
+
from label_studio_sdk import LabelStudio
|
|
318
|
+
|
|
319
|
+
client = LabelStudio(
|
|
320
|
+
api_key="YOUR_API_KEY",
|
|
321
|
+
)
|
|
322
|
+
client.views.update_order(
|
|
323
|
+
project=1,
|
|
324
|
+
ids=[1],
|
|
325
|
+
)
|
|
326
|
+
"""
|
|
327
|
+
_response = self._client_wrapper.httpx_client.request(
|
|
328
|
+
"api/dm/views/order/",
|
|
329
|
+
method="POST",
|
|
330
|
+
json={
|
|
331
|
+
"project": project,
|
|
332
|
+
"ids": ids,
|
|
333
|
+
},
|
|
334
|
+
headers={
|
|
335
|
+
"content-type": "application/json",
|
|
336
|
+
},
|
|
337
|
+
request_options=request_options,
|
|
338
|
+
omit=OMIT,
|
|
339
|
+
)
|
|
340
|
+
try:
|
|
341
|
+
if 200 <= _response.status_code < 300:
|
|
342
|
+
return
|
|
343
|
+
_response_json = _response.json()
|
|
344
|
+
except JSONDecodeError:
|
|
345
|
+
raise ApiError(status_code=_response.status_code, body=_response.text)
|
|
346
|
+
raise ApiError(status_code=_response.status_code, body=_response_json)
|
|
347
|
+
|
|
348
|
+
def delete_all(self, *, project: int, request_options: typing.Optional[RequestOptions] = None) -> None:
|
|
349
|
+
"""
|
|
350
|
+
Delete all views for a specific project.
|
|
351
|
+
|
|
352
|
+
Parameters
|
|
353
|
+
----------
|
|
354
|
+
project : int
|
|
355
|
+
Project ID
|
|
356
|
+
|
|
357
|
+
request_options : typing.Optional[RequestOptions]
|
|
358
|
+
Request-specific configuration.
|
|
359
|
+
|
|
360
|
+
Returns
|
|
361
|
+
-------
|
|
362
|
+
None
|
|
363
|
+
|
|
364
|
+
Examples
|
|
365
|
+
--------
|
|
366
|
+
from label_studio_sdk import LabelStudio
|
|
367
|
+
|
|
368
|
+
client = LabelStudio(
|
|
369
|
+
api_key="YOUR_API_KEY",
|
|
370
|
+
)
|
|
371
|
+
client.views.delete_all(
|
|
372
|
+
project=1,
|
|
373
|
+
)
|
|
374
|
+
"""
|
|
375
|
+
_response = self._client_wrapper.httpx_client.request(
|
|
376
|
+
"api/dm/views/reset/",
|
|
377
|
+
method="DELETE",
|
|
378
|
+
params={
|
|
379
|
+
"project": project,
|
|
380
|
+
},
|
|
381
|
+
request_options=request_options,
|
|
382
|
+
)
|
|
383
|
+
try:
|
|
384
|
+
if 200 <= _response.status_code < 300:
|
|
385
|
+
return
|
|
386
|
+
_response_json = _response.json()
|
|
387
|
+
except JSONDecodeError:
|
|
388
|
+
raise ApiError(status_code=_response.status_code, body=_response.text)
|
|
389
|
+
raise ApiError(status_code=_response.status_code, body=_response_json)
|
|
390
|
+
|
|
352
391
|
|
|
353
392
|
class AsyncViewsClient:
|
|
354
393
|
def __init__(self, *, client_wrapper: AsyncClientWrapper):
|
|
@@ -358,10 +397,7 @@ class AsyncViewsClient:
|
|
|
358
397
|
self, *, project: typing.Optional[int] = None, request_options: typing.Optional[RequestOptions] = None
|
|
359
398
|
) -> typing.List[View]:
|
|
360
399
|
"""
|
|
361
|
-
|
|
362
|
-
List all views for a specific project. A view is a tab in the Data Manager where you can set filters and customize which tasks and information appears.
|
|
363
|
-
|
|
364
|
-
You will need to provide the project ID. You can find this in the URL when viewing the project in Label Studio, or you can use [List all projects](../projects/list).
|
|
400
|
+
List all views for a specific project.
|
|
365
401
|
|
|
366
402
|
Parameters
|
|
367
403
|
----------
|
|
@@ -405,7 +441,7 @@ class AsyncViewsClient:
|
|
|
405
441
|
if 200 <= _response.status_code < 300:
|
|
406
442
|
return typing.cast(
|
|
407
443
|
typing.List[View],
|
|
408
|
-
|
|
444
|
+
construct_type(
|
|
409
445
|
type_=typing.List[View], # type: ignore
|
|
410
446
|
object_=_response.json(),
|
|
411
447
|
),
|
|
@@ -423,10 +459,7 @@ class AsyncViewsClient:
|
|
|
423
459
|
request_options: typing.Optional[RequestOptions] = None,
|
|
424
460
|
) -> View:
|
|
425
461
|
"""
|
|
426
|
-
|
|
427
|
-
Create a new Data Manager view for a specific project. A view is a tab in the Data Manager where you can set filters and customize what tasks and information appears.
|
|
428
|
-
|
|
429
|
-
You will need to provide the project ID. You can find this in the URL when viewing the project in Label Studio, or you can use [List all projects](../projects/list).
|
|
462
|
+
Create a view for a specific project.
|
|
430
463
|
|
|
431
464
|
Parameters
|
|
432
465
|
----------
|
|
@@ -480,7 +513,7 @@ class AsyncViewsClient:
|
|
|
480
513
|
if 200 <= _response.status_code < 300:
|
|
481
514
|
return typing.cast(
|
|
482
515
|
View,
|
|
483
|
-
|
|
516
|
+
construct_type(
|
|
484
517
|
type_=View, # type: ignore
|
|
485
518
|
object_=_response.json(),
|
|
486
519
|
),
|
|
@@ -490,67 +523,9 @@ class AsyncViewsClient:
|
|
|
490
523
|
raise ApiError(status_code=_response.status_code, body=_response.text)
|
|
491
524
|
raise ApiError(status_code=_response.status_code, body=_response_json)
|
|
492
525
|
|
|
493
|
-
async def delete_all(self, *, project: int, request_options: typing.Optional[RequestOptions] = None) -> None:
|
|
494
|
-
"""
|
|
495
|
-
|
|
496
|
-
Delete all views for a specific project. A view is a tab in the Data Manager where you can set filters and customize what tasks appear.
|
|
497
|
-
|
|
498
|
-
You will need to provide the project ID. You can find this in the URL when viewing the project in Label Studio, or you can use [List all projects](../projects/list).
|
|
499
|
-
|
|
500
|
-
Parameters
|
|
501
|
-
----------
|
|
502
|
-
project : int
|
|
503
|
-
|
|
504
|
-
request_options : typing.Optional[RequestOptions]
|
|
505
|
-
Request-specific configuration.
|
|
506
|
-
|
|
507
|
-
Returns
|
|
508
|
-
-------
|
|
509
|
-
None
|
|
510
|
-
|
|
511
|
-
Examples
|
|
512
|
-
--------
|
|
513
|
-
import asyncio
|
|
514
|
-
|
|
515
|
-
from label_studio_sdk import AsyncLabelStudio
|
|
516
|
-
|
|
517
|
-
client = AsyncLabelStudio(
|
|
518
|
-
api_key="YOUR_API_KEY",
|
|
519
|
-
)
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
async def main() -> None:
|
|
523
|
-
await client.views.delete_all(
|
|
524
|
-
project=1,
|
|
525
|
-
)
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
asyncio.run(main())
|
|
529
|
-
"""
|
|
530
|
-
_response = await self._client_wrapper.httpx_client.request(
|
|
531
|
-
"api/dm/views/reset/",
|
|
532
|
-
method="DELETE",
|
|
533
|
-
json={
|
|
534
|
-
"project": project,
|
|
535
|
-
},
|
|
536
|
-
headers={
|
|
537
|
-
"content-type": "application/json",
|
|
538
|
-
},
|
|
539
|
-
request_options=request_options,
|
|
540
|
-
omit=OMIT,
|
|
541
|
-
)
|
|
542
|
-
try:
|
|
543
|
-
if 200 <= _response.status_code < 300:
|
|
544
|
-
return
|
|
545
|
-
_response_json = _response.json()
|
|
546
|
-
except JSONDecodeError:
|
|
547
|
-
raise ApiError(status_code=_response.status_code, body=_response.text)
|
|
548
|
-
raise ApiError(status_code=_response.status_code, body=_response_json)
|
|
549
|
-
|
|
550
526
|
async def get(self, id: str, *, request_options: typing.Optional[RequestOptions] = None) -> View:
|
|
551
527
|
"""
|
|
552
|
-
|
|
553
|
-
Get the details about a specific Data Manager view (tab). You will need to supply the view ID. You can find this using [List views](list).
|
|
528
|
+
Get the details about a specific view in the data manager
|
|
554
529
|
|
|
555
530
|
Parameters
|
|
556
531
|
----------
|
|
@@ -593,7 +568,7 @@ class AsyncViewsClient:
|
|
|
593
568
|
if 200 <= _response.status_code < 300:
|
|
594
569
|
return typing.cast(
|
|
595
570
|
View,
|
|
596
|
-
|
|
571
|
+
construct_type(
|
|
597
572
|
type_=View, # type: ignore
|
|
598
573
|
object_=_response.json(),
|
|
599
574
|
),
|
|
@@ -605,7 +580,7 @@ class AsyncViewsClient:
|
|
|
605
580
|
|
|
606
581
|
async def delete(self, id: str, *, request_options: typing.Optional[RequestOptions] = None) -> None:
|
|
607
582
|
"""
|
|
608
|
-
Delete a specific
|
|
583
|
+
Delete a specific view by ID.
|
|
609
584
|
|
|
610
585
|
Parameters
|
|
611
586
|
----------
|
|
@@ -660,8 +635,7 @@ class AsyncViewsClient:
|
|
|
660
635
|
request_options: typing.Optional[RequestOptions] = None,
|
|
661
636
|
) -> View:
|
|
662
637
|
"""
|
|
663
|
-
|
|
664
|
-
You can update a specific Data Manager view (tab) with additional filters and other customizations. You will need to supply the view ID. You can find this using [List views](list).
|
|
638
|
+
Update view data with additional filters and other information for a specific project.
|
|
665
639
|
|
|
666
640
|
Parameters
|
|
667
641
|
----------
|
|
@@ -720,7 +694,7 @@ class AsyncViewsClient:
|
|
|
720
694
|
if 200 <= _response.status_code < 300:
|
|
721
695
|
return typing.cast(
|
|
722
696
|
View,
|
|
723
|
-
|
|
697
|
+
construct_type(
|
|
724
698
|
type_=View, # type: ignore
|
|
725
699
|
object_=_response.json(),
|
|
726
700
|
),
|
|
@@ -729,3 +703,115 @@ class AsyncViewsClient:
|
|
|
729
703
|
except JSONDecodeError:
|
|
730
704
|
raise ApiError(status_code=_response.status_code, body=_response.text)
|
|
731
705
|
raise ApiError(status_code=_response.status_code, body=_response_json)
|
|
706
|
+
|
|
707
|
+
async def update_order(
|
|
708
|
+
self, *, project: int, ids: typing.Sequence[int], request_options: typing.Optional[RequestOptions] = None
|
|
709
|
+
) -> None:
|
|
710
|
+
"""
|
|
711
|
+
Update the order field of views based on the provided list of view IDs
|
|
712
|
+
|
|
713
|
+
Parameters
|
|
714
|
+
----------
|
|
715
|
+
project : int
|
|
716
|
+
|
|
717
|
+
ids : typing.Sequence[int]
|
|
718
|
+
A list of view IDs in the desired order.
|
|
719
|
+
|
|
720
|
+
request_options : typing.Optional[RequestOptions]
|
|
721
|
+
Request-specific configuration.
|
|
722
|
+
|
|
723
|
+
Returns
|
|
724
|
+
-------
|
|
725
|
+
None
|
|
726
|
+
|
|
727
|
+
Examples
|
|
728
|
+
--------
|
|
729
|
+
import asyncio
|
|
730
|
+
|
|
731
|
+
from label_studio_sdk import AsyncLabelStudio
|
|
732
|
+
|
|
733
|
+
client = AsyncLabelStudio(
|
|
734
|
+
api_key="YOUR_API_KEY",
|
|
735
|
+
)
|
|
736
|
+
|
|
737
|
+
|
|
738
|
+
async def main() -> None:
|
|
739
|
+
await client.views.update_order(
|
|
740
|
+
project=1,
|
|
741
|
+
ids=[1],
|
|
742
|
+
)
|
|
743
|
+
|
|
744
|
+
|
|
745
|
+
asyncio.run(main())
|
|
746
|
+
"""
|
|
747
|
+
_response = await self._client_wrapper.httpx_client.request(
|
|
748
|
+
"api/dm/views/order/",
|
|
749
|
+
method="POST",
|
|
750
|
+
json={
|
|
751
|
+
"project": project,
|
|
752
|
+
"ids": ids,
|
|
753
|
+
},
|
|
754
|
+
headers={
|
|
755
|
+
"content-type": "application/json",
|
|
756
|
+
},
|
|
757
|
+
request_options=request_options,
|
|
758
|
+
omit=OMIT,
|
|
759
|
+
)
|
|
760
|
+
try:
|
|
761
|
+
if 200 <= _response.status_code < 300:
|
|
762
|
+
return
|
|
763
|
+
_response_json = _response.json()
|
|
764
|
+
except JSONDecodeError:
|
|
765
|
+
raise ApiError(status_code=_response.status_code, body=_response.text)
|
|
766
|
+
raise ApiError(status_code=_response.status_code, body=_response_json)
|
|
767
|
+
|
|
768
|
+
async def delete_all(self, *, project: int, request_options: typing.Optional[RequestOptions] = None) -> None:
|
|
769
|
+
"""
|
|
770
|
+
Delete all views for a specific project.
|
|
771
|
+
|
|
772
|
+
Parameters
|
|
773
|
+
----------
|
|
774
|
+
project : int
|
|
775
|
+
Project ID
|
|
776
|
+
|
|
777
|
+
request_options : typing.Optional[RequestOptions]
|
|
778
|
+
Request-specific configuration.
|
|
779
|
+
|
|
780
|
+
Returns
|
|
781
|
+
-------
|
|
782
|
+
None
|
|
783
|
+
|
|
784
|
+
Examples
|
|
785
|
+
--------
|
|
786
|
+
import asyncio
|
|
787
|
+
|
|
788
|
+
from label_studio_sdk import AsyncLabelStudio
|
|
789
|
+
|
|
790
|
+
client = AsyncLabelStudio(
|
|
791
|
+
api_key="YOUR_API_KEY",
|
|
792
|
+
)
|
|
793
|
+
|
|
794
|
+
|
|
795
|
+
async def main() -> None:
|
|
796
|
+
await client.views.delete_all(
|
|
797
|
+
project=1,
|
|
798
|
+
)
|
|
799
|
+
|
|
800
|
+
|
|
801
|
+
asyncio.run(main())
|
|
802
|
+
"""
|
|
803
|
+
_response = await self._client_wrapper.httpx_client.request(
|
|
804
|
+
"api/dm/views/reset/",
|
|
805
|
+
method="DELETE",
|
|
806
|
+
params={
|
|
807
|
+
"project": project,
|
|
808
|
+
},
|
|
809
|
+
request_options=request_options,
|
|
810
|
+
)
|
|
811
|
+
try:
|
|
812
|
+
if 200 <= _response.status_code < 300:
|
|
813
|
+
return
|
|
814
|
+
_response_json = _response.json()
|
|
815
|
+
except JSONDecodeError:
|
|
816
|
+
raise ApiError(status_code=_response.status_code, body=_response.text)
|
|
817
|
+
raise ApiError(status_code=_response.status_code, body=_response_json)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# This file was auto-generated by Fern from our API Definition.
|
|
2
2
|
|
|
3
|
-
from ...core.
|
|
3
|
+
from ...core.unchecked_base_model import UncheckedBaseModel
|
|
4
4
|
import typing
|
|
5
5
|
from .views_create_request_data_filters import ViewsCreateRequestDataFilters
|
|
6
6
|
import pydantic
|
|
@@ -8,7 +8,7 @@ from .views_create_request_data_ordering_item import ViewsCreateRequestDataOrder
|
|
|
8
8
|
from ...core.pydantic_utilities import IS_PYDANTIC_V2
|
|
9
9
|
|
|
10
10
|
|
|
11
|
-
class ViewsCreateRequestData(
|
|
11
|
+
class ViewsCreateRequestData(UncheckedBaseModel):
|
|
12
12
|
"""
|
|
13
13
|
Custom view data
|
|
14
14
|
"""
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# This file was auto-generated by Fern from our API Definition.
|
|
2
2
|
|
|
3
|
-
from ...core.
|
|
3
|
+
from ...core.unchecked_base_model import UncheckedBaseModel
|
|
4
4
|
from .views_create_request_data_filters_conjunction import ViewsCreateRequestDataFiltersConjunction
|
|
5
5
|
import pydantic
|
|
6
6
|
import typing
|
|
@@ -8,7 +8,7 @@ from .views_create_request_data_filters_items_item import ViewsCreateRequestData
|
|
|
8
8
|
from ...core.pydantic_utilities import IS_PYDANTIC_V2
|
|
9
9
|
|
|
10
10
|
|
|
11
|
-
class ViewsCreateRequestDataFilters(
|
|
11
|
+
class ViewsCreateRequestDataFilters(UncheckedBaseModel):
|
|
12
12
|
"""
|
|
13
13
|
Filters to apply on tasks. You can use [the helper class `Filters` from this page](https://labelstud.io/sdk/data_manager.html) to create Data Manager Filters.<br>Example: `{"conjunction": "or", "items": [{"filter": "filter:tasks:completed_at", "operator": "greater", "type": "Datetime", "value": "2021-01-01T00:00:00.000Z"}]}`
|
|
14
14
|
"""
|