ory-client 1.12.2__py3-none-any.whl → 1.17.1__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.
- ory_client/__init__.py +16 -3
- ory_client/api/courier_api.py +21 -15
- ory_client/api/events_api.py +38 -26
- ory_client/api/frontend_api.py +1741 -1064
- ory_client/api/identity_api.py +197 -126
- ory_client/api/jwk_api.py +65 -44
- ory_client/api/metadata_api.py +11 -8
- ory_client/api/o_auth2_api.py +292 -191
- ory_client/api/oidc_api.py +68 -45
- ory_client/api/permission_api.py +343 -32
- ory_client/api/project_api.py +516 -145
- ory_client/api/relationship_api.py +56 -38
- ory_client/api/wellknown_api.py +14 -11
- ory_client/api/workspace_api.py +886 -34
- ory_client/api_client.py +71 -32
- ory_client/configuration.py +176 -42
- ory_client/exceptions.py +19 -2
- ory_client/models/__init__.py +15 -2
- ory_client/models/accept_o_auth2_consent_request.py +2 -2
- ory_client/models/accept_o_auth2_consent_request_session.py +2 -2
- ory_client/models/accept_o_auth2_login_request.py +2 -2
- ory_client/models/account_experience_colors.py +329 -0
- ory_client/models/account_experience_configuration.py +35 -13
- ory_client/models/account_experience_theme_variables.py +2 -2
- ory_client/models/active_project_in_console.py +2 -2
- ory_client/models/add_project_to_workspace_body.py +2 -2
- ory_client/models/attribute.py +2 -2
- ory_client/models/attribute_filter.py +2 -2
- ory_client/models/attributes_count_datapoint.py +2 -2
- ory_client/models/authenticator_assurance_level.py +2 -2
- ory_client/models/batch_check_permission_body.py +109 -0
- ory_client/models/batch_check_permission_result.py +109 -0
- ory_client/models/batch_patch_identities_response.py +5 -5
- ory_client/models/billing_period_bucket.py +5 -5
- ory_client/models/check_opl_syntax_result.py +5 -5
- ory_client/models/check_permission_result.py +2 -2
- ory_client/models/check_permission_result_with_error.py +103 -0
- ory_client/models/cloud_account.py +6 -4
- ory_client/models/consistency_request_parameters.py +2 -2
- ory_client/models/continue_with.py +35 -11
- ory_client/models/continue_with_recovery_ui.py +2 -2
- ory_client/models/continue_with_recovery_ui_flow.py +3 -3
- ory_client/models/continue_with_redirect_browser_to.py +110 -0
- ory_client/models/continue_with_set_ory_session_token.py +2 -2
- ory_client/models/continue_with_settings_ui.py +2 -2
- ory_client/models/continue_with_settings_ui_flow.py +7 -5
- ory_client/models/continue_with_verification_ui.py +2 -2
- ory_client/models/continue_with_verification_ui_flow.py +3 -3
- ory_client/models/courier_message_status.py +2 -2
- ory_client/models/courier_message_type.py +2 -2
- ory_client/models/create_custom_domain_body.py +2 -2
- ory_client/models/create_event_stream_body.py +2 -2
- ory_client/models/create_fedcm_flow_response.py +111 -0
- ory_client/models/create_identity_body.py +16 -9
- ory_client/models/create_invite_response.py +5 -5
- ory_client/models/create_json_web_key_set.py +2 -2
- ory_client/models/create_project_api_key_request.py +7 -4
- ory_client/models/create_project_body.py +5 -5
- ory_client/models/create_project_branding.py +2 -2
- ory_client/models/create_project_member_invite_body.py +2 -2
- ory_client/models/create_project_normalized_payload.py +60 -24
- ory_client/models/create_recovery_code_for_identity_body.py +2 -2
- ory_client/models/create_recovery_link_for_identity_body.py +2 -2
- ory_client/models/create_relationship_body.py +2 -2
- ory_client/models/create_subscription_body.py +2 -2
- ory_client/models/create_subscription_common.py +2 -2
- ory_client/models/create_verifiable_credential_request_body.py +2 -2
- ory_client/models/create_workspace_api_key_body.py +104 -0
- ory_client/models/create_workspace_body.py +2 -2
- ory_client/models/create_workspace_member_invite_body.py +16 -7
- ory_client/models/create_workspace_subscription_body.py +2 -2
- ory_client/models/credential_supported_draft00.py +2 -2
- ory_client/models/custom_domain.py +2 -2
- ory_client/models/delete_my_sessions_count.py +2 -2
- ory_client/models/email_template_data.py +2 -2
- ory_client/models/email_template_data_body.py +2 -2
- ory_client/models/error_authenticator_assurance_level_not_satisfied.py +2 -2
- ory_client/models/error_browser_location_change_required.py +2 -2
- ory_client/models/error_flow_replaced.py +2 -2
- ory_client/models/error_generic.py +2 -2
- ory_client/models/error_o_auth2.py +2 -2
- ory_client/models/event_stream.py +2 -2
- ory_client/models/expanded_permission_tree.py +5 -5
- ory_client/models/flow_error.py +2 -2
- ory_client/models/generic_error.py +2 -2
- ory_client/models/generic_error_content.py +2 -2
- ory_client/models/generic_usage.py +2 -2
- ory_client/models/get_attributes_count_response.py +5 -5
- ory_client/models/get_managed_identity_schema_location.py +2 -2
- ory_client/models/get_metrics_event_attributes_response.py +2 -2
- ory_client/models/get_metrics_event_types_response.py +2 -2
- ory_client/models/get_organization_response.py +2 -2
- ory_client/models/get_project_events_body.py +5 -5
- ory_client/models/get_project_events_response.py +5 -5
- ory_client/models/get_project_metrics_response.py +5 -5
- ory_client/models/get_session_activity_response.py +5 -5
- ory_client/models/get_version200_response.py +2 -2
- ory_client/models/health_not_ready_status.py +2 -2
- ory_client/models/health_status.py +2 -2
- ory_client/models/identity.py +11 -11
- ory_client/models/identity_credentials.py +5 -5
- ory_client/models/identity_credentials_code.py +14 -14
- ory_client/models/identity_credentials_code_address.py +103 -0
- ory_client/models/identity_credentials_oidc.py +5 -5
- ory_client/models/identity_credentials_oidc_provider.py +7 -5
- ory_client/models/identity_credentials_password.py +7 -5
- ory_client/models/identity_patch.py +2 -2
- ory_client/models/identity_patch_response.py +13 -6
- ory_client/models/identity_schema_container.py +2 -2
- ory_client/models/identity_schema_preset.py +2 -2
- ory_client/models/identity_with_credentials.py +2 -2
- ory_client/models/identity_with_credentials_oidc.py +2 -2
- ory_client/models/identity_with_credentials_oidc_config.py +5 -5
- ory_client/models/identity_with_credentials_oidc_config_provider.py +8 -6
- ory_client/models/identity_with_credentials_password.py +2 -2
- ory_client/models/identity_with_credentials_password_config.py +7 -5
- ory_client/models/internal_get_project_branding_body.py +2 -2
- ory_client/models/internal_is_ax_welcome_screen_enabled_for_project_body.py +2 -2
- ory_client/models/internal_is_owner_for_project_by_slug_body.py +3 -3
- ory_client/models/internal_is_owner_for_project_by_slug_response.py +2 -2
- ory_client/models/introspected_o_auth2_token.py +2 -2
- ory_client/models/invite_token_body.py +101 -0
- ory_client/models/invoice.py +3 -3
- ory_client/models/invoice_data_v1.py +12 -8
- ory_client/models/is_owner_for_project_by_slug.py +3 -3
- ory_client/models/json_patch.py +2 -2
- ory_client/models/json_web_key.py +2 -2
- ory_client/models/json_web_key_set.py +5 -5
- ory_client/models/keto_namespace.py +2 -2
- ory_client/models/line_item_v1.py +5 -5
- ory_client/models/list_event_streams.py +5 -5
- ory_client/models/list_invoices_response.py +5 -5
- ory_client/models/list_organizations_response.py +5 -5
- ory_client/models/list_workspace_projects.py +5 -5
- ory_client/models/list_workspaces.py +5 -5
- ory_client/models/login_flow.py +5 -5
- ory_client/models/login_flow_state.py +3 -3
- ory_client/models/logout_flow.py +2 -2
- ory_client/models/managed_identity_schema.py +2 -2
- ory_client/models/managed_identity_schema_validation_result.py +2 -2
- ory_client/models/member_invite.py +10 -3
- ory_client/models/message.py +5 -5
- ory_client/models/message_dispatch.py +2 -2
- ory_client/models/metrics_datapoint.py +2 -2
- ory_client/models/money.py +2 -2
- ory_client/models/namespace.py +2 -2
- ory_client/models/needs_privileged_session_error.py +2 -2
- ory_client/models/normalized_project.py +5 -5
- ory_client/models/normalized_project_revision.py +57 -21
- ory_client/models/normalized_project_revision_courier_channel.py +2 -2
- ory_client/models/normalized_project_revision_hook.py +2 -2
- ory_client/models/normalized_project_revision_identity_schema.py +2 -2
- ory_client/models/normalized_project_revision_saml_provider.py +148 -0
- ory_client/models/normalized_project_revision_third_party_provider.py +34 -3
- ory_client/models/normalized_project_revision_tokenizer_template.py +2 -2
- ory_client/models/o_auth2_client.py +3 -3
- ory_client/models/o_auth2_client_token_lifespans.py +2 -2
- ory_client/models/o_auth2_consent_request.py +6 -4
- ory_client/models/o_auth2_consent_request_open_id_connect_context.py +2 -2
- ory_client/models/o_auth2_consent_session.py +5 -3
- ory_client/models/o_auth2_consent_session_expires_at.py +2 -2
- ory_client/models/o_auth2_login_request.py +3 -3
- ory_client/models/o_auth2_logout_request.py +9 -4
- ory_client/models/o_auth2_redirect_to.py +2 -2
- ory_client/models/o_auth2_token_exchange.py +2 -2
- ory_client/models/oidc_configuration.py +5 -5
- ory_client/models/oidc_user_info.py +2 -2
- ory_client/models/organization.py +2 -2
- ory_client/models/organization_body.py +2 -2
- ory_client/models/pagination.py +2 -2
- ory_client/models/pagination_headers.py +2 -2
- ory_client/models/parse_error.py +2 -2
- ory_client/models/patch_identities_body.py +5 -5
- ory_client/models/perform_native_logout_body.py +2 -2
- ory_client/models/permissions_on_workspace.py +2 -2
- ory_client/models/plan.py +2 -2
- ory_client/models/plan_details.py +5 -5
- ory_client/models/post_check_permission_body.py +2 -2
- ory_client/models/post_check_permission_or_error_body.py +2 -2
- ory_client/models/project.py +5 -5
- ory_client/models/project_api_key.py +5 -3
- ory_client/models/project_branding.py +5 -5
- ory_client/models/project_branding_colors.py +2 -2
- ory_client/models/project_branding_theme.py +5 -5
- ory_client/models/project_cors.py +2 -2
- ory_client/models/project_events_datapoint.py +5 -5
- ory_client/models/project_host.py +2 -2
- ory_client/models/project_member.py +6 -4
- ory_client/models/project_metadata.py +5 -5
- ory_client/models/project_service_identity.py +2 -2
- ory_client/models/project_service_o_auth2.py +2 -2
- ory_client/models/project_service_permission.py +2 -2
- ory_client/models/project_services.py +2 -2
- ory_client/models/provider.py +113 -0
- ory_client/models/quota_usage.py +8 -6
- ory_client/models/recovery_code_for_identity.py +2 -2
- ory_client/models/recovery_flow.py +5 -5
- ory_client/models/recovery_flow_state.py +3 -3
- ory_client/models/recovery_identity_address.py +2 -2
- ory_client/models/recovery_link_for_identity.py +2 -2
- ory_client/models/registration_flow.py +5 -5
- ory_client/models/registration_flow_state.py +3 -3
- ory_client/models/reject_o_auth2_request.py +2 -2
- ory_client/models/relation_query.py +2 -2
- ory_client/models/relationship.py +2 -2
- ory_client/models/relationship_namespaces.py +5 -5
- ory_client/models/relationship_patch.py +2 -2
- ory_client/models/relationships.py +5 -5
- ory_client/models/rfc6749_error_json.py +2 -2
- ory_client/models/schema_patch.py +2 -2
- ory_client/models/self_service_flow_expired_error.py +2 -2
- ory_client/models/session.py +8 -8
- ory_client/models/session_activity_datapoint.py +2 -2
- ory_client/models/session_authentication_method.py +2 -2
- ory_client/models/session_device.py +2 -2
- ory_client/models/set_active_project_in_console_body.py +2 -2
- ory_client/models/set_custom_domain_body.py +2 -2
- ory_client/models/set_event_stream_body.py +2 -2
- ory_client/models/set_project.py +2 -2
- ory_client/models/set_project_branding_theme_body.py +2 -2
- ory_client/models/settings_flow.py +5 -5
- ory_client/models/settings_flow_state.py +3 -3
- ory_client/models/source_position.py +2 -2
- ory_client/models/subject_set.py +2 -2
- ory_client/models/subscription.py +2 -2
- ory_client/models/successful_code_exchange_response.py +2 -2
- ory_client/models/successful_native_login.py +5 -5
- ory_client/models/successful_native_registration.py +5 -5
- ory_client/models/successful_project_update.py +5 -5
- ory_client/models/tax_line_item.py +2 -2
- ory_client/models/time_interval.py +2 -2
- ory_client/models/token_pagination.py +2 -2
- ory_client/models/token_pagination_headers.py +2 -2
- ory_client/models/token_pagination_request_parameters.py +2 -2
- ory_client/models/token_pagination_response_headers.py +2 -2
- ory_client/models/trust_o_auth2_jwt_grant_issuer.py +2 -2
- ory_client/models/trusted_o_auth2_jwt_grant_issuer.py +2 -2
- ory_client/models/trusted_o_auth2_jwt_grant_json_web_key.py +2 -2
- ory_client/models/ui_container.py +8 -8
- ory_client/models/ui_node.py +8 -8
- ory_client/models/ui_node_anchor_attributes.py +2 -2
- ory_client/models/ui_node_attributes.py +4 -4
- ory_client/models/ui_node_image_attributes.py +2 -2
- ory_client/models/ui_node_input_attributes.py +32 -6
- ory_client/models/ui_node_meta.py +2 -2
- ory_client/models/ui_node_script_attributes.py +2 -2
- ory_client/models/ui_node_text_attributes.py +2 -2
- ory_client/models/ui_text.py +2 -2
- ory_client/models/update_fedcm_flow_body.py +105 -0
- ory_client/models/update_identity_body.py +2 -2
- ory_client/models/update_login_flow_body.py +35 -11
- ory_client/models/update_login_flow_with_code_method.py +5 -3
- ory_client/models/update_login_flow_with_identifier_first_method.py +107 -0
- ory_client/models/update_login_flow_with_lookup_secret_method.py +2 -2
- ory_client/models/update_login_flow_with_oidc_method.py +3 -3
- ory_client/models/update_login_flow_with_passkey_method.py +2 -2
- ory_client/models/update_login_flow_with_password_method.py +2 -2
- ory_client/models/update_login_flow_with_totp_method.py +2 -2
- ory_client/models/update_login_flow_with_web_authn_method.py +2 -2
- ory_client/models/update_recovery_flow_body.py +4 -4
- ory_client/models/update_recovery_flow_with_code_method.py +2 -2
- ory_client/models/update_recovery_flow_with_link_method.py +2 -2
- ory_client/models/update_registration_flow_body.py +36 -12
- ory_client/models/update_registration_flow_with_code_method.py +2 -2
- ory_client/models/update_registration_flow_with_oidc_method.py +3 -3
- ory_client/models/update_registration_flow_with_passkey_method.py +2 -2
- ory_client/models/update_registration_flow_with_password_method.py +2 -2
- ory_client/models/update_registration_flow_with_profile_method.py +14 -4
- ory_client/models/update_registration_flow_with_web_authn_method.py +2 -2
- ory_client/models/update_settings_flow_body.py +4 -4
- ory_client/models/update_settings_flow_with_lookup_method.py +2 -2
- ory_client/models/update_settings_flow_with_oidc_method.py +2 -2
- ory_client/models/update_settings_flow_with_passkey_method.py +2 -2
- ory_client/models/update_settings_flow_with_password_method.py +2 -2
- ory_client/models/update_settings_flow_with_profile_method.py +2 -2
- ory_client/models/update_settings_flow_with_totp_method.py +2 -2
- ory_client/models/update_settings_flow_with_web_authn_method.py +2 -2
- ory_client/models/update_subscription_body.py +2 -2
- ory_client/models/update_verification_flow_body.py +4 -4
- ory_client/models/update_verification_flow_with_code_method.py +2 -2
- ory_client/models/update_verification_flow_with_link_method.py +2 -2
- ory_client/models/update_workspace_body.py +2 -2
- ory_client/models/usage.py +2 -2
- ory_client/models/verifiable_credential_priming_response.py +2 -2
- ory_client/models/verifiable_credential_proof.py +2 -2
- ory_client/models/verifiable_credential_response.py +2 -2
- ory_client/models/verifiable_identity_address.py +2 -2
- ory_client/models/verification_flow.py +2 -2
- ory_client/models/verification_flow_state.py +3 -3
- ory_client/models/version.py +2 -2
- ory_client/models/warning.py +2 -2
- ory_client/models/workspace.py +2 -2
- ory_client/models/workspace_api_key.py +6 -4
- ory_client/rest.py +5 -3
- ory_client-1.17.1.dist-info/METADATA +18 -0
- ory_client-1.17.1.dist-info/RECORD +302 -0
- {ory_client-1.12.2.dist-info → ory_client-1.17.1.dist-info}/WHEEL +1 -1
- ory_client-1.12.2.dist-info/METADATA +0 -19
- ory_client-1.12.2.dist-info/RECORD +0 -289
- {ory_client-1.12.2.dist-info → ory_client-1.17.1.dist-info}/LICENSE +0 -0
- {ory_client-1.12.2.dist-info → ory_client-1.17.1.dist-info}/top_level.txt +0 -0
ory_client/api_client.py
CHANGED
@@ -3,9 +3,9 @@
|
|
3
3
|
"""
|
4
4
|
Ory APIs
|
5
5
|
|
6
|
-
Documentation for all public and administrative Ory APIs. Administrative APIs can only be accessed with a valid Personal Access Token. Public APIs are mostly used in browsers.
|
6
|
+
# Introduction Documentation for all public and administrative Ory APIs. Administrative APIs can only be accessed with a valid Personal Access Token. Public APIs are mostly used in browsers. ## SDKs This document describes the APIs available in the Ory Network. The APIs are available as SDKs for the following languages: | Language | Download SDK | Documentation | | -------------- | ---------------------------------------------------------------- | ------------------------------------------------------------------------------------ | | Dart | [pub.dev](https://pub.dev/packages/ory_client) | [README](https://github.com/ory/sdk/blob/master/clients/client/dart/README.md) | | .NET | [nuget.org](https://www.nuget.org/packages/Ory.Client/) | [README](https://github.com/ory/sdk/blob/master/clients/client/dotnet/README.md) | | Elixir | [hex.pm](https://hex.pm/packages/ory_client) | [README](https://github.com/ory/sdk/blob/master/clients/client/elixir/README.md) | | Go | [github.com](https://github.com/ory/client-go) | [README](https://github.com/ory/sdk/blob/master/clients/client/go/README.md) | | Java | [maven.org](https://search.maven.org/artifact/sh.ory/ory-client) | [README](https://github.com/ory/sdk/blob/master/clients/client/java/README.md) | | JavaScript | [npmjs.com](https://www.npmjs.com/package/@ory/client) | [README](https://github.com/ory/sdk/blob/master/clients/client/typescript/README.md) | | JavaScript (With fetch) | [npmjs.com](https://www.npmjs.com/package/@ory/client-fetch) | [README](https://github.com/ory/sdk/blob/master/clients/client/typescript-fetch/README.md) | | PHP | [packagist.org](https://packagist.org/packages/ory/client) | [README](https://github.com/ory/sdk/blob/master/clients/client/php/README.md) | | Python | [pypi.org](https://pypi.org/project/ory-client/) | [README](https://github.com/ory/sdk/blob/master/clients/client/python/README.md) | | Ruby | [rubygems.org](https://rubygems.org/gems/ory-client) | [README](https://github.com/ory/sdk/blob/master/clients/client/ruby/README.md) | | Rust | [crates.io](https://crates.io/crates/ory-client) | [README](https://github.com/ory/sdk/blob/master/clients/client/rust/README.md) |
|
7
7
|
|
8
|
-
The version of the OpenAPI document: v1.
|
8
|
+
The version of the OpenAPI document: v1.17.1
|
9
9
|
Contact: support@ory.sh
|
10
10
|
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
11
11
|
|
@@ -16,6 +16,7 @@
|
|
16
16
|
import datetime
|
17
17
|
from dateutil.parser import parse
|
18
18
|
from enum import Enum
|
19
|
+
import decimal
|
19
20
|
import json
|
20
21
|
import mimetypes
|
21
22
|
import os
|
@@ -23,7 +24,8 @@ import re
|
|
23
24
|
import tempfile
|
24
25
|
|
25
26
|
from urllib.parse import quote
|
26
|
-
from typing import Tuple, Optional, List, Dict
|
27
|
+
from typing import Tuple, Optional, List, Dict, Union
|
28
|
+
from pydantic import SecretStr
|
27
29
|
|
28
30
|
from ory_client.configuration import Configuration
|
29
31
|
from ory_client.api_response import ApiResponse, T as ApiResponseT
|
@@ -66,6 +68,7 @@ class ApiClient:
|
|
66
68
|
'bool': bool,
|
67
69
|
'date': datetime.date,
|
68
70
|
'datetime': datetime.datetime,
|
71
|
+
'decimal': decimal.Decimal,
|
69
72
|
'object': object,
|
70
73
|
}
|
71
74
|
_pool = None
|
@@ -88,7 +91,7 @@ class ApiClient:
|
|
88
91
|
self.default_headers[header_name] = header_value
|
89
92
|
self.cookie = cookie
|
90
93
|
# Set default User-Agent.
|
91
|
-
self.user_agent = 'OpenAPI-Generator/v1.
|
94
|
+
self.user_agent = 'OpenAPI-Generator/v1.17.1/python'
|
92
95
|
self.client_side_validation = configuration.client_side_validation
|
93
96
|
|
94
97
|
def __enter__(self):
|
@@ -208,7 +211,8 @@ class ApiClient:
|
|
208
211
|
post_params,
|
209
212
|
collection_formats
|
210
213
|
)
|
211
|
-
|
214
|
+
if files:
|
215
|
+
post_params.extend(self.files_parameters(files))
|
212
216
|
|
213
217
|
# auth setting
|
214
218
|
self.update_params_for_auth(
|
@@ -226,7 +230,7 @@ class ApiClient:
|
|
226
230
|
body = self.sanitize_for_serialization(body)
|
227
231
|
|
228
232
|
# request url
|
229
|
-
if _host is None:
|
233
|
+
if _host is None or self.configuration.ignore_operation_servers:
|
230
234
|
url = self.configuration.host + resource_path
|
231
235
|
else:
|
232
236
|
# use server/host defined in path or operation instead
|
@@ -313,7 +317,7 @@ class ApiClient:
|
|
313
317
|
match = re.search(r"charset=([a-zA-Z\-\d]+)[\s;]?", content_type)
|
314
318
|
encoding = match.group(1) if match else "utf-8"
|
315
319
|
response_text = response_data.data.decode(encoding)
|
316
|
-
return_data = self.deserialize(response_text, response_type)
|
320
|
+
return_data = self.deserialize(response_text, response_type, content_type)
|
317
321
|
finally:
|
318
322
|
if not 200 <= response_data.status <= 299:
|
319
323
|
raise ApiException.from_response(
|
@@ -333,9 +337,11 @@ class ApiClient:
|
|
333
337
|
"""Builds a JSON POST object.
|
334
338
|
|
335
339
|
If obj is None, return None.
|
340
|
+
If obj is SecretStr, return obj.get_secret_value()
|
336
341
|
If obj is str, int, long, float, bool, return directly.
|
337
342
|
If obj is datetime.datetime, datetime.date
|
338
343
|
convert to string in iso8601 format.
|
344
|
+
If obj is decimal.Decimal return string representation.
|
339
345
|
If obj is list, sanitize each element in the list.
|
340
346
|
If obj is dict, return the dict.
|
341
347
|
If obj is OpenAPI model, return the properties dict.
|
@@ -345,6 +351,10 @@ class ApiClient:
|
|
345
351
|
"""
|
346
352
|
if obj is None:
|
347
353
|
return None
|
354
|
+
elif isinstance(obj, Enum):
|
355
|
+
return obj.value
|
356
|
+
elif isinstance(obj, SecretStr):
|
357
|
+
return obj.get_secret_value()
|
348
358
|
elif isinstance(obj, self.PRIMITIVE_TYPES):
|
349
359
|
return obj
|
350
360
|
elif isinstance(obj, list):
|
@@ -357,6 +367,8 @@ class ApiClient:
|
|
357
367
|
)
|
358
368
|
elif isinstance(obj, (datetime.datetime, datetime.date)):
|
359
369
|
return obj.isoformat()
|
370
|
+
elif isinstance(obj, decimal.Decimal):
|
371
|
+
return str(obj)
|
360
372
|
|
361
373
|
elif isinstance(obj, dict):
|
362
374
|
obj_dict = obj
|
@@ -366,28 +378,45 @@ class ApiClient:
|
|
366
378
|
# and attributes which value is not None.
|
367
379
|
# Convert attribute name to json key in
|
368
380
|
# model definition for request.
|
369
|
-
|
381
|
+
if hasattr(obj, 'to_dict') and callable(getattr(obj, 'to_dict')):
|
382
|
+
obj_dict = obj.to_dict()
|
383
|
+
else:
|
384
|
+
obj_dict = obj.__dict__
|
370
385
|
|
371
386
|
return {
|
372
387
|
key: self.sanitize_for_serialization(val)
|
373
388
|
for key, val in obj_dict.items()
|
374
389
|
}
|
375
390
|
|
376
|
-
def deserialize(self, response_text, response_type):
|
391
|
+
def deserialize(self, response_text: str, response_type: str, content_type: Optional[str]):
|
377
392
|
"""Deserializes response into an object.
|
378
393
|
|
379
394
|
:param response: RESTResponse object to be deserialized.
|
380
395
|
:param response_type: class literal for
|
381
396
|
deserialized object, or string of class name.
|
397
|
+
:param content_type: content type of response.
|
382
398
|
|
383
399
|
:return: deserialized object.
|
384
400
|
"""
|
385
401
|
|
386
402
|
# fetch data from response object
|
387
|
-
|
388
|
-
|
389
|
-
|
403
|
+
if content_type is None:
|
404
|
+
try:
|
405
|
+
data = json.loads(response_text)
|
406
|
+
except ValueError:
|
407
|
+
data = response_text
|
408
|
+
elif re.match(r'^application/(json|[\w!#$&.+-^_]+\+json)\s*(;|$)', content_type, re.IGNORECASE):
|
409
|
+
if response_text == "":
|
410
|
+
data = ""
|
411
|
+
else:
|
412
|
+
data = json.loads(response_text)
|
413
|
+
elif re.match(r'^text\/[a-z.+-]+\s*(;|$)', content_type, re.IGNORECASE):
|
390
414
|
data = response_text
|
415
|
+
else:
|
416
|
+
raise ApiException(
|
417
|
+
status=0,
|
418
|
+
reason="Unsupported content type: {0}".format(content_type)
|
419
|
+
)
|
391
420
|
|
392
421
|
return self.__deserialize(data, response_type)
|
393
422
|
|
@@ -431,6 +460,8 @@ class ApiClient:
|
|
431
460
|
return self.__deserialize_date(data)
|
432
461
|
elif klass == datetime.datetime:
|
433
462
|
return self.__deserialize_datetime(data)
|
463
|
+
elif klass == decimal.Decimal:
|
464
|
+
return decimal.Decimal(data)
|
434
465
|
elif issubclass(klass, Enum):
|
435
466
|
return self.__deserialize_enum(data, klass)
|
436
467
|
else:
|
@@ -487,7 +518,7 @@ class ApiClient:
|
|
487
518
|
if k in collection_formats:
|
488
519
|
collection_format = collection_formats[k]
|
489
520
|
if collection_format == 'multi':
|
490
|
-
new_params.extend((k, str(value)) for value in v)
|
521
|
+
new_params.extend((k, quote(str(value))) for value in v)
|
491
522
|
else:
|
492
523
|
if collection_format == 'ssv':
|
493
524
|
delimiter = ' '
|
@@ -505,31 +536,39 @@ class ApiClient:
|
|
505
536
|
|
506
537
|
return "&".join(["=".join(map(str, item)) for item in new_params])
|
507
538
|
|
508
|
-
def files_parameters(
|
539
|
+
def files_parameters(
|
540
|
+
self,
|
541
|
+
files: Dict[str, Union[str, bytes, List[str], List[bytes], Tuple[str, bytes]]],
|
542
|
+
):
|
509
543
|
"""Builds form parameters.
|
510
544
|
|
511
545
|
:param files: File parameters.
|
512
546
|
:return: Form parameters with files.
|
513
547
|
"""
|
514
548
|
params = []
|
515
|
-
|
516
|
-
|
517
|
-
|
518
|
-
|
519
|
-
|
520
|
-
|
521
|
-
|
522
|
-
|
523
|
-
|
524
|
-
|
525
|
-
|
526
|
-
|
527
|
-
|
528
|
-
|
529
|
-
|
530
|
-
|
531
|
-
|
532
|
-
|
549
|
+
for k, v in files.items():
|
550
|
+
if isinstance(v, str):
|
551
|
+
with open(v, 'rb') as f:
|
552
|
+
filename = os.path.basename(f.name)
|
553
|
+
filedata = f.read()
|
554
|
+
elif isinstance(v, bytes):
|
555
|
+
filename = k
|
556
|
+
filedata = v
|
557
|
+
elif isinstance(v, tuple):
|
558
|
+
filename, filedata = v
|
559
|
+
elif isinstance(v, list):
|
560
|
+
for file_param in v:
|
561
|
+
params.extend(self.files_parameters({k: file_param}))
|
562
|
+
continue
|
563
|
+
else:
|
564
|
+
raise ValueError("Unsupported file value")
|
565
|
+
mimetype = (
|
566
|
+
mimetypes.guess_type(filename)[0]
|
567
|
+
or 'application/octet-stream'
|
568
|
+
)
|
569
|
+
params.append(
|
570
|
+
tuple([k, tuple([filename, filedata, mimetype])])
|
571
|
+
)
|
533
572
|
return params
|
534
573
|
|
535
574
|
def select_header_accept(self, accepts: List[str]) -> Optional[str]:
|
ory_client/configuration.py
CHANGED
@@ -3,9 +3,9 @@
|
|
3
3
|
"""
|
4
4
|
Ory APIs
|
5
5
|
|
6
|
-
Documentation for all public and administrative Ory APIs. Administrative APIs can only be accessed with a valid Personal Access Token. Public APIs are mostly used in browsers.
|
6
|
+
# Introduction Documentation for all public and administrative Ory APIs. Administrative APIs can only be accessed with a valid Personal Access Token. Public APIs are mostly used in browsers. ## SDKs This document describes the APIs available in the Ory Network. The APIs are available as SDKs for the following languages: | Language | Download SDK | Documentation | | -------------- | ---------------------------------------------------------------- | ------------------------------------------------------------------------------------ | | Dart | [pub.dev](https://pub.dev/packages/ory_client) | [README](https://github.com/ory/sdk/blob/master/clients/client/dart/README.md) | | .NET | [nuget.org](https://www.nuget.org/packages/Ory.Client/) | [README](https://github.com/ory/sdk/blob/master/clients/client/dotnet/README.md) | | Elixir | [hex.pm](https://hex.pm/packages/ory_client) | [README](https://github.com/ory/sdk/blob/master/clients/client/elixir/README.md) | | Go | [github.com](https://github.com/ory/client-go) | [README](https://github.com/ory/sdk/blob/master/clients/client/go/README.md) | | Java | [maven.org](https://search.maven.org/artifact/sh.ory/ory-client) | [README](https://github.com/ory/sdk/blob/master/clients/client/java/README.md) | | JavaScript | [npmjs.com](https://www.npmjs.com/package/@ory/client) | [README](https://github.com/ory/sdk/blob/master/clients/client/typescript/README.md) | | JavaScript (With fetch) | [npmjs.com](https://www.npmjs.com/package/@ory/client-fetch) | [README](https://github.com/ory/sdk/blob/master/clients/client/typescript-fetch/README.md) | | PHP | [packagist.org](https://packagist.org/packages/ory/client) | [README](https://github.com/ory/sdk/blob/master/clients/client/php/README.md) | | Python | [pypi.org](https://pypi.org/project/ory-client/) | [README](https://github.com/ory/sdk/blob/master/clients/client/python/README.md) | | Ruby | [rubygems.org](https://rubygems.org/gems/ory-client) | [README](https://github.com/ory/sdk/blob/master/clients/client/ruby/README.md) | | Rust | [crates.io](https://crates.io/crates/ory-client) | [README](https://github.com/ory/sdk/blob/master/clients/client/rust/README.md) |
|
7
7
|
|
8
|
-
The version of the OpenAPI document: v1.
|
8
|
+
The version of the OpenAPI document: v1.17.1
|
9
9
|
Contact: support@ory.sh
|
10
10
|
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
11
11
|
|
@@ -14,14 +14,16 @@
|
|
14
14
|
|
15
15
|
|
16
16
|
import copy
|
17
|
+
import http.client as httplib
|
17
18
|
import logging
|
18
19
|
from logging import FileHandler
|
19
20
|
import multiprocessing
|
20
21
|
import sys
|
21
|
-
from typing import Optional
|
22
|
+
from typing import Any, ClassVar, Dict, List, Literal, Optional, TypedDict
|
23
|
+
from typing_extensions import NotRequired, Self
|
24
|
+
|
22
25
|
import urllib3
|
23
26
|
|
24
|
-
import http.client as httplib
|
25
27
|
|
26
28
|
JSON_SCHEMA_VALIDATION_KEYWORDS = {
|
27
29
|
'multipleOf', 'maximum', 'exclusiveMaximum',
|
@@ -29,10 +31,118 @@ JSON_SCHEMA_VALIDATION_KEYWORDS = {
|
|
29
31
|
'minLength', 'pattern', 'maxItems', 'minItems'
|
30
32
|
}
|
31
33
|
|
34
|
+
ServerVariablesT = Dict[str, str]
|
35
|
+
|
36
|
+
GenericAuthSetting = TypedDict(
|
37
|
+
"GenericAuthSetting",
|
38
|
+
{
|
39
|
+
"type": str,
|
40
|
+
"in": str,
|
41
|
+
"key": str,
|
42
|
+
"value": str,
|
43
|
+
},
|
44
|
+
)
|
45
|
+
|
46
|
+
|
47
|
+
OAuth2AuthSetting = TypedDict(
|
48
|
+
"OAuth2AuthSetting",
|
49
|
+
{
|
50
|
+
"type": Literal["oauth2"],
|
51
|
+
"in": Literal["header"],
|
52
|
+
"key": Literal["Authorization"],
|
53
|
+
"value": str,
|
54
|
+
},
|
55
|
+
)
|
56
|
+
|
57
|
+
|
58
|
+
APIKeyAuthSetting = TypedDict(
|
59
|
+
"APIKeyAuthSetting",
|
60
|
+
{
|
61
|
+
"type": Literal["api_key"],
|
62
|
+
"in": str,
|
63
|
+
"key": str,
|
64
|
+
"value": Optional[str],
|
65
|
+
},
|
66
|
+
)
|
67
|
+
|
68
|
+
|
69
|
+
BasicAuthSetting = TypedDict(
|
70
|
+
"BasicAuthSetting",
|
71
|
+
{
|
72
|
+
"type": Literal["basic"],
|
73
|
+
"in": Literal["header"],
|
74
|
+
"key": Literal["Authorization"],
|
75
|
+
"value": Optional[str],
|
76
|
+
},
|
77
|
+
)
|
78
|
+
|
79
|
+
|
80
|
+
BearerFormatAuthSetting = TypedDict(
|
81
|
+
"BearerFormatAuthSetting",
|
82
|
+
{
|
83
|
+
"type": Literal["bearer"],
|
84
|
+
"in": Literal["header"],
|
85
|
+
"format": Literal["JWT"],
|
86
|
+
"key": Literal["Authorization"],
|
87
|
+
"value": str,
|
88
|
+
},
|
89
|
+
)
|
90
|
+
|
91
|
+
|
92
|
+
BearerAuthSetting = TypedDict(
|
93
|
+
"BearerAuthSetting",
|
94
|
+
{
|
95
|
+
"type": Literal["bearer"],
|
96
|
+
"in": Literal["header"],
|
97
|
+
"key": Literal["Authorization"],
|
98
|
+
"value": str,
|
99
|
+
},
|
100
|
+
)
|
101
|
+
|
102
|
+
|
103
|
+
HTTPSignatureAuthSetting = TypedDict(
|
104
|
+
"HTTPSignatureAuthSetting",
|
105
|
+
{
|
106
|
+
"type": Literal["http-signature"],
|
107
|
+
"in": Literal["header"],
|
108
|
+
"key": Literal["Authorization"],
|
109
|
+
"value": None,
|
110
|
+
},
|
111
|
+
)
|
112
|
+
|
113
|
+
|
114
|
+
AuthSettings = TypedDict(
|
115
|
+
"AuthSettings",
|
116
|
+
{
|
117
|
+
"basic": BasicAuthSetting,
|
118
|
+
"bearer": BearerAuthSetting,
|
119
|
+
"oauth2": OAuth2AuthSetting,
|
120
|
+
"oryAccessToken": BearerAuthSetting,
|
121
|
+
"oryWorkspaceApiKey": BearerAuthSetting,
|
122
|
+
},
|
123
|
+
total=False,
|
124
|
+
)
|
125
|
+
|
126
|
+
|
127
|
+
class HostSettingVariable(TypedDict):
|
128
|
+
description: str
|
129
|
+
default_value: str
|
130
|
+
enum_values: List[str]
|
131
|
+
|
132
|
+
|
133
|
+
class HostSetting(TypedDict):
|
134
|
+
url: str
|
135
|
+
description: str
|
136
|
+
variables: NotRequired[Dict[str, HostSettingVariable]]
|
137
|
+
|
138
|
+
|
32
139
|
class Configuration:
|
33
140
|
"""This class contains various settings of the API client.
|
34
141
|
|
35
142
|
:param host: Base url.
|
143
|
+
:param ignore_operation_servers
|
144
|
+
Boolean to ignore operation servers for the API client.
|
145
|
+
Config will use `host` as the base url regardless of the operation servers.
|
36
146
|
:param api_key: Dict to store API key(s).
|
37
147
|
Each entry in the dict specifies an API key.
|
38
148
|
The dict key is the name of the security scheme in the OAS specification.
|
@@ -55,6 +165,7 @@ class Configuration:
|
|
55
165
|
values before.
|
56
166
|
:param ssl_ca_cert: str - the path to a file of concatenated CA certificates
|
57
167
|
in PEM format.
|
168
|
+
:param retries: Number of retries for API requests.
|
58
169
|
|
59
170
|
:Example:
|
60
171
|
|
@@ -75,19 +186,29 @@ conf = ory_client.Configuration(
|
|
75
186
|
|
76
187
|
"""
|
77
188
|
|
78
|
-
_default = None
|
79
|
-
|
80
|
-
def __init__(
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
189
|
+
_default: ClassVar[Optional[Self]] = None
|
190
|
+
|
191
|
+
def __init__(
|
192
|
+
self,
|
193
|
+
host: Optional[str]=None,
|
194
|
+
api_key: Optional[Dict[str, str]]=None,
|
195
|
+
api_key_prefix: Optional[Dict[str, str]]=None,
|
196
|
+
username: Optional[str]=None,
|
197
|
+
password: Optional[str]=None,
|
198
|
+
access_token: Optional[str]=None,
|
199
|
+
server_index: Optional[int]=None,
|
200
|
+
server_variables: Optional[ServerVariablesT]=None,
|
201
|
+
server_operation_index: Optional[Dict[int, int]]=None,
|
202
|
+
server_operation_variables: Optional[Dict[int, ServerVariablesT]]=None,
|
203
|
+
ignore_operation_servers: bool=False,
|
204
|
+
ssl_ca_cert: Optional[str]=None,
|
205
|
+
retries: Optional[int] = None,
|
206
|
+
*,
|
207
|
+
debug: Optional[bool] = None,
|
208
|
+
) -> None:
|
88
209
|
"""Constructor
|
89
210
|
"""
|
90
|
-
self._base_path = "https
|
211
|
+
self._base_path = "https://playground.projects.oryapis.com" if host is None else host
|
91
212
|
"""Default Base url
|
92
213
|
"""
|
93
214
|
self.server_index = 0 if server_index is None and host is None else server_index
|
@@ -98,6 +219,9 @@ conf = ory_client.Configuration(
|
|
98
219
|
self.server_operation_variables = server_operation_variables or {}
|
99
220
|
"""Default server variables
|
100
221
|
"""
|
222
|
+
self.ignore_operation_servers = ignore_operation_servers
|
223
|
+
"""Ignore operation servers
|
224
|
+
"""
|
101
225
|
self.temp_folder_path = None
|
102
226
|
"""Temp file folder for downloading files
|
103
227
|
"""
|
@@ -141,7 +265,10 @@ conf = ory_client.Configuration(
|
|
141
265
|
self.logger_file = None
|
142
266
|
"""Debug file location
|
143
267
|
"""
|
144
|
-
|
268
|
+
if debug is not None:
|
269
|
+
self.debug = debug
|
270
|
+
else:
|
271
|
+
self.__debug = False
|
145
272
|
"""Debug switch
|
146
273
|
"""
|
147
274
|
|
@@ -184,7 +311,7 @@ conf = ory_client.Configuration(
|
|
184
311
|
self.safe_chars_for_path_param = ''
|
185
312
|
"""Safe chars for path_param
|
186
313
|
"""
|
187
|
-
self.retries =
|
314
|
+
self.retries = retries
|
188
315
|
"""Adding retries to override urllib3 default value 3
|
189
316
|
"""
|
190
317
|
# Enable client side validation
|
@@ -202,7 +329,7 @@ conf = ory_client.Configuration(
|
|
202
329
|
"""date format
|
203
330
|
"""
|
204
331
|
|
205
|
-
def __deepcopy__(self, memo):
|
332
|
+
def __deepcopy__(self, memo: Dict[int, Any]) -> Self:
|
206
333
|
cls = self.__class__
|
207
334
|
result = cls.__new__(cls)
|
208
335
|
memo[id(self)] = result
|
@@ -216,11 +343,11 @@ conf = ory_client.Configuration(
|
|
216
343
|
result.debug = self.debug
|
217
344
|
return result
|
218
345
|
|
219
|
-
def __setattr__(self, name, value):
|
346
|
+
def __setattr__(self, name: str, value: Any) -> None:
|
220
347
|
object.__setattr__(self, name, value)
|
221
348
|
|
222
349
|
@classmethod
|
223
|
-
def set_default(cls, default):
|
350
|
+
def set_default(cls, default: Optional[Self]) -> None:
|
224
351
|
"""Set default instance of configuration.
|
225
352
|
|
226
353
|
It stores default configuration, which can be
|
@@ -231,7 +358,7 @@ conf = ory_client.Configuration(
|
|
231
358
|
cls._default = default
|
232
359
|
|
233
360
|
@classmethod
|
234
|
-
def get_default_copy(cls):
|
361
|
+
def get_default_copy(cls) -> Self:
|
235
362
|
"""Deprecated. Please use `get_default` instead.
|
236
363
|
|
237
364
|
Deprecated. Please use `get_default` instead.
|
@@ -241,7 +368,7 @@ conf = ory_client.Configuration(
|
|
241
368
|
return cls.get_default()
|
242
369
|
|
243
370
|
@classmethod
|
244
|
-
def get_default(cls):
|
371
|
+
def get_default(cls) -> Self:
|
245
372
|
"""Return the default configuration.
|
246
373
|
|
247
374
|
This method returns newly created, based on default constructor,
|
@@ -251,11 +378,11 @@ conf = ory_client.Configuration(
|
|
251
378
|
:return: The configuration object.
|
252
379
|
"""
|
253
380
|
if cls._default is None:
|
254
|
-
cls._default =
|
381
|
+
cls._default = cls()
|
255
382
|
return cls._default
|
256
383
|
|
257
384
|
@property
|
258
|
-
def logger_file(self):
|
385
|
+
def logger_file(self) -> Optional[str]:
|
259
386
|
"""The logger file.
|
260
387
|
|
261
388
|
If the logger_file is None, then add stream handler and remove file
|
@@ -267,7 +394,7 @@ conf = ory_client.Configuration(
|
|
267
394
|
return self.__logger_file
|
268
395
|
|
269
396
|
@logger_file.setter
|
270
|
-
def logger_file(self, value):
|
397
|
+
def logger_file(self, value: Optional[str]) -> None:
|
271
398
|
"""The logger file.
|
272
399
|
|
273
400
|
If the logger_file is None, then add stream handler and remove file
|
@@ -286,7 +413,7 @@ conf = ory_client.Configuration(
|
|
286
413
|
logger.addHandler(self.logger_file_handler)
|
287
414
|
|
288
415
|
@property
|
289
|
-
def debug(self):
|
416
|
+
def debug(self) -> bool:
|
290
417
|
"""Debug status
|
291
418
|
|
292
419
|
:param value: The debug status, True or False.
|
@@ -295,7 +422,7 @@ conf = ory_client.Configuration(
|
|
295
422
|
return self.__debug
|
296
423
|
|
297
424
|
@debug.setter
|
298
|
-
def debug(self, value):
|
425
|
+
def debug(self, value: bool) -> None:
|
299
426
|
"""Debug status
|
300
427
|
|
301
428
|
:param value: The debug status, True or False.
|
@@ -317,7 +444,7 @@ conf = ory_client.Configuration(
|
|
317
444
|
httplib.HTTPConnection.debuglevel = 0
|
318
445
|
|
319
446
|
@property
|
320
|
-
def logger_format(self):
|
447
|
+
def logger_format(self) -> str:
|
321
448
|
"""The logger format.
|
322
449
|
|
323
450
|
The logger_formatter will be updated when sets logger_format.
|
@@ -328,7 +455,7 @@ conf = ory_client.Configuration(
|
|
328
455
|
return self.__logger_format
|
329
456
|
|
330
457
|
@logger_format.setter
|
331
|
-
def logger_format(self, value):
|
458
|
+
def logger_format(self, value: str) -> None:
|
332
459
|
"""The logger format.
|
333
460
|
|
334
461
|
The logger_formatter will be updated when sets logger_format.
|
@@ -339,7 +466,7 @@ conf = ory_client.Configuration(
|
|
339
466
|
self.__logger_format = value
|
340
467
|
self.logger_formatter = logging.Formatter(self.__logger_format)
|
341
468
|
|
342
|
-
def get_api_key_with_prefix(self, identifier, alias=None):
|
469
|
+
def get_api_key_with_prefix(self, identifier: str, alias: Optional[str]=None) -> Optional[str]:
|
343
470
|
"""Gets API key (with prefix if set).
|
344
471
|
|
345
472
|
:param identifier: The identifier of apiKey.
|
@@ -356,7 +483,9 @@ conf = ory_client.Configuration(
|
|
356
483
|
else:
|
357
484
|
return key
|
358
485
|
|
359
|
-
|
486
|
+
return None
|
487
|
+
|
488
|
+
def get_basic_auth_token(self) -> Optional[str]:
|
360
489
|
"""Gets HTTP basic authentication header (string).
|
361
490
|
|
362
491
|
:return: The token for basic HTTP authentication.
|
@@ -371,12 +500,12 @@ conf = ory_client.Configuration(
|
|
371
500
|
basic_auth=username + ':' + password
|
372
501
|
).get('authorization')
|
373
502
|
|
374
|
-
def auth_settings(self):
|
503
|
+
def auth_settings(self)-> AuthSettings:
|
375
504
|
"""Gets Auth Settings dict for api client.
|
376
505
|
|
377
506
|
:return: The Auth Settings information dict.
|
378
507
|
"""
|
379
|
-
auth = {}
|
508
|
+
auth: AuthSettings = {}
|
380
509
|
if self.username is not None and self.password is not None:
|
381
510
|
auth['basic'] = {
|
382
511
|
'type': 'basic',
|
@@ -414,7 +543,7 @@ conf = ory_client.Configuration(
|
|
414
543
|
}
|
415
544
|
return auth
|
416
545
|
|
417
|
-
def to_debug_report(self):
|
546
|
+
def to_debug_report(self) -> str:
|
418
547
|
"""Gets the essential information for debugging.
|
419
548
|
|
420
549
|
:return: The report for debugging.
|
@@ -422,21 +551,21 @@ conf = ory_client.Configuration(
|
|
422
551
|
return "Python SDK Debug Report:\n"\
|
423
552
|
"OS: {env}\n"\
|
424
553
|
"Python Version: {pyversion}\n"\
|
425
|
-
"Version of the API: v1.
|
426
|
-
"SDK Package Version: v1.
|
554
|
+
"Version of the API: v1.17.1\n"\
|
555
|
+
"SDK Package Version: v1.17.1".\
|
427
556
|
format(env=sys.platform, pyversion=sys.version)
|
428
557
|
|
429
|
-
def get_host_settings(self):
|
558
|
+
def get_host_settings(self) -> List[HostSetting]:
|
430
559
|
"""Gets an array of host settings
|
431
560
|
|
432
561
|
:return: An array of host settings
|
433
562
|
"""
|
434
563
|
return [
|
435
564
|
{
|
436
|
-
'url': "https://{
|
565
|
+
'url': "https://{project_slug}.projects.oryapis.com",
|
437
566
|
'description': "No description provided",
|
438
567
|
'variables': {
|
439
|
-
'
|
568
|
+
'project_slug': {
|
440
569
|
'description': "Your Ory Network Project slug. You can find it in the [Ory Network Console](https://console.ory.sh/projects/current/developers/guides).",
|
441
570
|
'default_value': "playground",
|
442
571
|
}
|
@@ -444,7 +573,12 @@ conf = ory_client.Configuration(
|
|
444
573
|
}
|
445
574
|
]
|
446
575
|
|
447
|
-
def get_host_from_settings(
|
576
|
+
def get_host_from_settings(
|
577
|
+
self,
|
578
|
+
index: Optional[int],
|
579
|
+
variables: Optional[ServerVariablesT]=None,
|
580
|
+
servers: Optional[List[HostSetting]]=None,
|
581
|
+
) -> str:
|
448
582
|
"""Gets host URL based on the index and variables
|
449
583
|
:param index: array index of the host settings
|
450
584
|
:param variables: hash of variable and the corresponding value
|
@@ -484,12 +618,12 @@ conf = ory_client.Configuration(
|
|
484
618
|
return url
|
485
619
|
|
486
620
|
@property
|
487
|
-
def host(self):
|
621
|
+
def host(self) -> str:
|
488
622
|
"""Return generated host."""
|
489
623
|
return self.get_host_from_settings(self.server_index, variables=self.server_variables)
|
490
624
|
|
491
625
|
@host.setter
|
492
|
-
def host(self, value):
|
626
|
+
def host(self, value: str) -> None:
|
493
627
|
"""Fix base path."""
|
494
628
|
self._base_path = value
|
495
629
|
self.server_index = None
|