lightning-sdk 2025.8.6rc2__py3-none-any.whl → 2025.11.5__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.
- lightning_sdk/__init__.py +13 -7
- lightning_sdk/__version__.py +3 -0
- lightning_sdk/agents.py +2 -1
- lightning_sdk/ai_hub.py +2 -1
- lightning_sdk/api/__init__.py +2 -0
- lightning_sdk/api/base_studio_api.py +13 -9
- lightning_sdk/api/cloud_account_api.py +31 -10
- lightning_sdk/api/deployment_api.py +27 -1
- lightning_sdk/api/job_api.py +16 -12
- lightning_sdk/api/license_api.py +26 -59
- lightning_sdk/api/llm_api.py +25 -2
- lightning_sdk/api/mmt_api.py +5 -2
- lightning_sdk/api/studio_api.py +252 -55
- lightning_sdk/api/teamspace_api.py +106 -30
- lightning_sdk/api/user_api.py +56 -2
- lightning_sdk/api/utils.py +108 -18
- lightning_sdk/base_studio.py +51 -27
- lightning_sdk/cli/__init__.py +1 -0
- lightning_sdk/cli/base_studio/__init__.py +10 -0
- lightning_sdk/cli/base_studio/list.py +43 -0
- lightning_sdk/cli/config/__init__.py +14 -0
- lightning_sdk/cli/config/get.py +57 -0
- lightning_sdk/cli/config/set.py +92 -0
- lightning_sdk/cli/config/show.py +9 -0
- lightning_sdk/cli/entrypoint.py +71 -71
- lightning_sdk/cli/groups.py +56 -0
- lightning_sdk/cli/job/__init__.py +7 -0
- lightning_sdk/cli/{clusters_menu.py → legacy/clusters_menu.py} +9 -6
- lightning_sdk/cli/{configure.py → legacy/configure.py} +2 -2
- lightning_sdk/cli/{connect.py → legacy/connect.py} +2 -2
- lightning_sdk/cli/{create.py → legacy/create.py} +12 -14
- lightning_sdk/cli/{delete.py → legacy/delete.py} +5 -5
- lightning_sdk/cli/legacy/deploy/__init__.py +0 -0
- lightning_sdk/cli/{deploy → legacy/deploy}/_auth.py +5 -6
- lightning_sdk/cli/{deploy → legacy/deploy}/devbox.py +8 -2
- lightning_sdk/cli/{deploy → legacy/deploy}/serve.py +19 -8
- lightning_sdk/cli/{download.py → legacy/download.py} +14 -15
- lightning_sdk/cli/legacy/entrypoint.py +110 -0
- lightning_sdk/cli/{generate.py → legacy/generate.py} +1 -1
- lightning_sdk/cli/{inspection.py → legacy/inspection.py} +1 -1
- lightning_sdk/cli/{job_and_mmt_action.py → legacy/job_and_mmt_action.py} +6 -6
- lightning_sdk/cli/{jobs_menu.py → legacy/jobs_menu.py} +1 -1
- lightning_sdk/cli/{list.py → legacy/list.py} +12 -13
- lightning_sdk/cli/{mmts_menu.py → legacy/mmts_menu.py} +1 -1
- lightning_sdk/cli/{open.py → legacy/open.py} +4 -4
- lightning_sdk/cli/{start.py → legacy/start.py} +1 -0
- lightning_sdk/cli/{stop.py → legacy/stop.py} +1 -1
- lightning_sdk/cli/{switch.py → legacy/switch.py} +1 -0
- lightning_sdk/cli/{teamspace_menu.py → legacy/teamspace_menu.py} +1 -1
- lightning_sdk/cli/{upload.py → legacy/upload.py} +7 -8
- lightning_sdk/cli/license/__init__.py +14 -0
- lightning_sdk/cli/license/get.py +15 -0
- lightning_sdk/cli/license/list.py +45 -0
- lightning_sdk/cli/license/set.py +13 -0
- lightning_sdk/cli/mmt/__init__.py +7 -0
- lightning_sdk/cli/studio/__init__.py +24 -0
- lightning_sdk/cli/studio/connect.py +139 -0
- lightning_sdk/cli/studio/create.py +96 -0
- lightning_sdk/cli/studio/delete.py +49 -0
- lightning_sdk/cli/studio/list.py +85 -0
- lightning_sdk/cli/studio/ssh.py +64 -0
- lightning_sdk/cli/studio/start.py +115 -0
- lightning_sdk/cli/studio/stop.py +45 -0
- lightning_sdk/cli/studio/switch.py +66 -0
- lightning_sdk/cli/utils/__init__.py +7 -0
- lightning_sdk/cli/utils/cloud_account_map.py +10 -0
- lightning_sdk/cli/utils/get_base_studio.py +24 -0
- lightning_sdk/cli/utils/handle_machine_and_gpus_args.py +69 -0
- lightning_sdk/cli/utils/logging.py +122 -0
- lightning_sdk/cli/utils/owner_selection.py +110 -0
- lightning_sdk/cli/utils/resolve.py +28 -0
- lightning_sdk/cli/utils/richt_print.py +35 -0
- lightning_sdk/cli/utils/save_to_config.py +27 -0
- lightning_sdk/cli/utils/ssh_connection.py +59 -0
- lightning_sdk/cli/utils/studio_selection.py +113 -0
- lightning_sdk/cli/utils/teamspace_selection.py +125 -0
- lightning_sdk/cli/vm/__init__.py +20 -0
- lightning_sdk/cli/vm/create.py +33 -0
- lightning_sdk/cli/vm/delete.py +25 -0
- lightning_sdk/cli/vm/list.py +30 -0
- lightning_sdk/cli/vm/ssh.py +31 -0
- lightning_sdk/cli/vm/start.py +60 -0
- lightning_sdk/cli/vm/stop.py +25 -0
- lightning_sdk/cli/vm/switch.py +38 -0
- lightning_sdk/constants.py +1 -0
- lightning_sdk/deployment/__init__.py +2 -0
- lightning_sdk/deployment/deployment.py +17 -2
- lightning_sdk/helpers.py +56 -37
- lightning_sdk/job/base.py +21 -6
- lightning_sdk/job/job.py +13 -0
- lightning_sdk/job/v1.py +11 -0
- lightning_sdk/job/v2.py +12 -0
- lightning_sdk/lightning_cloud/login.py +320 -10
- lightning_sdk/lightning_cloud/openapi/__init__.py +113 -3
- lightning_sdk/lightning_cloud/openapi/api/__init__.py +3 -0
- lightning_sdk/lightning_cloud/openapi/api/assistants_service_api.py +713 -75
- lightning_sdk/lightning_cloud/openapi/api/auth_service_api.py +376 -0
- lightning_sdk/lightning_cloud/openapi/api/billing_service_api.py +191 -1
- lightning_sdk/lightning_cloud/openapi/api/cloud_space_environment_template_service_api.py +5 -1
- lightning_sdk/lightning_cloud/openapi/api/cloud_space_service_api.py +420 -0
- lightning_sdk/lightning_cloud/openapi/api/cloudy_service_api.py +0 -97
- lightning_sdk/lightning_cloud/openapi/api/cluster_service_api.py +420 -0
- lightning_sdk/lightning_cloud/openapi/api/data_connection_service_api.py +101 -0
- lightning_sdk/lightning_cloud/openapi/api/incidents_service_api.py +1058 -0
- lightning_sdk/lightning_cloud/openapi/api/jobs_service_api.py +121 -0
- lightning_sdk/lightning_cloud/openapi/api/k8_s_cluster_service_api.py +1742 -94
- lightning_sdk/lightning_cloud/openapi/api/markets_service_api.py +145 -0
- lightning_sdk/lightning_cloud/openapi/api/models_store_api.py +4 -4
- lightning_sdk/lightning_cloud/openapi/api/product_license_service_api.py +108 -108
- lightning_sdk/lightning_cloud/openapi/api/projects_service_api.py +105 -0
- lightning_sdk/lightning_cloud/openapi/api/schedules_service_api.py +347 -0
- lightning_sdk/lightning_cloud/openapi/api/sdk_command_history_service_api.py +141 -0
- lightning_sdk/lightning_cloud/openapi/api/storage_service_api.py +761 -1
- lightning_sdk/lightning_cloud/openapi/configuration.py +3 -19
- lightning_sdk/lightning_cloud/openapi/models/__init__.py +110 -3
- lightning_sdk/lightning_cloud/openapi/models/assistant_id_conversations_body.py +15 -15
- lightning_sdk/lightning_cloud/openapi/models/cloudspace_id_visibility_body.py +27 -1
- lightning_sdk/lightning_cloud/openapi/models/cluster_id_kubernetestemplates_body.py +201 -0
- lightning_sdk/lightning_cloud/openapi/models/cluster_id_metrics_body.py +131 -1
- lightning_sdk/lightning_cloud/openapi/models/create.py +27 -1
- lightning_sdk/lightning_cloud/openapi/models/create_machine_request_represents_the_request_to_create_a_machine.py +461 -0
- lightning_sdk/lightning_cloud/openapi/models/deployments_id_body.py +27 -1
- lightning_sdk/lightning_cloud/openapi/models/externalv1_cloud_space_instance_status.py +105 -1
- lightning_sdk/lightning_cloud/openapi/models/externalv1_user_status.py +27 -1
- lightning_sdk/lightning_cloud/openapi/models/id_codeconfig_body.py +3 -81
- lightning_sdk/lightning_cloud/openapi/models/id_fork_body1.py +27 -1
- lightning_sdk/lightning_cloud/openapi/models/id_render_body.py +123 -0
- lightning_sdk/lightning_cloud/openapi/models/id_sleepconfig_body.py +175 -0
- lightning_sdk/lightning_cloud/openapi/models/id_transfer_body.py +53 -1
- lightning_sdk/lightning_cloud/openapi/models/incident_id_messages_body.py +123 -0
- lightning_sdk/lightning_cloud/openapi/models/incidents_id_body.py +279 -0
- lightning_sdk/lightning_cloud/openapi/models/job_id_reportroutingtelemetry_body.py +123 -0
- lightning_sdk/lightning_cloud/openapi/models/kubernetestemplates_id_body.py +201 -0
- lightning_sdk/lightning_cloud/openapi/models/license_key_validate_body.py +123 -0
- lightning_sdk/lightning_cloud/openapi/models/message_id_actions_body.py +201 -0
- lightning_sdk/lightning_cloud/openapi/models/messages_message_id_body.py +123 -0
- lightning_sdk/lightning_cloud/openapi/models/metricsstream_create_body.py +27 -1
- lightning_sdk/lightning_cloud/openapi/models/models_model_id_body.py +109 -31
- lightning_sdk/lightning_cloud/openapi/models/models_model_id_body1.py +149 -0
- lightning_sdk/lightning_cloud/openapi/models/orgs_id_body.py +53 -1
- lightning_sdk/lightning_cloud/openapi/models/project_id_storage_body.py +27 -1
- lightning_sdk/lightning_cloud/openapi/models/project_id_storagetransfers_body.py +175 -0
- lightning_sdk/lightning_cloud/openapi/models/project_tab_management_messages.py +123 -0
- lightning_sdk/lightning_cloud/openapi/models/projects_id_body.py +79 -1
- lightning_sdk/lightning_cloud/openapi/models/storage_complete_body.py +41 -15
- lightning_sdk/lightning_cloud/openapi/models/storagetransfers_validate_body.py +149 -0
- lightning_sdk/lightning_cloud/openapi/models/update1.py +27 -1
- lightning_sdk/lightning_cloud/openapi/models/uploads_upload_id_body1.py +27 -1
- lightning_sdk/lightning_cloud/openapi/models/user_id_affiliatelinks_body.py +107 -3
- lightning_sdk/lightning_cloud/openapi/models/v1_abort_storage_transfer_response.py +97 -0
- lightning_sdk/lightning_cloud/openapi/models/v1_aggregated_pod_metrics.py +799 -0
- lightning_sdk/lightning_cloud/openapi/models/v1_ai_pod_v1.py +53 -1
- lightning_sdk/lightning_cloud/openapi/models/v1_assistant_session_daily_aggregated.py +27 -1
- lightning_sdk/lightning_cloud/openapi/models/v1_billing_tier.py +0 -1
- lightning_sdk/lightning_cloud/openapi/models/v1_cancel_running_cloud_space_instance_transfer_response.py +97 -0
- lightning_sdk/lightning_cloud/openapi/models/v1_cloud_provider.py +2 -0
- lightning_sdk/lightning_cloud/openapi/models/v1_cloud_space_environment_template_config.py +27 -1
- lightning_sdk/lightning_cloud/openapi/models/v1_cloud_space_specialized_view.py +1 -0
- lightning_sdk/lightning_cloud/openapi/models/v1_cloud_space_transfer_metadata.py +147 -17
- lightning_sdk/lightning_cloud/openapi/models/v1_cloudflare_v1.py +3 -29
- lightning_sdk/lightning_cloud/openapi/models/v1_cluster_accelerator.py +53 -1
- lightning_sdk/lightning_cloud/openapi/models/v1_cluster_capacity_reservation.py +27 -1
- lightning_sdk/lightning_cloud/openapi/models/v1_cluster_metrics.py +1527 -0
- lightning_sdk/lightning_cloud/openapi/models/v1_cluster_security_options.py +27 -1
- lightning_sdk/lightning_cloud/openapi/models/v1_cluster_spec.py +53 -1
- lightning_sdk/lightning_cloud/openapi/models/v1_cluster_type.py +1 -0
- lightning_sdk/lightning_cloud/openapi/models/v1_container_metrics.py +21 -21
- lightning_sdk/lightning_cloud/openapi/models/v1_create_incident_request.py +305 -0
- lightning_sdk/lightning_cloud/openapi/models/v1_create_license_request.py +175 -0
- lightning_sdk/lightning_cloud/openapi/models/v1_create_machine_response.py +123 -0
- lightning_sdk/lightning_cloud/openapi/models/v1_create_model_metrics_response.py +97 -0
- lightning_sdk/lightning_cloud/openapi/models/v1_create_project_request.py +79 -1
- lightning_sdk/lightning_cloud/openapi/models/v1_create_sdk_command_history_request.py +253 -0
- lightning_sdk/lightning_cloud/openapi/models/v1_create_sdk_command_history_response.py +97 -0
- lightning_sdk/lightning_cloud/openapi/models/v1_daily_model_metrics.py +149 -0
- lightning_sdk/lightning_cloud/openapi/models/v1_data_connection.py +53 -1
- lightning_sdk/lightning_cloud/openapi/models/v1_delete_incident_message_response.py +97 -0
- lightning_sdk/lightning_cloud/openapi/models/v1_delete_incident_response.py +97 -0
- lightning_sdk/lightning_cloud/openapi/models/v1_delete_kubernetes_template_response.py +97 -0
- lightning_sdk/lightning_cloud/openapi/models/v1_delete_license_response.py +97 -0
- lightning_sdk/lightning_cloud/openapi/models/v1_delete_machine_response.py +97 -0
- lightning_sdk/lightning_cloud/openapi/models/v1_deployment.py +27 -1
- lightning_sdk/lightning_cloud/openapi/models/v1_external_cluster_spec.py +53 -1
- lightning_sdk/lightning_cloud/openapi/models/v1_external_search_user.py +27 -1
- lightning_sdk/lightning_cloud/openapi/models/v1_filestore_data_connection.py +27 -1
- lightning_sdk/lightning_cloud/openapi/models/v1_filesystem_metric.py +201 -0
- lightning_sdk/lightning_cloud/openapi/models/v1_firewall_rule.py +175 -0
- lightning_sdk/lightning_cloud/openapi/models/v1_get_cloud_space_required_balance_status_response.py +149 -0
- lightning_sdk/lightning_cloud/openapi/models/v1_get_cloud_space_transfer_estimate_response.py +149 -0
- lightning_sdk/lightning_cloud/openapi/models/v1_get_latest_model_metrics_response.py +123 -0
- lightning_sdk/lightning_cloud/openapi/models/v1_get_machine_response.py +123 -0
- lightning_sdk/lightning_cloud/openapi/models/v1_get_market_pricing_response.py +201 -0
- lightning_sdk/lightning_cloud/openapi/models/v1_get_model_metrics_response.py +123 -0
- lightning_sdk/lightning_cloud/openapi/models/v1_get_temp_bucket_credentials_response.py +201 -0
- lightning_sdk/lightning_cloud/openapi/models/v1_get_user_response.py +41 -15
- lightning_sdk/lightning_cloud/openapi/models/v1_google_cloud_direct_v1.py +27 -1
- lightning_sdk/lightning_cloud/openapi/models/v1_group_node_metrics.py +1215 -0
- lightning_sdk/lightning_cloud/openapi/models/v1_group_pod_metrics.py +1241 -0
- lightning_sdk/lightning_cloud/openapi/models/v1_guest_login_request.py +177 -0
- lightning_sdk/lightning_cloud/openapi/models/v1_guest_login_response.py +149 -0
- lightning_sdk/lightning_cloud/openapi/models/v1_guest_user.py +201 -0
- lightning_sdk/lightning_cloud/openapi/models/v1_incident.py +565 -0
- lightning_sdk/lightning_cloud/openapi/models/v1_incident_detail.py +149 -0
- lightning_sdk/lightning_cloud/openapi/models/v1_incident_event.py +591 -0
- lightning_sdk/lightning_cloud/openapi/models/v1_incident_message.py +253 -0
- lightning_sdk/lightning_cloud/openapi/models/v1_incident_severity.py +105 -0
- lightning_sdk/lightning_cloud/openapi/models/v1_incident_type.py +108 -0
- lightning_sdk/lightning_cloud/openapi/models/v1_job.py +53 -1
- lightning_sdk/lightning_cloud/openapi/models/v1_job_spec.py +27 -1
- lightning_sdk/lightning_cloud/openapi/models/v1_k8s_incident_indexes.py +149 -0
- lightning_sdk/lightning_cloud/openapi/models/v1_kai_scheduler_queue_metrics.py +627 -0
- lightning_sdk/lightning_cloud/openapi/models/v1_kubernetes_aws_config.py +279 -0
- lightning_sdk/lightning_cloud/openapi/models/v1_kubernetes_direct_settings_v1.py +253 -0
- lightning_sdk/lightning_cloud/openapi/models/v1_kubernetes_direct_v1.py +107 -3
- lightning_sdk/lightning_cloud/openapi/models/v1_kubernetes_template.py +357 -0
- lightning_sdk/lightning_cloud/openapi/models/v1_kubernetes_template_property.py +227 -0
- lightning_sdk/lightning_cloud/openapi/models/v1_lambda_labs_direct_v1.py +29 -3
- lightning_sdk/lightning_cloud/openapi/models/v1_license.py +227 -0
- lightning_sdk/lightning_cloud/openapi/models/v1_lightning_elastic_cluster_v1.py +97 -0
- lightning_sdk/lightning_cloud/openapi/models/v1_list_aggregated_pod_metrics_response.py +123 -0
- lightning_sdk/lightning_cloud/openapi/models/v1_list_cluster_metric_timestamps_response.py +123 -0
- lightning_sdk/lightning_cloud/openapi/models/v1_list_cluster_metrics_response.py +123 -0
- lightning_sdk/lightning_cloud/openapi/models/v1_list_cluster_namespace_metrics_response.py +123 -0
- lightning_sdk/lightning_cloud/openapi/models/v1_list_cluster_namespace_user_metrics_response.py +123 -0
- lightning_sdk/lightning_cloud/openapi/models/v1_list_conversation_message_actions_response.py +123 -0
- lightning_sdk/lightning_cloud/openapi/models/v1_list_filesystem_metrics_response.py +123 -0
- lightning_sdk/lightning_cloud/openapi/models/v1_list_group_pod_metrics_response.py +123 -0
- lightning_sdk/lightning_cloud/openapi/models/v1_list_incident_events_response.py +123 -0
- lightning_sdk/lightning_cloud/openapi/models/v1_list_incident_messages_response.py +149 -0
- lightning_sdk/lightning_cloud/openapi/models/v1_list_incidents_response.py +149 -0
- lightning_sdk/lightning_cloud/openapi/models/v1_list_kai_scheduler_queues_metrics_response.py +123 -0
- lightning_sdk/lightning_cloud/openapi/models/v1_list_kubernetes_templates_response.py +123 -0
- lightning_sdk/lightning_cloud/openapi/models/{v1_list_product_licenses_response.py → v1_list_license_response.py} +16 -16
- lightning_sdk/lightning_cloud/openapi/models/v1_list_machines_response.py +149 -0
- lightning_sdk/lightning_cloud/openapi/models/v1_list_platform_notifications_response.py +123 -0
- lightning_sdk/lightning_cloud/openapi/models/v1_list_schedule_runs_response.py +123 -0
- lightning_sdk/lightning_cloud/openapi/models/v1_list_storage_transfers_response.py +123 -0
- lightning_sdk/lightning_cloud/openapi/models/v1_lustre_data_connection.py +149 -0
- lightning_sdk/lightning_cloud/openapi/models/v1_machine.py +617 -0
- lightning_sdk/lightning_cloud/openapi/models/v1_machine_direct_v1.py +123 -0
- lightning_sdk/lightning_cloud/openapi/models/v1_magic_link_login_request.py +1 -27
- lightning_sdk/lightning_cloud/openapi/models/v1_magic_link_login_response.py +27 -1
- lightning_sdk/lightning_cloud/openapi/models/v1_managed_model.py +29 -3
- lightning_sdk/lightning_cloud/openapi/models/v1_market_price.py +149 -0
- lightning_sdk/lightning_cloud/openapi/models/v1_membership.py +53 -1
- lightning_sdk/lightning_cloud/openapi/models/v1_message_action.py +279 -0
- lightning_sdk/lightning_cloud/openapi/models/v1_metrics_stream.py +27 -1
- lightning_sdk/lightning_cloud/openapi/models/v1_model_metrics.py +175 -0
- lightning_sdk/lightning_cloud/openapi/models/v1_namespace_metrics.py +591 -0
- lightning_sdk/lightning_cloud/openapi/models/v1_namespace_user_metrics.py +435 -0
- lightning_sdk/lightning_cloud/openapi/models/v1_nebius_direct_v1.py +29 -3
- lightning_sdk/lightning_cloud/openapi/models/v1_node_metrics.py +361 -23
- lightning_sdk/lightning_cloud/openapi/models/v1_notification_type.py +1 -0
- lightning_sdk/lightning_cloud/openapi/models/v1_organization.py +53 -1
- lightning_sdk/lightning_cloud/openapi/models/v1_pause_storage_transfer_response.py +97 -0
- lightning_sdk/lightning_cloud/openapi/models/v1_platform_notification.py +279 -0
- lightning_sdk/lightning_cloud/openapi/models/v1_pod_metrics.py +335 -23
- lightning_sdk/lightning_cloud/openapi/models/v1_project.py +27 -1
- lightning_sdk/lightning_cloud/openapi/models/v1_project_cluster_binding.py +27 -1
- lightning_sdk/lightning_cloud/openapi/models/v1_project_membership.py +53 -1
- lightning_sdk/lightning_cloud/openapi/models/v1_project_settings.py +53 -1
- lightning_sdk/lightning_cloud/openapi/models/v1_project_tab.py +149 -0
- lightning_sdk/lightning_cloud/openapi/models/{v1_product_license_check_response.py → v1_purchase_annual_upsell_request.py} +23 -23
- lightning_sdk/lightning_cloud/openapi/models/v1_purchase_annual_upsell_response.py +123 -0
- lightning_sdk/lightning_cloud/openapi/models/v1_quote_annual_upsell_response.py +227 -0
- lightning_sdk/lightning_cloud/openapi/models/v1_render_kubernetes_template_response.py +123 -0
- lightning_sdk/lightning_cloud/openapi/models/v1_report_deployment_routing_telemetry_response.py +97 -0
- lightning_sdk/lightning_cloud/openapi/models/v1_required_balance_reason.py +107 -0
- lightning_sdk/lightning_cloud/openapi/models/v1_reset_api_key_request.py +97 -0
- lightning_sdk/lightning_cloud/openapi/models/v1_reset_api_key_response.py +123 -0
- lightning_sdk/lightning_cloud/openapi/models/v1_resource_visibility.py +1 -27
- lightning_sdk/lightning_cloud/openapi/models/v1_resume_storage_transfer_response.py +97 -0
- lightning_sdk/lightning_cloud/openapi/models/v1_routing_telemetry.py +79 -1
- lightning_sdk/lightning_cloud/openapi/models/v1_rule_resource.py +1 -0
- lightning_sdk/lightning_cloud/openapi/models/v1_schedule_run.py +357 -0
- lightning_sdk/lightning_cloud/openapi/models/v1_sdk_command_history_severity.py +104 -0
- lightning_sdk/lightning_cloud/openapi/models/v1_sdk_command_history_type.py +104 -0
- lightning_sdk/lightning_cloud/openapi/models/v1_secret_type.py +1 -0
- lightning_sdk/lightning_cloud/openapi/models/v1_server_alert_type.py +1 -0
- lightning_sdk/lightning_cloud/openapi/models/v1_slack_notifier.py +201 -0
- lightning_sdk/lightning_cloud/openapi/models/v1_slack_notifier_type.py +105 -0
- lightning_sdk/lightning_cloud/openapi/models/v1_storage_asset.py +133 -3
- lightning_sdk/lightning_cloud/openapi/models/v1_storage_transfer.py +435 -0
- lightning_sdk/lightning_cloud/openapi/models/v1_storage_transfer_status.py +108 -0
- lightning_sdk/lightning_cloud/openapi/models/v1_token_login_request.py +123 -0
- lightning_sdk/lightning_cloud/openapi/models/v1_token_login_response.py +123 -0
- lightning_sdk/lightning_cloud/openapi/models/v1_token_owner_type.py +104 -0
- lightning_sdk/lightning_cloud/openapi/models/v1_update_cloud_space_instance_config_request.py +3 -81
- lightning_sdk/lightning_cloud/openapi/models/v1_update_project_tab_order_response.py +123 -0
- lightning_sdk/lightning_cloud/openapi/models/v1_update_user_request.py +41 -15
- lightning_sdk/lightning_cloud/openapi/models/v1_user_features.py +444 -600
- lightning_sdk/lightning_cloud/openapi/models/v1_validate_license_response.py +123 -0
- lightning_sdk/lightning_cloud/openapi/models/v1_validate_storage_transfer_response.py +123 -0
- lightning_sdk/lightning_cloud/openapi/models/v1_voltage_park_direct_v1.py +29 -3
- lightning_sdk/lightning_cloud/rest_client.py +48 -45
- lightning_sdk/lightning_cloud/utils/data_connection.py +51 -1
- lightning_sdk/llm/llm.py +175 -56
- lightning_sdk/llm/public_assistants.py +44 -7
- lightning_sdk/machine.py +21 -2
- lightning_sdk/mmt/base.py +7 -0
- lightning_sdk/mmt/mmt.py +11 -3
- lightning_sdk/mmt/v1.py +3 -1
- lightning_sdk/mmt/v2.py +4 -0
- lightning_sdk/owner.py +2 -1
- lightning_sdk/pipeline/steps.py +6 -0
- lightning_sdk/plugin.py +6 -1
- lightning_sdk/studio.py +294 -53
- lightning_sdk/teamspace.py +167 -7
- lightning_sdk/user.py +19 -1
- lightning_sdk/utils/config.py +179 -0
- lightning_sdk/utils/license.py +13 -0
- lightning_sdk/utils/logging.py +79 -0
- lightning_sdk/utils/names.py +1179 -0
- lightning_sdk/utils/progress.py +283 -0
- lightning_sdk/utils/resolve.py +82 -7
- {lightning_sdk-2025.8.6rc2.dist-info → lightning_sdk-2025.11.5.dist-info}/METADATA +2 -1
- {lightning_sdk-2025.8.6rc2.dist-info → lightning_sdk-2025.11.5.dist-info}/RECORD +328 -169
- {lightning_sdk-2025.8.6rc2.dist-info → lightning_sdk-2025.11.5.dist-info}/entry_points.txt +1 -0
- lightning_sdk/lightning_cloud/openapi/models/v1_product_license.py +0 -435
- lightning_sdk/services/license.py +0 -363
- /lightning_sdk/cli/{deploy → legacy}/__init__.py +0 -0
- /lightning_sdk/cli/{ai_hub.py → legacy/ai_hub.py} +0 -0
- /lightning_sdk/cli/{docker_cli.py → legacy/docker_cli.py} +0 -0
- /lightning_sdk/cli/{exceptions.py → legacy/exceptions.py} +0 -0
- /lightning_sdk/cli/{run.py → legacy/run.py} +0 -0
- /lightning_sdk/cli/{studios_menu.py → legacy/studios_menu.py} +0 -0
- /lightning_sdk/cli/{coloring.py → utils/coloring.py} +0 -0
- {lightning_sdk-2025.8.6rc2.dist-info → lightning_sdk-2025.11.5.dist-info}/LICENSE +0 -0
- {lightning_sdk-2025.8.6rc2.dist-info → lightning_sdk-2025.11.5.dist-info}/WHEEL +0 -0
- {lightning_sdk-2025.8.6rc2.dist-info → lightning_sdk-2025.11.5.dist-info}/top_level.txt +0 -0
|
@@ -5,7 +5,7 @@ import logging
|
|
|
5
5
|
import os
|
|
6
6
|
import pathlib
|
|
7
7
|
from dataclasses import dataclass
|
|
8
|
-
from typing import Optional
|
|
8
|
+
from typing import Optional, Literal
|
|
9
9
|
from urllib.parse import urlencode
|
|
10
10
|
|
|
11
11
|
import webbrowser
|
|
@@ -17,14 +17,26 @@ from starlette.background import BackgroundTask
|
|
|
17
17
|
from starlette.responses import RedirectResponse
|
|
18
18
|
|
|
19
19
|
from lightning_sdk.lightning_cloud import env
|
|
20
|
+
from lightning_sdk.lightning_cloud.openapi import ApiClient, Configuration
|
|
21
|
+
from lightning_sdk.lightning_cloud.openapi.api import \
|
|
22
|
+
AuthServiceApi
|
|
23
|
+
from lightning_sdk.lightning_cloud.openapi.models.v1_guest_login_request import \
|
|
24
|
+
V1GuestLoginRequest
|
|
25
|
+
from lightning_sdk.lightning_cloud.openapi.models.v1_token_login_request import \
|
|
26
|
+
V1TokenLoginRequest
|
|
27
|
+
from lightning_sdk.lightning_cloud.openapi.models.v1_refresh_request import \
|
|
28
|
+
V1RefreshRequest
|
|
20
29
|
|
|
21
30
|
logger = logging.getLogger(__name__)
|
|
22
31
|
|
|
32
|
+
# Authentication override types
|
|
33
|
+
AuthOverride = Literal["auth_token", "api_key", "guest"]
|
|
23
34
|
|
|
24
35
|
class Keys(Enum):
|
|
25
36
|
# USERNAME = "LIGHTNING_USERNAME"
|
|
26
37
|
USER_ID = "LIGHTNING_USER_ID"
|
|
27
38
|
API_KEY = "LIGHTNING_API_KEY"
|
|
39
|
+
AUTH_TOKEN = "LIGHTNING_AUTH_TOKEN"
|
|
28
40
|
|
|
29
41
|
@property
|
|
30
42
|
def suffix(self):
|
|
@@ -36,15 +48,18 @@ class Auth:
|
|
|
36
48
|
# username: Optional[str] = None
|
|
37
49
|
user_id: Optional[str] = None
|
|
38
50
|
api_key: Optional[str] = None
|
|
51
|
+
auth_token: Optional[str] = None
|
|
39
52
|
|
|
40
53
|
secrets_file = pathlib.Path(env.LIGHTNING_CREDENTIAL_PATH)
|
|
41
54
|
|
|
42
55
|
def __post_init__(self):
|
|
43
56
|
for key in Keys:
|
|
44
|
-
|
|
57
|
+
# Only set from environment if not already set
|
|
58
|
+
if getattr(self, key.suffix) is None:
|
|
59
|
+
setattr(self, key.suffix, os.environ.get(key.value, None))
|
|
45
60
|
|
|
46
61
|
# used by authenticate method
|
|
47
|
-
self._with_env_var = bool(self.api_key)
|
|
62
|
+
self._with_env_var = bool(self.api_key or self.auth_token)
|
|
48
63
|
|
|
49
64
|
def load(self) -> bool:
|
|
50
65
|
"""Load credentials from disk and update properties with credentials.
|
|
@@ -66,6 +81,7 @@ class Auth:
|
|
|
66
81
|
token: str = "",
|
|
67
82
|
user_id: str = "",
|
|
68
83
|
api_key: str = "",
|
|
84
|
+
auth_token: str = "",
|
|
69
85
|
# username: str = "",
|
|
70
86
|
) -> None:
|
|
71
87
|
"""save credentials to disk."""
|
|
@@ -76,6 +92,7 @@ class Auth:
|
|
|
76
92
|
# f"{Keys.USERNAME.suffix}": username,
|
|
77
93
|
f"{Keys.USER_ID.suffix}": user_id,
|
|
78
94
|
f"{Keys.API_KEY.suffix}": api_key,
|
|
95
|
+
f"{Keys.AUTH_TOKEN.suffix}": auth_token,
|
|
79
96
|
},
|
|
80
97
|
f,
|
|
81
98
|
)
|
|
@@ -83,6 +100,7 @@ class Auth:
|
|
|
83
100
|
# self.username = username
|
|
84
101
|
self.user_id = user_id
|
|
85
102
|
self.api_key = api_key
|
|
103
|
+
self.auth_token = auth_token
|
|
86
104
|
logger.debug("credentials saved successfully")
|
|
87
105
|
|
|
88
106
|
@classmethod
|
|
@@ -94,15 +112,78 @@ class Auth:
|
|
|
94
112
|
os.environ.pop(key.value, None)
|
|
95
113
|
logger.debug("credentials removed successfully")
|
|
96
114
|
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
115
|
+
def get_auth_header(self, override: Optional[AuthOverride] = None) -> Optional[str]:
|
|
116
|
+
"""Get authentication header with optional override.
|
|
117
|
+
|
|
118
|
+
By default, uses the automatic priority selection (auth_token > api_key).
|
|
119
|
+
You can override this for specific cases where you need a different auth method.
|
|
120
|
+
|
|
121
|
+
Parameters
|
|
122
|
+
----------
|
|
123
|
+
override : AuthOverride, optional
|
|
124
|
+
Override the default authentication method:
|
|
125
|
+
- "auth_token": Force use of JWT auth token (Bearer)
|
|
126
|
+
- "api_key": Force use of API key (Basic)
|
|
127
|
+
- "guest": Force use of guest credentials (Basic)
|
|
128
|
+
- None: Use automatic selection (default)
|
|
129
|
+
|
|
130
|
+
Returns
|
|
131
|
+
-------
|
|
132
|
+
Optional[str]
|
|
133
|
+
The authorization header for the specified method.
|
|
134
|
+
|
|
135
|
+
Raises
|
|
136
|
+
------
|
|
137
|
+
ValueError
|
|
138
|
+
If the specified override is not available or invalid.
|
|
139
|
+
"""
|
|
140
|
+
if override == "auth_token":
|
|
141
|
+
if not self.auth_token:
|
|
142
|
+
raise ValueError(
|
|
143
|
+
"Auth token override requested but no JWT token available. "
|
|
144
|
+
"Please use token_login() method first."
|
|
145
|
+
)
|
|
146
|
+
return f"Bearer {self.auth_token}"
|
|
147
|
+
|
|
148
|
+
elif override == "api_key":
|
|
149
|
+
if not self.api_key or not self.user_id:
|
|
150
|
+
raise ValueError(
|
|
151
|
+
"API key override requested but no API key or user ID available. "
|
|
152
|
+
"Please set LIGHTNING_API_KEY and LIGHTNING_USER_ID environment variables "
|
|
153
|
+
"or use authenticate() method."
|
|
154
|
+
)
|
|
155
|
+
token = f"{self.user_id}:{self.api_key}"
|
|
156
|
+
return f"Basic {base64.b64encode(token.encode('ascii')).decode('ascii')}" # noqa E501
|
|
157
|
+
|
|
158
|
+
elif override == "guest":
|
|
159
|
+
if not self.api_key or not self.user_id:
|
|
160
|
+
raise ValueError(
|
|
161
|
+
"Guest override requested but no guest credentials available. "
|
|
162
|
+
"Please call guest_login() method first."
|
|
163
|
+
)
|
|
101
164
|
token = f"{self.user_id}:{self.api_key}"
|
|
102
165
|
return f"Basic {base64.b64encode(token.encode('ascii')).decode('ascii')}" # noqa E501
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
166
|
+
|
|
167
|
+
elif override is None:
|
|
168
|
+
# Use the original automatic selection logic (default behavior)
|
|
169
|
+
if self.auth_token:
|
|
170
|
+
return f"Bearer {self.auth_token}"
|
|
171
|
+
elif self.api_key:
|
|
172
|
+
token = f"{self.user_id}:{self.api_key}"
|
|
173
|
+
return f"Basic {base64.b64encode(token.encode('ascii')).decode('ascii')}" # noqa E501
|
|
174
|
+
else:
|
|
175
|
+
raise ValueError(
|
|
176
|
+
"No authentication credentials available. Please authenticate first using "
|
|
177
|
+
"token_login(), guest_login(), or authenticate() methods."
|
|
178
|
+
)
|
|
179
|
+
|
|
180
|
+
else:
|
|
181
|
+
raise ValueError(f"Invalid authentication override: {override}")
|
|
182
|
+
|
|
183
|
+
@property
|
|
184
|
+
def auth_header(self) -> Optional[str]:
|
|
185
|
+
"""authentication header used by lightning-cloud client (automatic selection)."""
|
|
186
|
+
return self.get_auth_header()
|
|
106
187
|
|
|
107
188
|
def _run_server(self) -> None:
|
|
108
189
|
"""start a server to complete authentication."""
|
|
@@ -125,6 +206,8 @@ class Auth:
|
|
|
125
206
|
self._run_server()
|
|
126
207
|
return self.auth_header
|
|
127
208
|
|
|
209
|
+
elif self.auth_token:
|
|
210
|
+
return self.auth_header
|
|
128
211
|
elif self.user_id and self.api_key:
|
|
129
212
|
return self.auth_header
|
|
130
213
|
|
|
@@ -132,6 +215,233 @@ class Auth:
|
|
|
132
215
|
"We couldn't find any credentials linked to your account. Please try logging in using the CLI command `lightning login`"
|
|
133
216
|
)
|
|
134
217
|
|
|
218
|
+
def guest_login(self) -> Optional[str]:
|
|
219
|
+
"""Performs guest user authentication.
|
|
220
|
+
This method sends a request to the guest login endpoint to get temporary
|
|
221
|
+
credentials, saves them, and returns the authorization header.
|
|
222
|
+
Useful to log experiments as a non signed in user, using a guest account
|
|
223
|
+
in the background.
|
|
224
|
+
Returns
|
|
225
|
+
-------
|
|
226
|
+
Optional[str]
|
|
227
|
+
The authorization header to use for subsequent requests.
|
|
228
|
+
Raises
|
|
229
|
+
------
|
|
230
|
+
RuntimeError
|
|
231
|
+
If the guest login request fails.
|
|
232
|
+
ValueError
|
|
233
|
+
If the response from the server is invalid.
|
|
234
|
+
"""
|
|
235
|
+
|
|
236
|
+
config = Configuration()
|
|
237
|
+
config.host = env.LIGHTNING_CLOUD_URL
|
|
238
|
+
api_client = ApiClient(configuration=config)
|
|
239
|
+
auth_api = AuthServiceApi(api_client)
|
|
240
|
+
|
|
241
|
+
logger.debug(f"Attempting guest login to {config.host}")
|
|
242
|
+
|
|
243
|
+
try:
|
|
244
|
+
# The body is an empty object for a guest login.
|
|
245
|
+
body = V1GuestLoginRequest()
|
|
246
|
+
credentials = auth_api.auth_service_guest_login(body)
|
|
247
|
+
|
|
248
|
+
except requests.RequestException as e:
|
|
249
|
+
logger.error(f"Guest login request failed: {e}")
|
|
250
|
+
raise RuntimeError(
|
|
251
|
+
"Failed to connect to the guest login endpoint. "
|
|
252
|
+
"Please check your network connection and the server status."
|
|
253
|
+
) from e
|
|
254
|
+
|
|
255
|
+
# attributes based on the `V1GuestLoginResponse` model.
|
|
256
|
+
user = getattr(credentials, "user", None)
|
|
257
|
+
user_id = getattr(user, "id", None) if user else None
|
|
258
|
+
api_key = getattr(user, "api_key", None) if user else None
|
|
259
|
+
|
|
260
|
+
if not all([user_id, api_key]):
|
|
261
|
+
logger.error(
|
|
262
|
+
f"Incomplete credentials received from guest login: {credentials}"
|
|
263
|
+
)
|
|
264
|
+
raise ValueError(
|
|
265
|
+
"The guest login response did not contain the required 'user_id' and 'api_key' fields."
|
|
266
|
+
)
|
|
267
|
+
|
|
268
|
+
self.save(user_id=user_id, api_key=api_key)
|
|
269
|
+
logger.info("Successfully authenticated as a guest user.")
|
|
270
|
+
|
|
271
|
+
return self.auth_header
|
|
272
|
+
|
|
273
|
+
def token_login(self, token_key: str, save_token: bool = True) -> Optional[str]:
|
|
274
|
+
"""Performs token-based authentication.
|
|
275
|
+
|
|
276
|
+
This method sends a request to the token login endpoint to authenticate
|
|
277
|
+
using an auth token key, optionally saves the returned JWT token, and
|
|
278
|
+
returns the authorization header.
|
|
279
|
+
|
|
280
|
+
Parameters
|
|
281
|
+
----------
|
|
282
|
+
token_key : str
|
|
283
|
+
The auth token key to use for authentication.
|
|
284
|
+
save_token : bool, optional
|
|
285
|
+
Whether to save the JWT token for future use. Defaults to True.
|
|
286
|
+
If False, the token is only used for the current session.
|
|
287
|
+
|
|
288
|
+
Returns
|
|
289
|
+
-------
|
|
290
|
+
Optional[str]
|
|
291
|
+
The authorization header to use for subsequent requests.
|
|
292
|
+
|
|
293
|
+
Raises
|
|
294
|
+
------
|
|
295
|
+
RuntimeError
|
|
296
|
+
If the token login request fails.
|
|
297
|
+
ValueError
|
|
298
|
+
If the response from the server is invalid.
|
|
299
|
+
"""
|
|
300
|
+
config = Configuration()
|
|
301
|
+
config.host = env.LIGHTNING_CLOUD_URL
|
|
302
|
+
api_client = ApiClient(configuration=config)
|
|
303
|
+
auth_api = AuthServiceApi(api_client)
|
|
304
|
+
|
|
305
|
+
logger.debug(f"Attempting token login to {config.host}")
|
|
306
|
+
|
|
307
|
+
try:
|
|
308
|
+
body = V1TokenLoginRequest(token_key=token_key)
|
|
309
|
+
response = auth_api.auth_service_token_login(body)
|
|
310
|
+
|
|
311
|
+
except requests.RequestException as e:
|
|
312
|
+
logger.error(f"Token login request failed: {e}")
|
|
313
|
+
raise RuntimeError(
|
|
314
|
+
"Failed to connect to the token login endpoint. "
|
|
315
|
+
"Please check your network connection and the server status."
|
|
316
|
+
) from e
|
|
317
|
+
|
|
318
|
+
# Extract the JWT token from the response
|
|
319
|
+
jwt_token = getattr(response, "token", None)
|
|
320
|
+
|
|
321
|
+
if not jwt_token:
|
|
322
|
+
logger.error(
|
|
323
|
+
f"No token received from token login response: {response}"
|
|
324
|
+
)
|
|
325
|
+
raise ValueError(
|
|
326
|
+
"The token login response did not contain a valid JWT token."
|
|
327
|
+
)
|
|
328
|
+
|
|
329
|
+
# Set the JWT token in memory
|
|
330
|
+
self.auth_token = jwt_token
|
|
331
|
+
|
|
332
|
+
# Optionally save the JWT token to disk
|
|
333
|
+
if save_token:
|
|
334
|
+
self.save(auth_token=jwt_token)
|
|
335
|
+
logger.info("Successfully authenticated using auth token and saved to disk.")
|
|
336
|
+
else:
|
|
337
|
+
logger.info("Successfully authenticated using auth token (not saved to disk).")
|
|
338
|
+
|
|
339
|
+
return self.auth_header
|
|
340
|
+
|
|
341
|
+
def refresh_token(self, duration: int = 43200) -> Optional[str]:
|
|
342
|
+
"""Refreshes the current JWT token.
|
|
343
|
+
|
|
344
|
+
This method sends a request to the refresh endpoint to get a new JWT token
|
|
345
|
+
with the specified duration, saves the new token, and returns the updated
|
|
346
|
+
authorization header.
|
|
347
|
+
|
|
348
|
+
Parameters
|
|
349
|
+
----------
|
|
350
|
+
duration : int, optional
|
|
351
|
+
Duration in seconds for the new token. Can range from 900 seconds (15 minutes)
|
|
352
|
+
up to a maximum of 129,600 seconds (36 hours), with a default of 43,200 seconds (12 hours).
|
|
353
|
+
|
|
354
|
+
Returns
|
|
355
|
+
-------
|
|
356
|
+
Optional[str]
|
|
357
|
+
The updated authorization header with the new JWT token.
|
|
358
|
+
|
|
359
|
+
Raises
|
|
360
|
+
------
|
|
361
|
+
RuntimeError
|
|
362
|
+
If the refresh request fails.
|
|
363
|
+
ValueError
|
|
364
|
+
If no valid JWT token is available to refresh, or if the response is invalid.
|
|
365
|
+
"""
|
|
366
|
+
if not self.auth_token:
|
|
367
|
+
raise ValueError(
|
|
368
|
+
"No JWT token available to refresh. Please authenticate first using "
|
|
369
|
+
"token_login() or authenticate() methods."
|
|
370
|
+
)
|
|
371
|
+
|
|
372
|
+
config = Configuration()
|
|
373
|
+
config.host = env.LIGHTNING_CLOUD_URL
|
|
374
|
+
# Set the current auth token as the authorization header
|
|
375
|
+
config.api_key_prefix['Authorization'] = 'Bearer'
|
|
376
|
+
config.api_key['Authorization'] = self.auth_token
|
|
377
|
+
|
|
378
|
+
api_client = ApiClient(configuration=config)
|
|
379
|
+
auth_api = AuthServiceApi(api_client)
|
|
380
|
+
|
|
381
|
+
logger.debug(f"Attempting to refresh JWT token with duration {duration} seconds")
|
|
382
|
+
|
|
383
|
+
try:
|
|
384
|
+
body = V1RefreshRequest(duration=str(duration))
|
|
385
|
+
response = auth_api.auth_service_refresh(body)
|
|
386
|
+
|
|
387
|
+
except requests.RequestException as e:
|
|
388
|
+
logger.error(f"Token refresh request failed: {e}")
|
|
389
|
+
raise RuntimeError(
|
|
390
|
+
"Failed to connect to the refresh endpoint. "
|
|
391
|
+
"Please check your network connection and the server status."
|
|
392
|
+
) from e
|
|
393
|
+
|
|
394
|
+
# Extract the new JWT token from the response
|
|
395
|
+
new_jwt_token = getattr(response, "token", None)
|
|
396
|
+
|
|
397
|
+
if not new_jwt_token:
|
|
398
|
+
logger.error(
|
|
399
|
+
f"No token received from refresh response: {response}"
|
|
400
|
+
)
|
|
401
|
+
raise ValueError(
|
|
402
|
+
"The refresh response did not contain a valid JWT token."
|
|
403
|
+
)
|
|
404
|
+
|
|
405
|
+
# Save the new JWT token
|
|
406
|
+
self.save(auth_token=new_jwt_token)
|
|
407
|
+
logger.info("Successfully refreshed JWT token.")
|
|
408
|
+
|
|
409
|
+
return self.auth_header
|
|
410
|
+
|
|
411
|
+
def create_api_client(self, override: Optional[AuthOverride] = None) -> 'ApiClient':
|
|
412
|
+
"""Create an API client with optional authentication override.
|
|
413
|
+
|
|
414
|
+
This is a convenience method for creating API clients that use a specific
|
|
415
|
+
authentication method instead of the default automatic selection.
|
|
416
|
+
|
|
417
|
+
Parameters
|
|
418
|
+
----------
|
|
419
|
+
override : AuthOverride, optional
|
|
420
|
+
Override the default authentication method for this API client.
|
|
421
|
+
See get_auth_header() for available options.
|
|
422
|
+
|
|
423
|
+
Returns
|
|
424
|
+
-------
|
|
425
|
+
ApiClient
|
|
426
|
+
Configured API client with the specified authentication method.
|
|
427
|
+
"""
|
|
428
|
+
from lightning_sdk.lightning_cloud.openapi import ApiClient, Configuration
|
|
429
|
+
|
|
430
|
+
config = Configuration()
|
|
431
|
+
config.host = env.LIGHTNING_CLOUD_URL
|
|
432
|
+
|
|
433
|
+
# Get the auth header for the specified override
|
|
434
|
+
auth_header = self.get_auth_header(override)
|
|
435
|
+
|
|
436
|
+
# Create the API client
|
|
437
|
+
client = ApiClient(configuration=config)
|
|
438
|
+
|
|
439
|
+
# Set the Authorization header directly in default_headers
|
|
440
|
+
if auth_header:
|
|
441
|
+
client.set_default_header('Authorization', auth_header)
|
|
442
|
+
|
|
443
|
+
return client
|
|
444
|
+
|
|
135
445
|
|
|
136
446
|
class AuthServer:
|
|
137
447
|
|