aeri-python 4.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.
- aeri/__init__.py +72 -0
- aeri/_client/_validation.py +204 -0
- aeri/_client/attributes.py +188 -0
- aeri/_client/client.py +3761 -0
- aeri/_client/constants.py +65 -0
- aeri/_client/datasets.py +302 -0
- aeri/_client/environment_variables.py +158 -0
- aeri/_client/get_client.py +149 -0
- aeri/_client/observe.py +661 -0
- aeri/_client/propagation.py +475 -0
- aeri/_client/resource_manager.py +510 -0
- aeri/_client/span.py +1519 -0
- aeri/_client/span_filter.py +76 -0
- aeri/_client/span_processor.py +206 -0
- aeri/_client/utils.py +132 -0
- aeri/_task_manager/media_manager.py +331 -0
- aeri/_task_manager/media_upload_consumer.py +44 -0
- aeri/_task_manager/media_upload_queue.py +12 -0
- aeri/_task_manager/score_ingestion_consumer.py +208 -0
- aeri/_task_manager/task_manager.py +475 -0
- aeri/_utils/__init__.py +19 -0
- aeri/_utils/environment.py +34 -0
- aeri/_utils/error_logging.py +47 -0
- aeri/_utils/parse_error.py +99 -0
- aeri/_utils/prompt_cache.py +188 -0
- aeri/_utils/request.py +137 -0
- aeri/_utils/serializer.py +205 -0
- aeri/api/.fern/metadata.json +14 -0
- aeri/api/__init__.py +836 -0
- aeri/api/annotation_queues/__init__.py +82 -0
- aeri/api/annotation_queues/client.py +1111 -0
- aeri/api/annotation_queues/raw_client.py +2288 -0
- aeri/api/annotation_queues/types/__init__.py +84 -0
- aeri/api/annotation_queues/types/annotation_queue.py +28 -0
- aeri/api/annotation_queues/types/annotation_queue_assignment_request.py +16 -0
- aeri/api/annotation_queues/types/annotation_queue_item.py +34 -0
- aeri/api/annotation_queues/types/annotation_queue_object_type.py +26 -0
- aeri/api/annotation_queues/types/annotation_queue_status.py +22 -0
- aeri/api/annotation_queues/types/create_annotation_queue_assignment_response.py +18 -0
- aeri/api/annotation_queues/types/create_annotation_queue_item_request.py +25 -0
- aeri/api/annotation_queues/types/create_annotation_queue_request.py +20 -0
- aeri/api/annotation_queues/types/delete_annotation_queue_assignment_response.py +14 -0
- aeri/api/annotation_queues/types/delete_annotation_queue_item_response.py +15 -0
- aeri/api/annotation_queues/types/paginated_annotation_queue_items.py +17 -0
- aeri/api/annotation_queues/types/paginated_annotation_queues.py +17 -0
- aeri/api/annotation_queues/types/update_annotation_queue_item_request.py +15 -0
- aeri/api/blob_storage_integrations/__init__.py +73 -0
- aeri/api/blob_storage_integrations/client.py +550 -0
- aeri/api/blob_storage_integrations/raw_client.py +976 -0
- aeri/api/blob_storage_integrations/types/__init__.py +77 -0
- aeri/api/blob_storage_integrations/types/blob_storage_export_frequency.py +26 -0
- aeri/api/blob_storage_integrations/types/blob_storage_export_mode.py +26 -0
- aeri/api/blob_storage_integrations/types/blob_storage_integration_deletion_response.py +14 -0
- aeri/api/blob_storage_integrations/types/blob_storage_integration_file_type.py +26 -0
- aeri/api/blob_storage_integrations/types/blob_storage_integration_response.py +64 -0
- aeri/api/blob_storage_integrations/types/blob_storage_integration_status_response.py +50 -0
- aeri/api/blob_storage_integrations/types/blob_storage_integration_type.py +26 -0
- aeri/api/blob_storage_integrations/types/blob_storage_integrations_response.py +15 -0
- aeri/api/blob_storage_integrations/types/blob_storage_sync_status.py +47 -0
- aeri/api/blob_storage_integrations/types/create_blob_storage_integration_request.py +91 -0
- aeri/api/client.py +679 -0
- aeri/api/comments/__init__.py +44 -0
- aeri/api/comments/client.py +407 -0
- aeri/api/comments/raw_client.py +750 -0
- aeri/api/comments/types/__init__.py +46 -0
- aeri/api/comments/types/create_comment_request.py +47 -0
- aeri/api/comments/types/create_comment_response.py +17 -0
- aeri/api/comments/types/get_comments_response.py +17 -0
- aeri/api/commons/__init__.py +210 -0
- aeri/api/commons/errors/__init__.py +56 -0
- aeri/api/commons/errors/access_denied_error.py +12 -0
- aeri/api/commons/errors/error.py +12 -0
- aeri/api/commons/errors/method_not_allowed_error.py +12 -0
- aeri/api/commons/errors/not_found_error.py +12 -0
- aeri/api/commons/errors/unauthorized_error.py +12 -0
- aeri/api/commons/types/__init__.py +190 -0
- aeri/api/commons/types/base_score.py +90 -0
- aeri/api/commons/types/base_score_v1.py +70 -0
- aeri/api/commons/types/boolean_score.py +26 -0
- aeri/api/commons/types/boolean_score_v1.py +26 -0
- aeri/api/commons/types/categorical_score.py +26 -0
- aeri/api/commons/types/categorical_score_v1.py +26 -0
- aeri/api/commons/types/comment.py +36 -0
- aeri/api/commons/types/comment_object_type.py +30 -0
- aeri/api/commons/types/config_category.py +15 -0
- aeri/api/commons/types/correction_score.py +26 -0
- aeri/api/commons/types/create_score_value.py +5 -0
- aeri/api/commons/types/dataset.py +49 -0
- aeri/api/commons/types/dataset_item.py +58 -0
- aeri/api/commons/types/dataset_run.py +63 -0
- aeri/api/commons/types/dataset_run_item.py +40 -0
- aeri/api/commons/types/dataset_run_with_items.py +19 -0
- aeri/api/commons/types/dataset_status.py +22 -0
- aeri/api/commons/types/map_value.py +11 -0
- aeri/api/commons/types/model.py +125 -0
- aeri/api/commons/types/model_price.py +14 -0
- aeri/api/commons/types/model_usage_unit.py +42 -0
- aeri/api/commons/types/numeric_score.py +17 -0
- aeri/api/commons/types/numeric_score_v1.py +17 -0
- aeri/api/commons/types/observation.py +142 -0
- aeri/api/commons/types/observation_level.py +30 -0
- aeri/api/commons/types/observation_v2.py +235 -0
- aeri/api/commons/types/observations_view.py +89 -0
- aeri/api/commons/types/pricing_tier.py +91 -0
- aeri/api/commons/types/pricing_tier_condition.py +68 -0
- aeri/api/commons/types/pricing_tier_input.py +76 -0
- aeri/api/commons/types/pricing_tier_operator.py +42 -0
- aeri/api/commons/types/score.py +201 -0
- aeri/api/commons/types/score_config.py +66 -0
- aeri/api/commons/types/score_config_data_type.py +26 -0
- aeri/api/commons/types/score_data_type.py +30 -0
- aeri/api/commons/types/score_source.py +26 -0
- aeri/api/commons/types/score_v1.py +131 -0
- aeri/api/commons/types/session.py +25 -0
- aeri/api/commons/types/session_with_traces.py +15 -0
- aeri/api/commons/types/trace.py +84 -0
- aeri/api/commons/types/trace_with_details.py +43 -0
- aeri/api/commons/types/trace_with_full_details.py +45 -0
- aeri/api/commons/types/usage.py +59 -0
- aeri/api/core/__init__.py +111 -0
- aeri/api/core/api_error.py +23 -0
- aeri/api/core/client_wrapper.py +141 -0
- aeri/api/core/datetime_utils.py +30 -0
- aeri/api/core/enum.py +20 -0
- aeri/api/core/file.py +70 -0
- aeri/api/core/force_multipart.py +18 -0
- aeri/api/core/http_client.py +711 -0
- aeri/api/core/http_response.py +55 -0
- aeri/api/core/http_sse/__init__.py +48 -0
- aeri/api/core/http_sse/_api.py +114 -0
- aeri/api/core/http_sse/_decoders.py +66 -0
- aeri/api/core/http_sse/_exceptions.py +7 -0
- aeri/api/core/http_sse/_models.py +17 -0
- aeri/api/core/jsonable_encoder.py +102 -0
- aeri/api/core/pydantic_utilities.py +310 -0
- aeri/api/core/query_encoder.py +60 -0
- aeri/api/core/remove_none_from_dict.py +11 -0
- aeri/api/core/request_options.py +35 -0
- aeri/api/core/serialization.py +282 -0
- aeri/api/dataset_items/__init__.py +52 -0
- aeri/api/dataset_items/client.py +499 -0
- aeri/api/dataset_items/raw_client.py +973 -0
- aeri/api/dataset_items/types/__init__.py +50 -0
- aeri/api/dataset_items/types/create_dataset_item_request.py +37 -0
- aeri/api/dataset_items/types/delete_dataset_item_response.py +17 -0
- aeri/api/dataset_items/types/paginated_dataset_items.py +17 -0
- aeri/api/dataset_run_items/__init__.py +43 -0
- aeri/api/dataset_run_items/client.py +323 -0
- aeri/api/dataset_run_items/raw_client.py +547 -0
- aeri/api/dataset_run_items/types/__init__.py +44 -0
- aeri/api/dataset_run_items/types/create_dataset_run_item_request.py +51 -0
- aeri/api/dataset_run_items/types/paginated_dataset_run_items.py +17 -0
- aeri/api/datasets/__init__.py +55 -0
- aeri/api/datasets/client.py +661 -0
- aeri/api/datasets/raw_client.py +1368 -0
- aeri/api/datasets/types/__init__.py +53 -0
- aeri/api/datasets/types/create_dataset_request.py +31 -0
- aeri/api/datasets/types/delete_dataset_run_response.py +14 -0
- aeri/api/datasets/types/paginated_dataset_runs.py +17 -0
- aeri/api/datasets/types/paginated_datasets.py +17 -0
- aeri/api/health/__init__.py +44 -0
- aeri/api/health/client.py +112 -0
- aeri/api/health/errors/__init__.py +42 -0
- aeri/api/health/errors/service_unavailable_error.py +13 -0
- aeri/api/health/raw_client.py +227 -0
- aeri/api/health/types/__init__.py +40 -0
- aeri/api/health/types/health_response.py +30 -0
- aeri/api/ingestion/__init__.py +169 -0
- aeri/api/ingestion/client.py +221 -0
- aeri/api/ingestion/raw_client.py +293 -0
- aeri/api/ingestion/types/__init__.py +169 -0
- aeri/api/ingestion/types/base_event.py +27 -0
- aeri/api/ingestion/types/create_event_body.py +14 -0
- aeri/api/ingestion/types/create_event_event.py +15 -0
- aeri/api/ingestion/types/create_generation_body.py +40 -0
- aeri/api/ingestion/types/create_generation_event.py +15 -0
- aeri/api/ingestion/types/create_observation_event.py +15 -0
- aeri/api/ingestion/types/create_span_body.py +19 -0
- aeri/api/ingestion/types/create_span_event.py +15 -0
- aeri/api/ingestion/types/ingestion_error.py +17 -0
- aeri/api/ingestion/types/ingestion_event.py +155 -0
- aeri/api/ingestion/types/ingestion_response.py +17 -0
- aeri/api/ingestion/types/ingestion_success.py +15 -0
- aeri/api/ingestion/types/ingestion_usage.py +8 -0
- aeri/api/ingestion/types/observation_body.py +53 -0
- aeri/api/ingestion/types/observation_type.py +54 -0
- aeri/api/ingestion/types/open_ai_completion_usage_schema.py +26 -0
- aeri/api/ingestion/types/open_ai_response_usage_schema.py +24 -0
- aeri/api/ingestion/types/open_ai_usage.py +28 -0
- aeri/api/ingestion/types/optional_observation_body.py +36 -0
- aeri/api/ingestion/types/score_body.py +75 -0
- aeri/api/ingestion/types/score_event.py +15 -0
- aeri/api/ingestion/types/sdk_log_body.py +14 -0
- aeri/api/ingestion/types/sdk_log_event.py +15 -0
- aeri/api/ingestion/types/trace_body.py +36 -0
- aeri/api/ingestion/types/trace_event.py +15 -0
- aeri/api/ingestion/types/update_event_body.py +14 -0
- aeri/api/ingestion/types/update_generation_body.py +40 -0
- aeri/api/ingestion/types/update_generation_event.py +15 -0
- aeri/api/ingestion/types/update_observation_event.py +15 -0
- aeri/api/ingestion/types/update_span_body.py +19 -0
- aeri/api/ingestion/types/update_span_event.py +15 -0
- aeri/api/ingestion/types/usage_details.py +10 -0
- aeri/api/legacy/__init__.py +61 -0
- aeri/api/legacy/client.py +105 -0
- aeri/api/legacy/metrics_v1/__init__.py +40 -0
- aeri/api/legacy/metrics_v1/client.py +214 -0
- aeri/api/legacy/metrics_v1/raw_client.py +322 -0
- aeri/api/legacy/metrics_v1/types/__init__.py +40 -0
- aeri/api/legacy/metrics_v1/types/metrics_response.py +19 -0
- aeri/api/legacy/observations_v1/__init__.py +43 -0
- aeri/api/legacy/observations_v1/client.py +523 -0
- aeri/api/legacy/observations_v1/raw_client.py +759 -0
- aeri/api/legacy/observations_v1/types/__init__.py +44 -0
- aeri/api/legacy/observations_v1/types/observations.py +17 -0
- aeri/api/legacy/observations_v1/types/observations_views.py +17 -0
- aeri/api/legacy/raw_client.py +13 -0
- aeri/api/legacy/score_v1/__init__.py +43 -0
- aeri/api/legacy/score_v1/client.py +329 -0
- aeri/api/legacy/score_v1/raw_client.py +545 -0
- aeri/api/legacy/score_v1/types/__init__.py +44 -0
- aeri/api/legacy/score_v1/types/create_score_request.py +75 -0
- aeri/api/legacy/score_v1/types/create_score_response.py +17 -0
- aeri/api/llm_connections/__init__.py +55 -0
- aeri/api/llm_connections/client.py +311 -0
- aeri/api/llm_connections/raw_client.py +541 -0
- aeri/api/llm_connections/types/__init__.py +53 -0
- aeri/api/llm_connections/types/llm_adapter.py +38 -0
- aeri/api/llm_connections/types/llm_connection.py +77 -0
- aeri/api/llm_connections/types/paginated_llm_connections.py +17 -0
- aeri/api/llm_connections/types/upsert_llm_connection_request.py +69 -0
- aeri/api/media/__init__.py +58 -0
- aeri/api/media/client.py +427 -0
- aeri/api/media/raw_client.py +739 -0
- aeri/api/media/types/__init__.py +56 -0
- aeri/api/media/types/get_media_response.py +55 -0
- aeri/api/media/types/get_media_upload_url_request.py +51 -0
- aeri/api/media/types/get_media_upload_url_response.py +28 -0
- aeri/api/media/types/media_content_type.py +232 -0
- aeri/api/media/types/patch_media_body.py +43 -0
- aeri/api/metrics/__init__.py +40 -0
- aeri/api/metrics/client.py +422 -0
- aeri/api/metrics/raw_client.py +530 -0
- aeri/api/metrics/types/__init__.py +40 -0
- aeri/api/metrics/types/metrics_v2response.py +19 -0
- aeri/api/models/__init__.py +43 -0
- aeri/api/models/client.py +523 -0
- aeri/api/models/raw_client.py +993 -0
- aeri/api/models/types/__init__.py +44 -0
- aeri/api/models/types/create_model_request.py +103 -0
- aeri/api/models/types/paginated_models.py +17 -0
- aeri/api/observations/__init__.py +43 -0
- aeri/api/observations/client.py +522 -0
- aeri/api/observations/raw_client.py +641 -0
- aeri/api/observations/types/__init__.py +44 -0
- aeri/api/observations/types/observations_v2meta.py +21 -0
- aeri/api/observations/types/observations_v2response.py +28 -0
- aeri/api/opentelemetry/__init__.py +67 -0
- aeri/api/opentelemetry/client.py +276 -0
- aeri/api/opentelemetry/raw_client.py +291 -0
- aeri/api/opentelemetry/types/__init__.py +65 -0
- aeri/api/opentelemetry/types/otel_attribute.py +27 -0
- aeri/api/opentelemetry/types/otel_attribute_value.py +46 -0
- aeri/api/opentelemetry/types/otel_resource.py +24 -0
- aeri/api/opentelemetry/types/otel_resource_span.py +32 -0
- aeri/api/opentelemetry/types/otel_scope.py +34 -0
- aeri/api/opentelemetry/types/otel_scope_span.py +28 -0
- aeri/api/opentelemetry/types/otel_span.py +76 -0
- aeri/api/opentelemetry/types/otel_trace_response.py +16 -0
- aeri/api/organizations/__init__.py +73 -0
- aeri/api/organizations/client.py +756 -0
- aeri/api/organizations/raw_client.py +1707 -0
- aeri/api/organizations/types/__init__.py +71 -0
- aeri/api/organizations/types/delete_membership_request.py +16 -0
- aeri/api/organizations/types/membership_deletion_response.py +17 -0
- aeri/api/organizations/types/membership_request.py +18 -0
- aeri/api/organizations/types/membership_response.py +20 -0
- aeri/api/organizations/types/membership_role.py +30 -0
- aeri/api/organizations/types/memberships_response.py +15 -0
- aeri/api/organizations/types/organization_api_key.py +31 -0
- aeri/api/organizations/types/organization_api_keys_response.py +19 -0
- aeri/api/organizations/types/organization_project.py +25 -0
- aeri/api/organizations/types/organization_projects_response.py +15 -0
- aeri/api/projects/__init__.py +67 -0
- aeri/api/projects/client.py +760 -0
- aeri/api/projects/raw_client.py +1577 -0
- aeri/api/projects/types/__init__.py +65 -0
- aeri/api/projects/types/api_key_deletion_response.py +18 -0
- aeri/api/projects/types/api_key_list.py +23 -0
- aeri/api/projects/types/api_key_response.py +30 -0
- aeri/api/projects/types/api_key_summary.py +35 -0
- aeri/api/projects/types/organization.py +22 -0
- aeri/api/projects/types/project.py +34 -0
- aeri/api/projects/types/project_deletion_response.py +15 -0
- aeri/api/projects/types/projects.py +15 -0
- aeri/api/prompt_version/__init__.py +4 -0
- aeri/api/prompt_version/client.py +157 -0
- aeri/api/prompt_version/raw_client.py +264 -0
- aeri/api/prompts/__init__.py +100 -0
- aeri/api/prompts/client.py +550 -0
- aeri/api/prompts/raw_client.py +987 -0
- aeri/api/prompts/types/__init__.py +96 -0
- aeri/api/prompts/types/base_prompt.py +42 -0
- aeri/api/prompts/types/chat_message.py +17 -0
- aeri/api/prompts/types/chat_message_type.py +15 -0
- aeri/api/prompts/types/chat_message_with_placeholders.py +8 -0
- aeri/api/prompts/types/chat_prompt.py +15 -0
- aeri/api/prompts/types/create_chat_prompt_request.py +37 -0
- aeri/api/prompts/types/create_chat_prompt_type.py +15 -0
- aeri/api/prompts/types/create_prompt_request.py +8 -0
- aeri/api/prompts/types/create_text_prompt_request.py +36 -0
- aeri/api/prompts/types/create_text_prompt_type.py +15 -0
- aeri/api/prompts/types/placeholder_message.py +16 -0
- aeri/api/prompts/types/placeholder_message_type.py +15 -0
- aeri/api/prompts/types/prompt.py +58 -0
- aeri/api/prompts/types/prompt_meta.py +35 -0
- aeri/api/prompts/types/prompt_meta_list_response.py +17 -0
- aeri/api/prompts/types/prompt_type.py +20 -0
- aeri/api/prompts/types/text_prompt.py +14 -0
- aeri/api/scim/__init__.py +94 -0
- aeri/api/scim/client.py +686 -0
- aeri/api/scim/raw_client.py +1528 -0
- aeri/api/scim/types/__init__.py +92 -0
- aeri/api/scim/types/authentication_scheme.py +20 -0
- aeri/api/scim/types/bulk_config.py +22 -0
- aeri/api/scim/types/empty_response.py +16 -0
- aeri/api/scim/types/filter_config.py +17 -0
- aeri/api/scim/types/resource_meta.py +17 -0
- aeri/api/scim/types/resource_type.py +27 -0
- aeri/api/scim/types/resource_types_response.py +21 -0
- aeri/api/scim/types/schema_extension.py +17 -0
- aeri/api/scim/types/schema_resource.py +19 -0
- aeri/api/scim/types/schemas_response.py +21 -0
- aeri/api/scim/types/scim_email.py +16 -0
- aeri/api/scim/types/scim_feature_support.py +14 -0
- aeri/api/scim/types/scim_name.py +14 -0
- aeri/api/scim/types/scim_user.py +24 -0
- aeri/api/scim/types/scim_users_list_response.py +25 -0
- aeri/api/scim/types/service_provider_config.py +36 -0
- aeri/api/scim/types/user_meta.py +20 -0
- aeri/api/score_configs/__init__.py +44 -0
- aeri/api/score_configs/client.py +526 -0
- aeri/api/score_configs/raw_client.py +1012 -0
- aeri/api/score_configs/types/__init__.py +46 -0
- aeri/api/score_configs/types/create_score_config_request.py +46 -0
- aeri/api/score_configs/types/score_configs.py +17 -0
- aeri/api/score_configs/types/update_score_config_request.py +53 -0
- aeri/api/scores/__init__.py +76 -0
- aeri/api/scores/client.py +420 -0
- aeri/api/scores/raw_client.py +656 -0
- aeri/api/scores/types/__init__.py +76 -0
- aeri/api/scores/types/get_scores_response.py +17 -0
- aeri/api/scores/types/get_scores_response_data.py +211 -0
- aeri/api/scores/types/get_scores_response_data_boolean.py +15 -0
- aeri/api/scores/types/get_scores_response_data_categorical.py +15 -0
- aeri/api/scores/types/get_scores_response_data_correction.py +15 -0
- aeri/api/scores/types/get_scores_response_data_numeric.py +15 -0
- aeri/api/scores/types/get_scores_response_trace_data.py +38 -0
- aeri/api/sessions/__init__.py +40 -0
- aeri/api/sessions/client.py +262 -0
- aeri/api/sessions/raw_client.py +500 -0
- aeri/api/sessions/types/__init__.py +40 -0
- aeri/api/sessions/types/paginated_sessions.py +17 -0
- aeri/api/trace/__init__.py +44 -0
- aeri/api/trace/client.py +728 -0
- aeri/api/trace/raw_client.py +1208 -0
- aeri/api/trace/types/__init__.py +46 -0
- aeri/api/trace/types/delete_trace_response.py +14 -0
- aeri/api/trace/types/sort.py +14 -0
- aeri/api/trace/types/traces.py +17 -0
- aeri/api/utils/__init__.py +44 -0
- aeri/api/utils/pagination/__init__.py +40 -0
- aeri/api/utils/pagination/types/__init__.py +40 -0
- aeri/api/utils/pagination/types/meta_response.py +38 -0
- aeri/batch_evaluation.py +1643 -0
- aeri/experiment.py +1044 -0
- aeri/langchain/CallbackHandler.py +1377 -0
- aeri/langchain/__init__.py +5 -0
- aeri/langchain/utils.py +212 -0
- aeri/logger.py +28 -0
- aeri/media.py +352 -0
- aeri/model.py +477 -0
- aeri/openai.py +1124 -0
- aeri/py.typed +0 -0
- aeri/span_filter.py +17 -0
- aeri/types.py +79 -0
- aeri/version.py +3 -0
- aeri_python-4.0.0.dist-info/METADATA +51 -0
- aeri_python-4.0.0.dist-info/RECORD +391 -0
- aeri_python-4.0.0.dist-info/WHEEL +4 -0
- aeri_python-4.0.0.dist-info/licenses/LICENSE +21 -0
aeri/api/scim/client.py
ADDED
|
@@ -0,0 +1,686 @@
|
|
|
1
|
+
# This file was auto-generated by Fern from our API Definition.
|
|
2
|
+
|
|
3
|
+
import typing
|
|
4
|
+
|
|
5
|
+
from ..core.client_wrapper import AsyncClientWrapper, SyncClientWrapper
|
|
6
|
+
from ..core.request_options import RequestOptions
|
|
7
|
+
from .raw_client import AsyncRawScimClient, RawScimClient
|
|
8
|
+
from .types.empty_response import EmptyResponse
|
|
9
|
+
from .types.resource_types_response import ResourceTypesResponse
|
|
10
|
+
from .types.schemas_response import SchemasResponse
|
|
11
|
+
from .types.scim_email import ScimEmail
|
|
12
|
+
from .types.scim_name import ScimName
|
|
13
|
+
from .types.scim_user import ScimUser
|
|
14
|
+
from .types.scim_users_list_response import ScimUsersListResponse
|
|
15
|
+
from .types.service_provider_config import ServiceProviderConfig
|
|
16
|
+
|
|
17
|
+
# this is used as the default value for optional parameters
|
|
18
|
+
OMIT = typing.cast(typing.Any, ...)
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
class ScimClient:
|
|
22
|
+
def __init__(self, *, client_wrapper: SyncClientWrapper):
|
|
23
|
+
self._raw_client = RawScimClient(client_wrapper=client_wrapper)
|
|
24
|
+
|
|
25
|
+
@property
|
|
26
|
+
def with_raw_response(self) -> RawScimClient:
|
|
27
|
+
"""
|
|
28
|
+
Retrieves a raw implementation of this client that returns raw responses.
|
|
29
|
+
|
|
30
|
+
Returns
|
|
31
|
+
-------
|
|
32
|
+
RawScimClient
|
|
33
|
+
"""
|
|
34
|
+
return self._raw_client
|
|
35
|
+
|
|
36
|
+
def get_service_provider_config(
|
|
37
|
+
self, *, request_options: typing.Optional[RequestOptions] = None
|
|
38
|
+
) -> ServiceProviderConfig:
|
|
39
|
+
"""
|
|
40
|
+
Get SCIM Service Provider Configuration (requires organization-scoped API key)
|
|
41
|
+
|
|
42
|
+
Parameters
|
|
43
|
+
----------
|
|
44
|
+
request_options : typing.Optional[RequestOptions]
|
|
45
|
+
Request-specific configuration.
|
|
46
|
+
|
|
47
|
+
Returns
|
|
48
|
+
-------
|
|
49
|
+
ServiceProviderConfig
|
|
50
|
+
|
|
51
|
+
Examples
|
|
52
|
+
--------
|
|
53
|
+
from aeri import AeriAPI
|
|
54
|
+
|
|
55
|
+
client = AeriAPI(
|
|
56
|
+
x_aeri_sdk_name="YOUR_X_AERI_SDK_NAME",
|
|
57
|
+
x_aeri_sdk_version="YOUR_X_AERI_SDK_VERSION",
|
|
58
|
+
x_aeri_public_key="YOUR_X_AERI_PUBLIC_KEY",
|
|
59
|
+
username="YOUR_USERNAME",
|
|
60
|
+
password="YOUR_PASSWORD",
|
|
61
|
+
base_url="https://yourhost.com/path/to/api",
|
|
62
|
+
)
|
|
63
|
+
client.scim.get_service_provider_config()
|
|
64
|
+
"""
|
|
65
|
+
_response = self._raw_client.get_service_provider_config(
|
|
66
|
+
request_options=request_options
|
|
67
|
+
)
|
|
68
|
+
return _response.data
|
|
69
|
+
|
|
70
|
+
def get_resource_types(
|
|
71
|
+
self, *, request_options: typing.Optional[RequestOptions] = None
|
|
72
|
+
) -> ResourceTypesResponse:
|
|
73
|
+
"""
|
|
74
|
+
Get SCIM Resource Types (requires organization-scoped API key)
|
|
75
|
+
|
|
76
|
+
Parameters
|
|
77
|
+
----------
|
|
78
|
+
request_options : typing.Optional[RequestOptions]
|
|
79
|
+
Request-specific configuration.
|
|
80
|
+
|
|
81
|
+
Returns
|
|
82
|
+
-------
|
|
83
|
+
ResourceTypesResponse
|
|
84
|
+
|
|
85
|
+
Examples
|
|
86
|
+
--------
|
|
87
|
+
from aeri import AeriAPI
|
|
88
|
+
|
|
89
|
+
client = AeriAPI(
|
|
90
|
+
x_aeri_sdk_name="YOUR_X_AERI_SDK_NAME",
|
|
91
|
+
x_aeri_sdk_version="YOUR_X_AERI_SDK_VERSION",
|
|
92
|
+
x_aeri_public_key="YOUR_X_AERI_PUBLIC_KEY",
|
|
93
|
+
username="YOUR_USERNAME",
|
|
94
|
+
password="YOUR_PASSWORD",
|
|
95
|
+
base_url="https://yourhost.com/path/to/api",
|
|
96
|
+
)
|
|
97
|
+
client.scim.get_resource_types()
|
|
98
|
+
"""
|
|
99
|
+
_response = self._raw_client.get_resource_types(request_options=request_options)
|
|
100
|
+
return _response.data
|
|
101
|
+
|
|
102
|
+
def get_schemas(
|
|
103
|
+
self, *, request_options: typing.Optional[RequestOptions] = None
|
|
104
|
+
) -> SchemasResponse:
|
|
105
|
+
"""
|
|
106
|
+
Get SCIM Schemas (requires organization-scoped API key)
|
|
107
|
+
|
|
108
|
+
Parameters
|
|
109
|
+
----------
|
|
110
|
+
request_options : typing.Optional[RequestOptions]
|
|
111
|
+
Request-specific configuration.
|
|
112
|
+
|
|
113
|
+
Returns
|
|
114
|
+
-------
|
|
115
|
+
SchemasResponse
|
|
116
|
+
|
|
117
|
+
Examples
|
|
118
|
+
--------
|
|
119
|
+
from aeri import AeriAPI
|
|
120
|
+
|
|
121
|
+
client = AeriAPI(
|
|
122
|
+
x_aeri_sdk_name="YOUR_X_AERI_SDK_NAME",
|
|
123
|
+
x_aeri_sdk_version="YOUR_X_AERI_SDK_VERSION",
|
|
124
|
+
x_aeri_public_key="YOUR_X_AERI_PUBLIC_KEY",
|
|
125
|
+
username="YOUR_USERNAME",
|
|
126
|
+
password="YOUR_PASSWORD",
|
|
127
|
+
base_url="https://yourhost.com/path/to/api",
|
|
128
|
+
)
|
|
129
|
+
client.scim.get_schemas()
|
|
130
|
+
"""
|
|
131
|
+
_response = self._raw_client.get_schemas(request_options=request_options)
|
|
132
|
+
return _response.data
|
|
133
|
+
|
|
134
|
+
def list_users(
|
|
135
|
+
self,
|
|
136
|
+
*,
|
|
137
|
+
filter: typing.Optional[str] = None,
|
|
138
|
+
start_index: typing.Optional[int] = None,
|
|
139
|
+
count: typing.Optional[int] = None,
|
|
140
|
+
request_options: typing.Optional[RequestOptions] = None,
|
|
141
|
+
) -> ScimUsersListResponse:
|
|
142
|
+
"""
|
|
143
|
+
List users in the organization (requires organization-scoped API key)
|
|
144
|
+
|
|
145
|
+
Parameters
|
|
146
|
+
----------
|
|
147
|
+
filter : typing.Optional[str]
|
|
148
|
+
Filter expression (e.g. userName eq "value")
|
|
149
|
+
|
|
150
|
+
start_index : typing.Optional[int]
|
|
151
|
+
1-based index of the first result to return (default 1)
|
|
152
|
+
|
|
153
|
+
count : typing.Optional[int]
|
|
154
|
+
Maximum number of results to return (default 100)
|
|
155
|
+
|
|
156
|
+
request_options : typing.Optional[RequestOptions]
|
|
157
|
+
Request-specific configuration.
|
|
158
|
+
|
|
159
|
+
Returns
|
|
160
|
+
-------
|
|
161
|
+
ScimUsersListResponse
|
|
162
|
+
|
|
163
|
+
Examples
|
|
164
|
+
--------
|
|
165
|
+
from aeri import AeriAPI
|
|
166
|
+
|
|
167
|
+
client = AeriAPI(
|
|
168
|
+
x_aeri_sdk_name="YOUR_X_AERI_SDK_NAME",
|
|
169
|
+
x_aeri_sdk_version="YOUR_X_AERI_SDK_VERSION",
|
|
170
|
+
x_aeri_public_key="YOUR_X_AERI_PUBLIC_KEY",
|
|
171
|
+
username="YOUR_USERNAME",
|
|
172
|
+
password="YOUR_PASSWORD",
|
|
173
|
+
base_url="https://yourhost.com/path/to/api",
|
|
174
|
+
)
|
|
175
|
+
client.scim.list_users()
|
|
176
|
+
"""
|
|
177
|
+
_response = self._raw_client.list_users(
|
|
178
|
+
filter=filter,
|
|
179
|
+
start_index=start_index,
|
|
180
|
+
count=count,
|
|
181
|
+
request_options=request_options,
|
|
182
|
+
)
|
|
183
|
+
return _response.data
|
|
184
|
+
|
|
185
|
+
def create_user(
|
|
186
|
+
self,
|
|
187
|
+
*,
|
|
188
|
+
user_name: str,
|
|
189
|
+
name: ScimName,
|
|
190
|
+
emails: typing.Optional[typing.Sequence[ScimEmail]] = OMIT,
|
|
191
|
+
active: typing.Optional[bool] = OMIT,
|
|
192
|
+
password: typing.Optional[str] = OMIT,
|
|
193
|
+
request_options: typing.Optional[RequestOptions] = None,
|
|
194
|
+
) -> ScimUser:
|
|
195
|
+
"""
|
|
196
|
+
Create a new user in the organization (requires organization-scoped API key)
|
|
197
|
+
|
|
198
|
+
Parameters
|
|
199
|
+
----------
|
|
200
|
+
user_name : str
|
|
201
|
+
User's email address (required)
|
|
202
|
+
|
|
203
|
+
name : ScimName
|
|
204
|
+
User's name information
|
|
205
|
+
|
|
206
|
+
emails : typing.Optional[typing.Sequence[ScimEmail]]
|
|
207
|
+
User's email addresses
|
|
208
|
+
|
|
209
|
+
active : typing.Optional[bool]
|
|
210
|
+
Whether the user is active
|
|
211
|
+
|
|
212
|
+
password : typing.Optional[str]
|
|
213
|
+
Initial password for the user
|
|
214
|
+
|
|
215
|
+
request_options : typing.Optional[RequestOptions]
|
|
216
|
+
Request-specific configuration.
|
|
217
|
+
|
|
218
|
+
Returns
|
|
219
|
+
-------
|
|
220
|
+
ScimUser
|
|
221
|
+
|
|
222
|
+
Examples
|
|
223
|
+
--------
|
|
224
|
+
from aeri import AeriAPI
|
|
225
|
+
from aeri.scim import ScimName
|
|
226
|
+
|
|
227
|
+
client = AeriAPI(
|
|
228
|
+
x_aeri_sdk_name="YOUR_X_AERI_SDK_NAME",
|
|
229
|
+
x_aeri_sdk_version="YOUR_X_AERI_SDK_VERSION",
|
|
230
|
+
x_aeri_public_key="YOUR_X_AERI_PUBLIC_KEY",
|
|
231
|
+
username="YOUR_USERNAME",
|
|
232
|
+
password="YOUR_PASSWORD",
|
|
233
|
+
base_url="https://yourhost.com/path/to/api",
|
|
234
|
+
)
|
|
235
|
+
client.scim.create_user(
|
|
236
|
+
user_name="userName",
|
|
237
|
+
name=ScimName(),
|
|
238
|
+
)
|
|
239
|
+
"""
|
|
240
|
+
_response = self._raw_client.create_user(
|
|
241
|
+
user_name=user_name,
|
|
242
|
+
name=name,
|
|
243
|
+
emails=emails,
|
|
244
|
+
active=active,
|
|
245
|
+
password=password,
|
|
246
|
+
request_options=request_options,
|
|
247
|
+
)
|
|
248
|
+
return _response.data
|
|
249
|
+
|
|
250
|
+
def get_user(
|
|
251
|
+
self, user_id: str, *, request_options: typing.Optional[RequestOptions] = None
|
|
252
|
+
) -> ScimUser:
|
|
253
|
+
"""
|
|
254
|
+
Get a specific user by ID (requires organization-scoped API key)
|
|
255
|
+
|
|
256
|
+
Parameters
|
|
257
|
+
----------
|
|
258
|
+
user_id : str
|
|
259
|
+
|
|
260
|
+
request_options : typing.Optional[RequestOptions]
|
|
261
|
+
Request-specific configuration.
|
|
262
|
+
|
|
263
|
+
Returns
|
|
264
|
+
-------
|
|
265
|
+
ScimUser
|
|
266
|
+
|
|
267
|
+
Examples
|
|
268
|
+
--------
|
|
269
|
+
from aeri import AeriAPI
|
|
270
|
+
|
|
271
|
+
client = AeriAPI(
|
|
272
|
+
x_aeri_sdk_name="YOUR_X_AERI_SDK_NAME",
|
|
273
|
+
x_aeri_sdk_version="YOUR_X_AERI_SDK_VERSION",
|
|
274
|
+
x_aeri_public_key="YOUR_X_AERI_PUBLIC_KEY",
|
|
275
|
+
username="YOUR_USERNAME",
|
|
276
|
+
password="YOUR_PASSWORD",
|
|
277
|
+
base_url="https://yourhost.com/path/to/api",
|
|
278
|
+
)
|
|
279
|
+
client.scim.get_user(
|
|
280
|
+
user_id="userId",
|
|
281
|
+
)
|
|
282
|
+
"""
|
|
283
|
+
_response = self._raw_client.get_user(user_id, request_options=request_options)
|
|
284
|
+
return _response.data
|
|
285
|
+
|
|
286
|
+
def delete_user(
|
|
287
|
+
self, user_id: str, *, request_options: typing.Optional[RequestOptions] = None
|
|
288
|
+
) -> EmptyResponse:
|
|
289
|
+
"""
|
|
290
|
+
Remove a user from the organization (requires organization-scoped API key). Note that this only removes the user from the organization but does not delete the user entity itself.
|
|
291
|
+
|
|
292
|
+
Parameters
|
|
293
|
+
----------
|
|
294
|
+
user_id : str
|
|
295
|
+
|
|
296
|
+
request_options : typing.Optional[RequestOptions]
|
|
297
|
+
Request-specific configuration.
|
|
298
|
+
|
|
299
|
+
Returns
|
|
300
|
+
-------
|
|
301
|
+
EmptyResponse
|
|
302
|
+
|
|
303
|
+
Examples
|
|
304
|
+
--------
|
|
305
|
+
from aeri import AeriAPI
|
|
306
|
+
|
|
307
|
+
client = AeriAPI(
|
|
308
|
+
x_aeri_sdk_name="YOUR_X_AERI_SDK_NAME",
|
|
309
|
+
x_aeri_sdk_version="YOUR_X_AERI_SDK_VERSION",
|
|
310
|
+
x_aeri_public_key="YOUR_X_AERI_PUBLIC_KEY",
|
|
311
|
+
username="YOUR_USERNAME",
|
|
312
|
+
password="YOUR_PASSWORD",
|
|
313
|
+
base_url="https://yourhost.com/path/to/api",
|
|
314
|
+
)
|
|
315
|
+
client.scim.delete_user(
|
|
316
|
+
user_id="userId",
|
|
317
|
+
)
|
|
318
|
+
"""
|
|
319
|
+
_response = self._raw_client.delete_user(
|
|
320
|
+
user_id, request_options=request_options
|
|
321
|
+
)
|
|
322
|
+
return _response.data
|
|
323
|
+
|
|
324
|
+
|
|
325
|
+
class AsyncScimClient:
|
|
326
|
+
def __init__(self, *, client_wrapper: AsyncClientWrapper):
|
|
327
|
+
self._raw_client = AsyncRawScimClient(client_wrapper=client_wrapper)
|
|
328
|
+
|
|
329
|
+
@property
|
|
330
|
+
def with_raw_response(self) -> AsyncRawScimClient:
|
|
331
|
+
"""
|
|
332
|
+
Retrieves a raw implementation of this client that returns raw responses.
|
|
333
|
+
|
|
334
|
+
Returns
|
|
335
|
+
-------
|
|
336
|
+
AsyncRawScimClient
|
|
337
|
+
"""
|
|
338
|
+
return self._raw_client
|
|
339
|
+
|
|
340
|
+
async def get_service_provider_config(
|
|
341
|
+
self, *, request_options: typing.Optional[RequestOptions] = None
|
|
342
|
+
) -> ServiceProviderConfig:
|
|
343
|
+
"""
|
|
344
|
+
Get SCIM Service Provider Configuration (requires organization-scoped API key)
|
|
345
|
+
|
|
346
|
+
Parameters
|
|
347
|
+
----------
|
|
348
|
+
request_options : typing.Optional[RequestOptions]
|
|
349
|
+
Request-specific configuration.
|
|
350
|
+
|
|
351
|
+
Returns
|
|
352
|
+
-------
|
|
353
|
+
ServiceProviderConfig
|
|
354
|
+
|
|
355
|
+
Examples
|
|
356
|
+
--------
|
|
357
|
+
import asyncio
|
|
358
|
+
|
|
359
|
+
from aeri import AsyncAeriAPI
|
|
360
|
+
|
|
361
|
+
client = AsyncAeriAPI(
|
|
362
|
+
x_aeri_sdk_name="YOUR_X_AERI_SDK_NAME",
|
|
363
|
+
x_aeri_sdk_version="YOUR_X_AERI_SDK_VERSION",
|
|
364
|
+
x_aeri_public_key="YOUR_X_AERI_PUBLIC_KEY",
|
|
365
|
+
username="YOUR_USERNAME",
|
|
366
|
+
password="YOUR_PASSWORD",
|
|
367
|
+
base_url="https://yourhost.com/path/to/api",
|
|
368
|
+
)
|
|
369
|
+
|
|
370
|
+
|
|
371
|
+
async def main() -> None:
|
|
372
|
+
await client.scim.get_service_provider_config()
|
|
373
|
+
|
|
374
|
+
|
|
375
|
+
asyncio.run(main())
|
|
376
|
+
"""
|
|
377
|
+
_response = await self._raw_client.get_service_provider_config(
|
|
378
|
+
request_options=request_options
|
|
379
|
+
)
|
|
380
|
+
return _response.data
|
|
381
|
+
|
|
382
|
+
async def get_resource_types(
|
|
383
|
+
self, *, request_options: typing.Optional[RequestOptions] = None
|
|
384
|
+
) -> ResourceTypesResponse:
|
|
385
|
+
"""
|
|
386
|
+
Get SCIM Resource Types (requires organization-scoped API key)
|
|
387
|
+
|
|
388
|
+
Parameters
|
|
389
|
+
----------
|
|
390
|
+
request_options : typing.Optional[RequestOptions]
|
|
391
|
+
Request-specific configuration.
|
|
392
|
+
|
|
393
|
+
Returns
|
|
394
|
+
-------
|
|
395
|
+
ResourceTypesResponse
|
|
396
|
+
|
|
397
|
+
Examples
|
|
398
|
+
--------
|
|
399
|
+
import asyncio
|
|
400
|
+
|
|
401
|
+
from aeri import AsyncAeriAPI
|
|
402
|
+
|
|
403
|
+
client = AsyncAeriAPI(
|
|
404
|
+
x_aeri_sdk_name="YOUR_X_AERI_SDK_NAME",
|
|
405
|
+
x_aeri_sdk_version="YOUR_X_AERI_SDK_VERSION",
|
|
406
|
+
x_aeri_public_key="YOUR_X_AERI_PUBLIC_KEY",
|
|
407
|
+
username="YOUR_USERNAME",
|
|
408
|
+
password="YOUR_PASSWORD",
|
|
409
|
+
base_url="https://yourhost.com/path/to/api",
|
|
410
|
+
)
|
|
411
|
+
|
|
412
|
+
|
|
413
|
+
async def main() -> None:
|
|
414
|
+
await client.scim.get_resource_types()
|
|
415
|
+
|
|
416
|
+
|
|
417
|
+
asyncio.run(main())
|
|
418
|
+
"""
|
|
419
|
+
_response = await self._raw_client.get_resource_types(
|
|
420
|
+
request_options=request_options
|
|
421
|
+
)
|
|
422
|
+
return _response.data
|
|
423
|
+
|
|
424
|
+
async def get_schemas(
|
|
425
|
+
self, *, request_options: typing.Optional[RequestOptions] = None
|
|
426
|
+
) -> SchemasResponse:
|
|
427
|
+
"""
|
|
428
|
+
Get SCIM Schemas (requires organization-scoped API key)
|
|
429
|
+
|
|
430
|
+
Parameters
|
|
431
|
+
----------
|
|
432
|
+
request_options : typing.Optional[RequestOptions]
|
|
433
|
+
Request-specific configuration.
|
|
434
|
+
|
|
435
|
+
Returns
|
|
436
|
+
-------
|
|
437
|
+
SchemasResponse
|
|
438
|
+
|
|
439
|
+
Examples
|
|
440
|
+
--------
|
|
441
|
+
import asyncio
|
|
442
|
+
|
|
443
|
+
from aeri import AsyncAeriAPI
|
|
444
|
+
|
|
445
|
+
client = AsyncAeriAPI(
|
|
446
|
+
x_aeri_sdk_name="YOUR_X_AERI_SDK_NAME",
|
|
447
|
+
x_aeri_sdk_version="YOUR_X_AERI_SDK_VERSION",
|
|
448
|
+
x_aeri_public_key="YOUR_X_AERI_PUBLIC_KEY",
|
|
449
|
+
username="YOUR_USERNAME",
|
|
450
|
+
password="YOUR_PASSWORD",
|
|
451
|
+
base_url="https://yourhost.com/path/to/api",
|
|
452
|
+
)
|
|
453
|
+
|
|
454
|
+
|
|
455
|
+
async def main() -> None:
|
|
456
|
+
await client.scim.get_schemas()
|
|
457
|
+
|
|
458
|
+
|
|
459
|
+
asyncio.run(main())
|
|
460
|
+
"""
|
|
461
|
+
_response = await self._raw_client.get_schemas(request_options=request_options)
|
|
462
|
+
return _response.data
|
|
463
|
+
|
|
464
|
+
async def list_users(
|
|
465
|
+
self,
|
|
466
|
+
*,
|
|
467
|
+
filter: typing.Optional[str] = None,
|
|
468
|
+
start_index: typing.Optional[int] = None,
|
|
469
|
+
count: typing.Optional[int] = None,
|
|
470
|
+
request_options: typing.Optional[RequestOptions] = None,
|
|
471
|
+
) -> ScimUsersListResponse:
|
|
472
|
+
"""
|
|
473
|
+
List users in the organization (requires organization-scoped API key)
|
|
474
|
+
|
|
475
|
+
Parameters
|
|
476
|
+
----------
|
|
477
|
+
filter : typing.Optional[str]
|
|
478
|
+
Filter expression (e.g. userName eq "value")
|
|
479
|
+
|
|
480
|
+
start_index : typing.Optional[int]
|
|
481
|
+
1-based index of the first result to return (default 1)
|
|
482
|
+
|
|
483
|
+
count : typing.Optional[int]
|
|
484
|
+
Maximum number of results to return (default 100)
|
|
485
|
+
|
|
486
|
+
request_options : typing.Optional[RequestOptions]
|
|
487
|
+
Request-specific configuration.
|
|
488
|
+
|
|
489
|
+
Returns
|
|
490
|
+
-------
|
|
491
|
+
ScimUsersListResponse
|
|
492
|
+
|
|
493
|
+
Examples
|
|
494
|
+
--------
|
|
495
|
+
import asyncio
|
|
496
|
+
|
|
497
|
+
from aeri import AsyncAeriAPI
|
|
498
|
+
|
|
499
|
+
client = AsyncAeriAPI(
|
|
500
|
+
x_aeri_sdk_name="YOUR_X_AERI_SDK_NAME",
|
|
501
|
+
x_aeri_sdk_version="YOUR_X_AERI_SDK_VERSION",
|
|
502
|
+
x_aeri_public_key="YOUR_X_AERI_PUBLIC_KEY",
|
|
503
|
+
username="YOUR_USERNAME",
|
|
504
|
+
password="YOUR_PASSWORD",
|
|
505
|
+
base_url="https://yourhost.com/path/to/api",
|
|
506
|
+
)
|
|
507
|
+
|
|
508
|
+
|
|
509
|
+
async def main() -> None:
|
|
510
|
+
await client.scim.list_users()
|
|
511
|
+
|
|
512
|
+
|
|
513
|
+
asyncio.run(main())
|
|
514
|
+
"""
|
|
515
|
+
_response = await self._raw_client.list_users(
|
|
516
|
+
filter=filter,
|
|
517
|
+
start_index=start_index,
|
|
518
|
+
count=count,
|
|
519
|
+
request_options=request_options,
|
|
520
|
+
)
|
|
521
|
+
return _response.data
|
|
522
|
+
|
|
523
|
+
async def create_user(
|
|
524
|
+
self,
|
|
525
|
+
*,
|
|
526
|
+
user_name: str,
|
|
527
|
+
name: ScimName,
|
|
528
|
+
emails: typing.Optional[typing.Sequence[ScimEmail]] = OMIT,
|
|
529
|
+
active: typing.Optional[bool] = OMIT,
|
|
530
|
+
password: typing.Optional[str] = OMIT,
|
|
531
|
+
request_options: typing.Optional[RequestOptions] = None,
|
|
532
|
+
) -> ScimUser:
|
|
533
|
+
"""
|
|
534
|
+
Create a new user in the organization (requires organization-scoped API key)
|
|
535
|
+
|
|
536
|
+
Parameters
|
|
537
|
+
----------
|
|
538
|
+
user_name : str
|
|
539
|
+
User's email address (required)
|
|
540
|
+
|
|
541
|
+
name : ScimName
|
|
542
|
+
User's name information
|
|
543
|
+
|
|
544
|
+
emails : typing.Optional[typing.Sequence[ScimEmail]]
|
|
545
|
+
User's email addresses
|
|
546
|
+
|
|
547
|
+
active : typing.Optional[bool]
|
|
548
|
+
Whether the user is active
|
|
549
|
+
|
|
550
|
+
password : typing.Optional[str]
|
|
551
|
+
Initial password for the user
|
|
552
|
+
|
|
553
|
+
request_options : typing.Optional[RequestOptions]
|
|
554
|
+
Request-specific configuration.
|
|
555
|
+
|
|
556
|
+
Returns
|
|
557
|
+
-------
|
|
558
|
+
ScimUser
|
|
559
|
+
|
|
560
|
+
Examples
|
|
561
|
+
--------
|
|
562
|
+
import asyncio
|
|
563
|
+
|
|
564
|
+
from aeri import AsyncAeriAPI
|
|
565
|
+
from aeri.scim import ScimName
|
|
566
|
+
|
|
567
|
+
client = AsyncAeriAPI(
|
|
568
|
+
x_aeri_sdk_name="YOUR_X_AERI_SDK_NAME",
|
|
569
|
+
x_aeri_sdk_version="YOUR_X_AERI_SDK_VERSION",
|
|
570
|
+
x_aeri_public_key="YOUR_X_AERI_PUBLIC_KEY",
|
|
571
|
+
username="YOUR_USERNAME",
|
|
572
|
+
password="YOUR_PASSWORD",
|
|
573
|
+
base_url="https://yourhost.com/path/to/api",
|
|
574
|
+
)
|
|
575
|
+
|
|
576
|
+
|
|
577
|
+
async def main() -> None:
|
|
578
|
+
await client.scim.create_user(
|
|
579
|
+
user_name="userName",
|
|
580
|
+
name=ScimName(),
|
|
581
|
+
)
|
|
582
|
+
|
|
583
|
+
|
|
584
|
+
asyncio.run(main())
|
|
585
|
+
"""
|
|
586
|
+
_response = await self._raw_client.create_user(
|
|
587
|
+
user_name=user_name,
|
|
588
|
+
name=name,
|
|
589
|
+
emails=emails,
|
|
590
|
+
active=active,
|
|
591
|
+
password=password,
|
|
592
|
+
request_options=request_options,
|
|
593
|
+
)
|
|
594
|
+
return _response.data
|
|
595
|
+
|
|
596
|
+
async def get_user(
|
|
597
|
+
self, user_id: str, *, request_options: typing.Optional[RequestOptions] = None
|
|
598
|
+
) -> ScimUser:
|
|
599
|
+
"""
|
|
600
|
+
Get a specific user by ID (requires organization-scoped API key)
|
|
601
|
+
|
|
602
|
+
Parameters
|
|
603
|
+
----------
|
|
604
|
+
user_id : str
|
|
605
|
+
|
|
606
|
+
request_options : typing.Optional[RequestOptions]
|
|
607
|
+
Request-specific configuration.
|
|
608
|
+
|
|
609
|
+
Returns
|
|
610
|
+
-------
|
|
611
|
+
ScimUser
|
|
612
|
+
|
|
613
|
+
Examples
|
|
614
|
+
--------
|
|
615
|
+
import asyncio
|
|
616
|
+
|
|
617
|
+
from aeri import AsyncAeriAPI
|
|
618
|
+
|
|
619
|
+
client = AsyncAeriAPI(
|
|
620
|
+
x_aeri_sdk_name="YOUR_X_AERI_SDK_NAME",
|
|
621
|
+
x_aeri_sdk_version="YOUR_X_AERI_SDK_VERSION",
|
|
622
|
+
x_aeri_public_key="YOUR_X_AERI_PUBLIC_KEY",
|
|
623
|
+
username="YOUR_USERNAME",
|
|
624
|
+
password="YOUR_PASSWORD",
|
|
625
|
+
base_url="https://yourhost.com/path/to/api",
|
|
626
|
+
)
|
|
627
|
+
|
|
628
|
+
|
|
629
|
+
async def main() -> None:
|
|
630
|
+
await client.scim.get_user(
|
|
631
|
+
user_id="userId",
|
|
632
|
+
)
|
|
633
|
+
|
|
634
|
+
|
|
635
|
+
asyncio.run(main())
|
|
636
|
+
"""
|
|
637
|
+
_response = await self._raw_client.get_user(
|
|
638
|
+
user_id, request_options=request_options
|
|
639
|
+
)
|
|
640
|
+
return _response.data
|
|
641
|
+
|
|
642
|
+
async def delete_user(
|
|
643
|
+
self, user_id: str, *, request_options: typing.Optional[RequestOptions] = None
|
|
644
|
+
) -> EmptyResponse:
|
|
645
|
+
"""
|
|
646
|
+
Remove a user from the organization (requires organization-scoped API key). Note that this only removes the user from the organization but does not delete the user entity itself.
|
|
647
|
+
|
|
648
|
+
Parameters
|
|
649
|
+
----------
|
|
650
|
+
user_id : str
|
|
651
|
+
|
|
652
|
+
request_options : typing.Optional[RequestOptions]
|
|
653
|
+
Request-specific configuration.
|
|
654
|
+
|
|
655
|
+
Returns
|
|
656
|
+
-------
|
|
657
|
+
EmptyResponse
|
|
658
|
+
|
|
659
|
+
Examples
|
|
660
|
+
--------
|
|
661
|
+
import asyncio
|
|
662
|
+
|
|
663
|
+
from aeri import AsyncAeriAPI
|
|
664
|
+
|
|
665
|
+
client = AsyncAeriAPI(
|
|
666
|
+
x_aeri_sdk_name="YOUR_X_AERI_SDK_NAME",
|
|
667
|
+
x_aeri_sdk_version="YOUR_X_AERI_SDK_VERSION",
|
|
668
|
+
x_aeri_public_key="YOUR_X_AERI_PUBLIC_KEY",
|
|
669
|
+
username="YOUR_USERNAME",
|
|
670
|
+
password="YOUR_PASSWORD",
|
|
671
|
+
base_url="https://yourhost.com/path/to/api",
|
|
672
|
+
)
|
|
673
|
+
|
|
674
|
+
|
|
675
|
+
async def main() -> None:
|
|
676
|
+
await client.scim.delete_user(
|
|
677
|
+
user_id="userId",
|
|
678
|
+
)
|
|
679
|
+
|
|
680
|
+
|
|
681
|
+
asyncio.run(main())
|
|
682
|
+
"""
|
|
683
|
+
_response = await self._raw_client.delete_user(
|
|
684
|
+
user_id, request_options=request_options
|
|
685
|
+
)
|
|
686
|
+
return _response.data
|