appwrite-console 0.1.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.
- appwrite_console/__init__.py +1 -0
- appwrite_console/client.py +371 -0
- appwrite_console/encoders/__init__.py +1 -0
- appwrite_console/encoders/value_class_encoder.py +373 -0
- appwrite_console/enums/__init__.py +1 -0
- appwrite_console/enums/account_key_scopes.py +6 -0
- appwrite_console/enums/adapter.py +5 -0
- appwrite_console/enums/addon.py +7 -0
- appwrite_console/enums/appwrite_migration_resource.py +42 -0
- appwrite_console/enums/attribute_status.py +8 -0
- appwrite_console/enums/authentication_factor.py +7 -0
- appwrite_console/enums/authenticator_type.py +4 -0
- appwrite_console/enums/backup_services.py +10 -0
- appwrite_console/enums/billing_plan_group.py +6 -0
- appwrite_console/enums/block_mode.py +5 -0
- appwrite_console/enums/block_resource_type.py +12 -0
- appwrite_console/enums/browser.py +17 -0
- appwrite_console/enums/browser_permission.py +23 -0
- appwrite_console/enums/browser_theme.py +5 -0
- appwrite_console/enums/build_runtime.py +95 -0
- appwrite_console/enums/cache_database.py +6 -0
- appwrite_console/enums/cache_target.py +9 -0
- appwrite_console/enums/column_status.py +8 -0
- appwrite_console/enums/compression.py +6 -0
- appwrite_console/enums/console_resource_type.py +4 -0
- appwrite_console/enums/credit_card.py +20 -0
- appwrite_console/enums/database_status.py +17 -0
- appwrite_console/enums/database_type.py +10 -0
- appwrite_console/enums/databases_index_type.py +7 -0
- appwrite_console/enums/deployment_download_type.py +5 -0
- appwrite_console/enums/deployment_status.py +9 -0
- appwrite_console/enums/detection_framework_type.py +4 -0
- appwrite_console/enums/detection_runtime_type.py +4 -0
- appwrite_console/enums/documents_db_index_type.py +6 -0
- appwrite_console/enums/domain_purchase_status.py +7 -0
- appwrite_console/enums/domain_registration_type.py +7 -0
- appwrite_console/enums/domain_suggestion_type.py +5 -0
- appwrite_console/enums/domain_transfer_status_enum.py +11 -0
- appwrite_console/enums/embedding_model.py +7 -0
- appwrite_console/enums/execution_method.py +10 -0
- appwrite_console/enums/execution_status.py +8 -0
- appwrite_console/enums/execution_trigger.py +6 -0
- appwrite_console/enums/firebase_migration_resource.py +13 -0
- appwrite_console/enums/flag.py +198 -0
- appwrite_console/enums/framework.py +18 -0
- appwrite_console/enums/function_template_use_case.py +10 -0
- appwrite_console/enums/image_format.py +10 -0
- appwrite_console/enums/image_gravity.py +12 -0
- appwrite_console/enums/index_status.py +8 -0
- appwrite_console/enums/message_priority.py +5 -0
- appwrite_console/enums/message_status.py +8 -0
- appwrite_console/enums/messaging_provider_type.py +6 -0
- appwrite_console/enums/n_host_migration_resource.py +14 -0
- appwrite_console/enums/o_auth2_google_prompt.py +6 -0
- appwrite_console/enums/o_auth2_oidc_prompt.py +7 -0
- appwrite_console/enums/o_auth_provider.py +47 -0
- appwrite_console/enums/on_duplicate.py +6 -0
- appwrite_console/enums/order_by.py +5 -0
- appwrite_console/enums/organization_key_scopes.py +19 -0
- appwrite_console/enums/password_hash.py +14 -0
- appwrite_console/enums/platform.py +5 -0
- appwrite_console/enums/platform_type.py +8 -0
- appwrite_console/enums/project_auth_method_id.py +10 -0
- appwrite_console/enums/project_email_template_id.py +10 -0
- appwrite_console/enums/project_email_template_locale.py +134 -0
- appwrite_console/enums/project_key_scopes.py +107 -0
- appwrite_console/enums/project_o_auth2_google_prompt.py +6 -0
- appwrite_console/enums/project_o_auth2_oidc_prompt.py +7 -0
- appwrite_console/enums/project_o_auth_provider_id.py +47 -0
- appwrite_console/enums/project_policy_id.py +17 -0
- appwrite_console/enums/project_protocol_id.py +6 -0
- appwrite_console/enums/project_service_id.py +22 -0
- appwrite_console/enums/project_smtp_secure.py +5 -0
- appwrite_console/enums/project_usage_range.py +5 -0
- appwrite_console/enums/proxy_resource_type.py +5 -0
- appwrite_console/enums/proxy_rule_deployment_resource_type.py +5 -0
- appwrite_console/enums/proxy_rule_status.py +6 -0
- appwrite_console/enums/query_suggestion_resource.py +97 -0
- appwrite_console/enums/region.py +9 -0
- appwrite_console/enums/relation_mutate.py +6 -0
- appwrite_console/enums/relationship_type.py +7 -0
- appwrite_console/enums/runtime.py +95 -0
- appwrite_console/enums/schedule_resource_type.py +7 -0
- appwrite_console/enums/site_template_use_case.py +12 -0
- appwrite_console/enums/smtp_encryption.py +6 -0
- appwrite_console/enums/status.py +4 -0
- appwrite_console/enums/status_code.py +7 -0
- appwrite_console/enums/supabase_migration_resource.py +14 -0
- appwrite_console/enums/tables_db_index_type.py +7 -0
- appwrite_console/enums/template_reference_type.py +6 -0
- appwrite_console/enums/timezone.py +422 -0
- appwrite_console/enums/usage_range.py +6 -0
- appwrite_console/enums/vcs_detection_type.py +5 -0
- appwrite_console/enums/vcs_reference_type.py +6 -0
- appwrite_console/enums/vectors_db_index_type.py +9 -0
- appwrite_console/enums/waf_rule_action.py +8 -0
- appwrite_console/exception.py +7 -0
- appwrite_console/id.py +26 -0
- appwrite_console/input_file.py +21 -0
- appwrite_console/models/__init__.py +803 -0
- appwrite_console/models/activity_event.py +99 -0
- appwrite_console/models/activity_event_list.py +19 -0
- appwrite_console/models/additional_resource.py +30 -0
- appwrite_console/models/addon.py +42 -0
- appwrite_console/models/addon_list.py +19 -0
- appwrite_console/models/addon_price.py +36 -0
- appwrite_console/models/aggregation_breakdown.py +28 -0
- appwrite_console/models/aggregation_team.py +101 -0
- appwrite_console/models/aggregation_team_list.py +19 -0
- appwrite_console/models/algo_argon2.py +24 -0
- appwrite_console/models/algo_bcrypt.py +15 -0
- appwrite_console/models/algo_md5.py +15 -0
- appwrite_console/models/algo_phpass.py +15 -0
- appwrite_console/models/algo_scrypt.py +27 -0
- appwrite_console/models/algo_scrypt_modified.py +24 -0
- appwrite_console/models/algo_sha.py +15 -0
- appwrite_console/models/app.py +91 -0
- appwrite_console/models/app_installation.py +42 -0
- appwrite_console/models/app_installation_list.py +19 -0
- appwrite_console/models/app_key.py +39 -0
- appwrite_console/models/app_key_list.py +19 -0
- appwrite_console/models/app_scope.py +27 -0
- appwrite_console/models/app_scope_list.py +19 -0
- appwrite_console/models/app_secret.py +39 -0
- appwrite_console/models/app_secret_list.py +19 -0
- appwrite_console/models/app_secret_plaintext.py +39 -0
- appwrite_console/models/apps_list.py +19 -0
- appwrite_console/models/attribute_bigint.py +46 -0
- appwrite_console/models/attribute_boolean.py +40 -0
- appwrite_console/models/attribute_datetime.py +43 -0
- appwrite_console/models/attribute_email.py +43 -0
- appwrite_console/models/attribute_enum.py +46 -0
- appwrite_console/models/attribute_float.py +46 -0
- appwrite_console/models/attribute_integer.py +46 -0
- appwrite_console/models/attribute_ip.py +43 -0
- appwrite_console/models/attribute_line.py +40 -0
- appwrite_console/models/attribute_list.py +36 -0
- appwrite_console/models/attribute_longtext.py +43 -0
- appwrite_console/models/attribute_mediumtext.py +43 -0
- appwrite_console/models/attribute_object.py +37 -0
- appwrite_console/models/attribute_point.py +40 -0
- appwrite_console/models/attribute_polygon.py +40 -0
- appwrite_console/models/attribute_relationship.py +55 -0
- appwrite_console/models/attribute_string.py +46 -0
- appwrite_console/models/attribute_text.py +43 -0
- appwrite_console/models/attribute_url.py +43 -0
- appwrite_console/models/attribute_varchar.py +46 -0
- appwrite_console/models/attribute_vector.py +40 -0
- appwrite_console/models/backup_archive.py +48 -0
- appwrite_console/models/backup_archive_list.py +19 -0
- appwrite_console/models/backup_policy.py +48 -0
- appwrite_console/models/backup_policy_list.py +19 -0
- appwrite_console/models/backup_restoration.py +45 -0
- appwrite_console/models/backup_restoration_list.py +19 -0
- appwrite_console/models/base_model.py +27 -0
- appwrite_console/models/billing_address.py +36 -0
- appwrite_console/models/billing_address_list.py +19 -0
- appwrite_console/models/billing_limits.py +36 -0
- appwrite_console/models/billing_plan.py +226 -0
- appwrite_console/models/billing_plan_addon.py +19 -0
- appwrite_console/models/billing_plan_addon_details.py +36 -0
- appwrite_console/models/billing_plan_dedicated_database_limits.py +69 -0
- appwrite_console/models/billing_plan_limits.py +18 -0
- appwrite_console/models/billing_plan_list.py +19 -0
- appwrite_console/models/billing_plan_supported_addons.py +21 -0
- appwrite_console/models/block.py +45 -0
- appwrite_console/models/block_delete.py +19 -0
- appwrite_console/models/block_list.py +19 -0
- appwrite_console/models/branch.py +15 -0
- appwrite_console/models/branch_list.py +19 -0
- appwrite_console/models/bucket.py +54 -0
- appwrite_console/models/bucket_list.py +19 -0
- appwrite_console/models/campaign.py +49 -0
- appwrite_console/models/collection.py +67 -0
- appwrite_console/models/collection_list.py +19 -0
- appwrite_console/models/column_bigint.py +46 -0
- appwrite_console/models/column_boolean.py +40 -0
- appwrite_console/models/column_datetime.py +43 -0
- appwrite_console/models/column_email.py +43 -0
- appwrite_console/models/column_enum.py +46 -0
- appwrite_console/models/column_float.py +46 -0
- appwrite_console/models/column_index.py +42 -0
- appwrite_console/models/column_index_list.py +19 -0
- appwrite_console/models/column_integer.py +46 -0
- appwrite_console/models/column_ip.py +43 -0
- appwrite_console/models/column_line.py +40 -0
- appwrite_console/models/column_list.py +36 -0
- appwrite_console/models/column_longtext.py +43 -0
- appwrite_console/models/column_mediumtext.py +43 -0
- appwrite_console/models/column_point.py +40 -0
- appwrite_console/models/column_polygon.py +40 -0
- appwrite_console/models/column_relationship.py +55 -0
- appwrite_console/models/column_string.py +46 -0
- appwrite_console/models/column_text.py +43 -0
- appwrite_console/models/column_url.py +43 -0
- appwrite_console/models/column_varchar.py +46 -0
- appwrite_console/models/console_key_scope.py +24 -0
- appwrite_console/models/console_key_scope_list.py +19 -0
- appwrite_console/models/console_o_auth2_provider.py +19 -0
- appwrite_console/models/console_o_auth2_provider_list.py +19 -0
- appwrite_console/models/console_o_auth2_provider_parameter.py +24 -0
- appwrite_console/models/console_region.py +30 -0
- appwrite_console/models/console_region_list.py +19 -0
- appwrite_console/models/console_variables.py +96 -0
- appwrite_console/models/continent.py +18 -0
- appwrite_console/models/continent_list.py +19 -0
- appwrite_console/models/country.py +18 -0
- appwrite_console/models/country_list.py +19 -0
- appwrite_console/models/coupon.py +36 -0
- appwrite_console/models/credit.py +45 -0
- appwrite_console/models/credit_available.py +15 -0
- appwrite_console/models/credit_list.py +22 -0
- appwrite_console/models/currency.py +33 -0
- appwrite_console/models/currency_list.py +19 -0
- appwrite_console/models/database.py +52 -0
- appwrite_console/models/database_list.py +19 -0
- appwrite_console/models/database_migration.py +57 -0
- appwrite_console/models/database_migration_list.py +19 -0
- appwrite_console/models/database_status.py +57 -0
- appwrite_console/models/database_status_connections.py +18 -0
- appwrite_console/models/database_status_replica.py +24 -0
- appwrite_console/models/database_status_volume.py +24 -0
- appwrite_console/models/dedicated_database.py +159 -0
- appwrite_console/models/dedicated_database_backup.py +63 -0
- appwrite_console/models/dedicated_database_backup_list.py +19 -0
- appwrite_console/models/dedicated_database_backup_storage.py +27 -0
- appwrite_console/models/dedicated_database_branch.py +48 -0
- appwrite_console/models/dedicated_database_branch_list.py +16 -0
- appwrite_console/models/dedicated_database_execution.py +31 -0
- appwrite_console/models/dedicated_database_execution_column.py +18 -0
- appwrite_console/models/dedicated_database_extensions.py +22 -0
- appwrite_console/models/dedicated_database_list.py +19 -0
- appwrite_console/models/dedicated_database_member.py +24 -0
- appwrite_console/models/dedicated_database_operation.py +45 -0
- appwrite_console/models/dedicated_database_operation_list.py +19 -0
- appwrite_console/models/dedicated_database_pitr_windows.py +18 -0
- appwrite_console/models/dedicated_database_pooler.py +42 -0
- appwrite_console/models/dedicated_database_replicas.py +37 -0
- appwrite_console/models/dedicated_database_restoration.py +45 -0
- appwrite_console/models/dedicated_database_restoration_list.py +19 -0
- appwrite_console/models/dedicated_database_specification.py +39 -0
- appwrite_console/models/dedicated_database_specification_list.py +23 -0
- appwrite_console/models/dedicated_database_specification_pricing.py +27 -0
- appwrite_console/models/deployment.py +94 -0
- appwrite_console/models/deployment_list.py +19 -0
- appwrite_console/models/detection_framework.py +32 -0
- appwrite_console/models/detection_runtime.py +29 -0
- appwrite_console/models/detection_variable.py +18 -0
- appwrite_console/models/dev_key.py +36 -0
- appwrite_console/models/dev_key_list.py +19 -0
- appwrite_console/models/dns_record.py +48 -0
- appwrite_console/models/dns_records_list.py +19 -0
- appwrite_console/models/document.py +80 -0
- appwrite_console/models/document_list.py +32 -0
- appwrite_console/models/domain.py +53 -0
- appwrite_console/models/domain_price.py +30 -0
- appwrite_console/models/domain_purchase.py +43 -0
- appwrite_console/models/domain_suggestion.py +24 -0
- appwrite_console/models/domain_suggestions_list.py +19 -0
- appwrite_console/models/domain_transfer_out.py +15 -0
- appwrite_console/models/domain_transfer_status.py +22 -0
- appwrite_console/models/domains_list.py +19 -0
- appwrite_console/models/downgrade_feedback.py +42 -0
- appwrite_console/models/email_template.py +36 -0
- appwrite_console/models/email_template_list.py +19 -0
- appwrite_console/models/embedding.py +24 -0
- appwrite_console/models/embedding_list.py +19 -0
- appwrite_console/models/ephemeral_key.py +39 -0
- appwrite_console/models/estimation.py +37 -0
- appwrite_console/models/estimation_delete_organization.py +16 -0
- appwrite_console/models/estimation_item.py +18 -0
- appwrite_console/models/estimation_plan_change.py +29 -0
- appwrite_console/models/estimation_update_plan.py +40 -0
- appwrite_console/models/execution.py +69 -0
- appwrite_console/models/execution_list.py +19 -0
- appwrite_console/models/file.py +60 -0
- appwrite_console/models/file_list.py +19 -0
- appwrite_console/models/framework.py +28 -0
- appwrite_console/models/framework_adapter.py +27 -0
- appwrite_console/models/framework_list.py +19 -0
- appwrite_console/models/function.py +109 -0
- appwrite_console/models/function_list.py +19 -0
- appwrite_console/models/headers.py +18 -0
- appwrite_console/models/identity.py +42 -0
- appwrite_console/models/identity_list.py +19 -0
- appwrite_console/models/index.py +43 -0
- appwrite_console/models/index_list.py +19 -0
- appwrite_console/models/insight.py +64 -0
- appwrite_console/models/insight_cta.py +24 -0
- appwrite_console/models/insight_list.py +19 -0
- appwrite_console/models/installation.py +30 -0
- appwrite_console/models/installation_list.py +19 -0
- appwrite_console/models/invoice.py +82 -0
- appwrite_console/models/invoice_list.py +19 -0
- appwrite_console/models/jwt.py +15 -0
- appwrite_console/models/key.py +39 -0
- appwrite_console/models/key_list.py +19 -0
- appwrite_console/models/language.py +21 -0
- appwrite_console/models/language_list.py +19 -0
- appwrite_console/models/locale.py +66 -0
- appwrite_console/models/locale_code.py +18 -0
- appwrite_console/models/locale_code_list.py +19 -0
- appwrite_console/models/log.py +78 -0
- appwrite_console/models/log_list.py +19 -0
- appwrite_console/models/membership.py +57 -0
- appwrite_console/models/membership_list.py +19 -0
- appwrite_console/models/message.py +52 -0
- appwrite_console/models/message_list.py +19 -0
- appwrite_console/models/metric.py +18 -0
- appwrite_console/models/metric_breakdown.py +24 -0
- appwrite_console/models/mfa_challenge.py +24 -0
- appwrite_console/models/mfa_factors.py +24 -0
- appwrite_console/models/mfa_recovery_codes.py +15 -0
- appwrite_console/models/mfa_type.py +18 -0
- appwrite_console/models/migration.py +75 -0
- appwrite_console/models/migration_list.py +19 -0
- appwrite_console/models/migration_report.py +96 -0
- appwrite_console/models/mock_number.py +24 -0
- appwrite_console/models/mock_number_list.py +19 -0
- appwrite_console/models/notification.py +60 -0
- appwrite_console/models/notification_list.py +19 -0
- appwrite_console/models/o_auth2_amazon.py +24 -0
- appwrite_console/models/o_auth2_apple.py +30 -0
- appwrite_console/models/o_auth2_appwrite.py +24 -0
- appwrite_console/models/o_auth2_auth0.py +27 -0
- appwrite_console/models/o_auth2_authentik.py +27 -0
- appwrite_console/models/o_auth2_autodesk.py +24 -0
- appwrite_console/models/o_auth2_bitbucket.py +24 -0
- appwrite_console/models/o_auth2_bitly.py +24 -0
- appwrite_console/models/o_auth2_box.py +24 -0
- appwrite_console/models/o_auth2_dailymotion.py +24 -0
- appwrite_console/models/o_auth2_discord.py +24 -0
- appwrite_console/models/o_auth2_disqus.py +24 -0
- appwrite_console/models/o_auth2_dropbox.py +24 -0
- appwrite_console/models/o_auth2_etsy.py +24 -0
- appwrite_console/models/o_auth2_facebook.py +24 -0
- appwrite_console/models/o_auth2_figma.py +24 -0
- appwrite_console/models/o_auth2_fusion_auth.py +27 -0
- appwrite_console/models/o_auth2_github.py +24 -0
- appwrite_console/models/o_auth2_gitlab.py +27 -0
- appwrite_console/models/o_auth2_google.py +28 -0
- appwrite_console/models/o_auth2_keycloak.py +30 -0
- appwrite_console/models/o_auth2_kick.py +24 -0
- appwrite_console/models/o_auth2_linkedin.py +24 -0
- appwrite_console/models/o_auth2_microsoft.py +27 -0
- appwrite_console/models/o_auth2_notion.py +24 -0
- appwrite_console/models/o_auth2_oidc.py +43 -0
- appwrite_console/models/o_auth2_okta.py +30 -0
- appwrite_console/models/o_auth2_paypal.py +24 -0
- appwrite_console/models/o_auth2_podio.py +24 -0
- appwrite_console/models/o_auth2_provider_list.py +59 -0
- appwrite_console/models/o_auth2_salesforce.py +24 -0
- appwrite_console/models/o_auth2_slack.py +24 -0
- appwrite_console/models/o_auth2_spotify.py +24 -0
- appwrite_console/models/o_auth2_stripe.py +24 -0
- appwrite_console/models/o_auth2_tradeshift.py +24 -0
- appwrite_console/models/o_auth2_twitch.py +24 -0
- appwrite_console/models/o_auth2_word_press.py +24 -0
- appwrite_console/models/o_auth2_x.py +24 -0
- appwrite_console/models/o_auth2_yahoo.py +24 -0
- appwrite_console/models/o_auth2_yandex.py +24 -0
- appwrite_console/models/o_auth2_zoho.py +24 -0
- appwrite_console/models/o_auth2_zoom.py +24 -0
- appwrite_console/models/oauth2_approve.py +15 -0
- appwrite_console/models/oauth2_authorize.py +18 -0
- appwrite_console/models/oauth2_consent.py +42 -0
- appwrite_console/models/oauth2_consent_list.py +19 -0
- appwrite_console/models/oauth2_consent_token.py +45 -0
- appwrite_console/models/oauth2_consent_token_list.py +19 -0
- appwrite_console/models/oauth2_device_authorization.py +30 -0
- appwrite_console/models/oauth2_grant.py +48 -0
- appwrite_console/models/oauth2_organization.py +15 -0
- appwrite_console/models/oauth2_organization_list.py +19 -0
- appwrite_console/models/oauth2_par.py +18 -0
- appwrite_console/models/oauth2_project.py +21 -0
- appwrite_console/models/oauth2_project_list.py +19 -0
- appwrite_console/models/oauth2_reject.py +15 -0
- appwrite_console/models/oauth2_token.py +33 -0
- appwrite_console/models/organization.py +132 -0
- appwrite_console/models/organization_list.py +32 -0
- appwrite_console/models/payment_authentication.py +30 -0
- appwrite_console/models/payment_method.py +72 -0
- appwrite_console/models/payment_method_list.py +19 -0
- appwrite_console/models/phone.py +21 -0
- appwrite_console/models/phone_list.py +19 -0
- appwrite_console/models/plan_change_estimation_details.py +39 -0
- appwrite_console/models/plan_change_limits.py +28 -0
- appwrite_console/models/plan_change_project_compliance.py +28 -0
- appwrite_console/models/plan_change_resource_compliance.py +30 -0
- appwrite_console/models/platform_android.py +31 -0
- appwrite_console/models/platform_apple.py +31 -0
- appwrite_console/models/platform_linux.py +31 -0
- appwrite_console/models/platform_list.py +23 -0
- appwrite_console/models/platform_web.py +31 -0
- appwrite_console/models/platform_windows.py +31 -0
- appwrite_console/models/policy_deny_aliased_email.py +18 -0
- appwrite_console/models/policy_deny_corporate_email.py +18 -0
- appwrite_console/models/policy_deny_disposable_email.py +18 -0
- appwrite_console/models/policy_deny_free_email.py +18 -0
- appwrite_console/models/policy_list.py +32 -0
- appwrite_console/models/policy_membership_privacy.py +33 -0
- appwrite_console/models/policy_password_dictionary.py +18 -0
- appwrite_console/models/policy_password_history.py +18 -0
- appwrite_console/models/policy_password_personal_data.py +18 -0
- appwrite_console/models/policy_password_strength.py +30 -0
- appwrite_console/models/policy_session_alert.py +18 -0
- appwrite_console/models/policy_session_duration.py +18 -0
- appwrite_console/models/policy_session_invalidation.py +18 -0
- appwrite_console/models/policy_session_limit.py +18 -0
- appwrite_console/models/policy_user_limit.py +18 -0
- appwrite_console/models/postgres_extension.py +24 -0
- appwrite_console/models/postgres_extension_list.py +19 -0
- appwrite_console/models/preferences.py +52 -0
- appwrite_console/models/presence.py +39 -0
- appwrite_console/models/presence_list.py +19 -0
- appwrite_console/models/program.py +39 -0
- appwrite_console/models/project.py +153 -0
- appwrite_console/models/project_auth_method.py +19 -0
- appwrite_console/models/project_list.py +19 -0
- appwrite_console/models/project_protocol.py +19 -0
- appwrite_console/models/project_service.py +19 -0
- appwrite_console/models/provider.py +39 -0
- appwrite_console/models/provider_list.py +19 -0
- appwrite_console/models/provider_repository.py +42 -0
- appwrite_console/models/provider_repository_framework.py +45 -0
- appwrite_console/models/provider_repository_framework_list.py +22 -0
- appwrite_console/models/provider_repository_runtime.py +45 -0
- appwrite_console/models/provider_repository_runtime_list.py +22 -0
- appwrite_console/models/proxy_rule.py +59 -0
- appwrite_console/models/proxy_rule_list.py +19 -0
- appwrite_console/models/report.py +49 -0
- appwrite_console/models/report_list.py +19 -0
- appwrite_console/models/resource_token.py +33 -0
- appwrite_console/models/resource_token_list.py +19 -0
- appwrite_console/models/review.py +24 -0
- appwrite_console/models/roles.py +18 -0
- appwrite_console/models/row.py +80 -0
- appwrite_console/models/row_list.py +32 -0
- appwrite_console/models/runtime.py +36 -0
- appwrite_console/models/runtime_list.py +19 -0
- appwrite_console/models/schedule.py +45 -0
- appwrite_console/models/schedule_list.py +19 -0
- appwrite_console/models/session.py +99 -0
- appwrite_console/models/session_list.py +19 -0
- appwrite_console/models/site.py +115 -0
- appwrite_console/models/site_list.py +19 -0
- appwrite_console/models/specification.py +24 -0
- appwrite_console/models/specification_list.py +19 -0
- appwrite_console/models/stage.py +27 -0
- appwrite_console/models/stage_list.py +16 -0
- appwrite_console/models/subscriber.py +40 -0
- appwrite_console/models/subscriber_list.py +19 -0
- appwrite_console/models/table.py +67 -0
- appwrite_console/models/table_list.py +19 -0
- appwrite_console/models/target.py +39 -0
- appwrite_console/models/target_list.py +19 -0
- appwrite_console/models/team.py +43 -0
- appwrite_console/models/team_list.py +32 -0
- appwrite_console/models/template_framework.py +39 -0
- appwrite_console/models/template_function.py +65 -0
- appwrite_console/models/template_function_list.py +19 -0
- appwrite_console/models/template_runtime.py +24 -0
- appwrite_console/models/template_site.py +53 -0
- appwrite_console/models/template_site_list.py +19 -0
- appwrite_console/models/template_variable.py +33 -0
- appwrite_console/models/token.py +30 -0
- appwrite_console/models/topic.py +36 -0
- appwrite_console/models/topic_list.py +19 -0
- appwrite_console/models/transaction.py +30 -0
- appwrite_console/models/transaction_list.py +19 -0
- appwrite_console/models/usage_billing_plan.py +46 -0
- appwrite_console/models/usage_data_point.py +99 -0
- appwrite_console/models/usage_event_list.py +19 -0
- appwrite_console/models/usage_gauge_list.py +19 -0
- appwrite_console/models/usage_metric.py +19 -0
- appwrite_console/models/usage_organization.py +104 -0
- appwrite_console/models/usage_organization_project.py +73 -0
- appwrite_console/models/usage_presence.py +22 -0
- appwrite_console/models/usage_project.py +218 -0
- appwrite_console/models/usage_resources.py +36 -0
- appwrite_console/models/usage_users.py +28 -0
- appwrite_console/models/user.py +111 -0
- appwrite_console/models/user_list.py +32 -0
- appwrite_console/models/variable.py +36 -0
- appwrite_console/models/variable_list.py +19 -0
- appwrite_console/models/vcs_content.py +21 -0
- appwrite_console/models/vcs_content_list.py +19 -0
- appwrite_console/models/vcs_namespace.py +27 -0
- appwrite_console/models/vcs_namespace_list.py +19 -0
- appwrite_console/models/vectorsdb_collection.py +54 -0
- appwrite_console/models/vectorsdb_collection_list.py +19 -0
- appwrite_console/models/waf_rule.py +55 -0
- appwrite_console/models/waf_rule_bypass.py +55 -0
- appwrite_console/models/waf_rule_challenge.py +64 -0
- appwrite_console/models/waf_rule_deny.py +55 -0
- appwrite_console/models/waf_rule_list.py +19 -0
- appwrite_console/models/waf_rule_rate_limit.py +64 -0
- appwrite_console/models/waf_rule_redirect.py +61 -0
- appwrite_console/models/webhook.py +51 -0
- appwrite_console/models/webhook_list.py +19 -0
- appwrite_console/operator.py +150 -0
- appwrite_console/permission.py +21 -0
- appwrite_console/query.py +293 -0
- appwrite_console/role.py +111 -0
- appwrite_console/service.py +50 -0
- appwrite_console/services/__init__.py +1 -0
- appwrite_console/services/account.py +3328 -0
- appwrite_console/services/activities.py +89 -0
- appwrite_console/services/advisor.py +234 -0
- appwrite_console/services/apps.py +1156 -0
- appwrite_console/services/assistant.py +50 -0
- appwrite_console/services/avatars.py +531 -0
- appwrite_console/services/backups.py +572 -0
- appwrite_console/services/console.py +807 -0
- appwrite_console/services/databases.py +4976 -0
- appwrite_console/services/documents_db.py +2052 -0
- appwrite_console/services/domains.py +3047 -0
- appwrite_console/services/functions.py +1659 -0
- appwrite_console/services/graphql.py +92 -0
- appwrite_console/services/locale.py +243 -0
- appwrite_console/services/manager.py +301 -0
- appwrite_console/services/messaging.py +3137 -0
- appwrite_console/services/migrations.py +1036 -0
- appwrite_console/services/mongo.py +1683 -0
- appwrite_console/services/mysql.py +1861 -0
- appwrite_console/services/notifications.py +98 -0
- appwrite_console/services/oauth2.py +914 -0
- appwrite_console/services/organization.py +1039 -0
- appwrite_console/services/organizations.py +2245 -0
- appwrite_console/services/postgresql.py +1995 -0
- appwrite_console/services/presences.py +309 -0
- appwrite_console/services/project.py +5271 -0
- appwrite_console/services/projects.py +885 -0
- appwrite_console/services/proxy.py +394 -0
- appwrite_console/services/sites.py +1593 -0
- appwrite_console/services/storage.py +818 -0
- appwrite_console/services/tables_db.py +5189 -0
- appwrite_console/services/teams.py +993 -0
- appwrite_console/services/tokens.py +243 -0
- appwrite_console/services/usage.py +194 -0
- appwrite_console/services/users.py +2314 -0
- appwrite_console/services/vcs.py +599 -0
- appwrite_console/services/vectors_db.py +2054 -0
- appwrite_console/services/waf.py +1014 -0
- appwrite_console/services/webhooks.py +344 -0
- appwrite_console/utils/__init__.py +1 -0
- appwrite_console/utils/deprecated.py +51 -0
- appwrite_console-0.1.0.dist-info/METADATA +189 -0
- appwrite_console-0.1.0.dist-info/RECORD +552 -0
- appwrite_console-0.1.0.dist-info/WHEEL +5 -0
- appwrite_console-0.1.0.dist-info/licenses/LICENSE +12 -0
- appwrite_console-0.1.0.dist-info/top_level.txt +1 -0
|
@@ -0,0 +1,344 @@
|
|
|
1
|
+
from ..service import Service
|
|
2
|
+
from urllib.parse import quote
|
|
3
|
+
from typing import Any, Dict, List, Optional, Union
|
|
4
|
+
from ..exception import AppwriteException
|
|
5
|
+
from appwrite_console.utils.deprecated import deprecated
|
|
6
|
+
from ..models.webhook_list import WebhookList
|
|
7
|
+
from ..models.webhook import Webhook
|
|
8
|
+
|
|
9
|
+
class Webhooks(Service):
|
|
10
|
+
|
|
11
|
+
def __init__(self, client) -> None:
|
|
12
|
+
super(Webhooks, self).__init__(client)
|
|
13
|
+
|
|
14
|
+
def list(
|
|
15
|
+
self,
|
|
16
|
+
queries: Optional[List[str]] = None,
|
|
17
|
+
total: Optional[bool] = None
|
|
18
|
+
) -> WebhookList:
|
|
19
|
+
"""
|
|
20
|
+
Get a list of all webhooks belonging to the project. You can use the query params to filter your results.
|
|
21
|
+
|
|
22
|
+
Parameters
|
|
23
|
+
----------
|
|
24
|
+
queries : Optional[List[str]]
|
|
25
|
+
Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name, url, authUsername, tls, events, enabled, logs, attempts
|
|
26
|
+
total : Optional[bool]
|
|
27
|
+
When set to false, the total count returned will be 0 and will not be calculated.
|
|
28
|
+
|
|
29
|
+
Returns
|
|
30
|
+
-------
|
|
31
|
+
WebhookList
|
|
32
|
+
API response as a typed Pydantic model
|
|
33
|
+
|
|
34
|
+
Raises
|
|
35
|
+
------
|
|
36
|
+
AppwriteException
|
|
37
|
+
If API request fails
|
|
38
|
+
"""
|
|
39
|
+
|
|
40
|
+
api_path = '/webhooks'
|
|
41
|
+
api_params = {}
|
|
42
|
+
|
|
43
|
+
if queries is not None:
|
|
44
|
+
api_params['queries'] = self._normalize_value(queries)
|
|
45
|
+
if total is not None:
|
|
46
|
+
api_params['total'] = self._normalize_value(total)
|
|
47
|
+
|
|
48
|
+
response = self.client.call('get', api_path, {
|
|
49
|
+
'X-Appwrite-Project': self.client.get_config('project'),
|
|
50
|
+
'accept': 'application/json',
|
|
51
|
+
}, api_params)
|
|
52
|
+
|
|
53
|
+
return self._parse_response(response, model=WebhookList)
|
|
54
|
+
|
|
55
|
+
|
|
56
|
+
def create(
|
|
57
|
+
self,
|
|
58
|
+
webhook_id: str,
|
|
59
|
+
url: str,
|
|
60
|
+
name: str,
|
|
61
|
+
events: List[str],
|
|
62
|
+
enabled: Optional[bool] = None,
|
|
63
|
+
tls: Optional[bool] = None,
|
|
64
|
+
auth_username: Optional[str] = None,
|
|
65
|
+
auth_password: Optional[str] = None,
|
|
66
|
+
secret: Optional[str] = None
|
|
67
|
+
) -> Webhook:
|
|
68
|
+
"""
|
|
69
|
+
Create a new webhook. Use this endpoint to configure a URL that will receive events from Appwrite when specific events occur.
|
|
70
|
+
|
|
71
|
+
Parameters
|
|
72
|
+
----------
|
|
73
|
+
webhook_id : str
|
|
74
|
+
Webhook ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.
|
|
75
|
+
url : str
|
|
76
|
+
Webhook URL.
|
|
77
|
+
name : str
|
|
78
|
+
Webhook name. Max length: 128 chars.
|
|
79
|
+
events : List[str]
|
|
80
|
+
Events list. Maximum of 100 events are allowed.
|
|
81
|
+
enabled : Optional[bool]
|
|
82
|
+
Enable or disable a webhook.
|
|
83
|
+
tls : Optional[bool]
|
|
84
|
+
Certificate verification, false for disabled or true for enabled.
|
|
85
|
+
auth_username : Optional[str]
|
|
86
|
+
Webhook HTTP user. Max length: 256 chars.
|
|
87
|
+
auth_password : Optional[str]
|
|
88
|
+
Webhook HTTP password. Max length: 256 chars.
|
|
89
|
+
secret : Optional[str]
|
|
90
|
+
Webhook secret key. If not provided, a new key will be generated automatically. Key must be at least 8 characters long, and at max 256 characters.
|
|
91
|
+
|
|
92
|
+
Returns
|
|
93
|
+
-------
|
|
94
|
+
Webhook
|
|
95
|
+
API response as a typed Pydantic model
|
|
96
|
+
|
|
97
|
+
Raises
|
|
98
|
+
------
|
|
99
|
+
AppwriteException
|
|
100
|
+
If API request fails
|
|
101
|
+
"""
|
|
102
|
+
|
|
103
|
+
api_path = '/webhooks'
|
|
104
|
+
api_params = {}
|
|
105
|
+
if webhook_id is None:
|
|
106
|
+
raise AppwriteException('Missing required parameter: "webhook_id"')
|
|
107
|
+
|
|
108
|
+
if url is None:
|
|
109
|
+
raise AppwriteException('Missing required parameter: "url"')
|
|
110
|
+
|
|
111
|
+
if name is None:
|
|
112
|
+
raise AppwriteException('Missing required parameter: "name"')
|
|
113
|
+
|
|
114
|
+
if events is None:
|
|
115
|
+
raise AppwriteException('Missing required parameter: "events"')
|
|
116
|
+
|
|
117
|
+
|
|
118
|
+
api_params['webhookId'] = self._normalize_value(webhook_id)
|
|
119
|
+
api_params['url'] = self._normalize_value(url)
|
|
120
|
+
api_params['name'] = self._normalize_value(name)
|
|
121
|
+
api_params['events'] = self._normalize_value(events)
|
|
122
|
+
if enabled is not None:
|
|
123
|
+
api_params['enabled'] = self._normalize_value(enabled)
|
|
124
|
+
if tls is not None:
|
|
125
|
+
api_params['tls'] = self._normalize_value(tls)
|
|
126
|
+
if auth_username is not None:
|
|
127
|
+
api_params['authUsername'] = self._normalize_value(auth_username)
|
|
128
|
+
if auth_password is not None:
|
|
129
|
+
api_params['authPassword'] = self._normalize_value(auth_password)
|
|
130
|
+
if secret is not None:
|
|
131
|
+
api_params['secret'] = self._normalize_value(secret)
|
|
132
|
+
|
|
133
|
+
response = self.client.call('post', api_path, {
|
|
134
|
+
'X-Appwrite-Project': self.client.get_config('project'),
|
|
135
|
+
'content-type': 'application/json',
|
|
136
|
+
'accept': 'application/json',
|
|
137
|
+
}, api_params)
|
|
138
|
+
|
|
139
|
+
return self._parse_response(response, model=Webhook)
|
|
140
|
+
|
|
141
|
+
|
|
142
|
+
def get(
|
|
143
|
+
self,
|
|
144
|
+
webhook_id: str
|
|
145
|
+
) -> Webhook:
|
|
146
|
+
"""
|
|
147
|
+
Get a webhook by its unique ID. This endpoint returns details about a specific webhook configured for a project.
|
|
148
|
+
|
|
149
|
+
Parameters
|
|
150
|
+
----------
|
|
151
|
+
webhook_id : str
|
|
152
|
+
Webhook ID.
|
|
153
|
+
|
|
154
|
+
Returns
|
|
155
|
+
-------
|
|
156
|
+
Webhook
|
|
157
|
+
API response as a typed Pydantic model
|
|
158
|
+
|
|
159
|
+
Raises
|
|
160
|
+
------
|
|
161
|
+
AppwriteException
|
|
162
|
+
If API request fails
|
|
163
|
+
"""
|
|
164
|
+
|
|
165
|
+
api_path = '/webhooks/{webhookId}'
|
|
166
|
+
api_params = {}
|
|
167
|
+
if webhook_id is None:
|
|
168
|
+
raise AppwriteException('Missing required parameter: "webhook_id"')
|
|
169
|
+
|
|
170
|
+
api_path = api_path.replace('{webhookId}', str(self._normalize_value(webhook_id)))
|
|
171
|
+
|
|
172
|
+
|
|
173
|
+
response = self.client.call('get', api_path, {
|
|
174
|
+
'X-Appwrite-Project': self.client.get_config('project'),
|
|
175
|
+
'accept': 'application/json',
|
|
176
|
+
}, api_params)
|
|
177
|
+
|
|
178
|
+
return self._parse_response(response, model=Webhook)
|
|
179
|
+
|
|
180
|
+
|
|
181
|
+
def update(
|
|
182
|
+
self,
|
|
183
|
+
webhook_id: str,
|
|
184
|
+
name: str,
|
|
185
|
+
url: str,
|
|
186
|
+
events: List[str],
|
|
187
|
+
enabled: Optional[bool] = None,
|
|
188
|
+
tls: Optional[bool] = None,
|
|
189
|
+
auth_username: Optional[str] = None,
|
|
190
|
+
auth_password: Optional[str] = None
|
|
191
|
+
) -> Webhook:
|
|
192
|
+
"""
|
|
193
|
+
Update a webhook by its unique ID. Use this endpoint to update the URL, events, or status of an existing webhook.
|
|
194
|
+
|
|
195
|
+
Parameters
|
|
196
|
+
----------
|
|
197
|
+
webhook_id : str
|
|
198
|
+
Webhook ID.
|
|
199
|
+
name : str
|
|
200
|
+
Webhook name. Max length: 128 chars.
|
|
201
|
+
url : str
|
|
202
|
+
Webhook URL.
|
|
203
|
+
events : List[str]
|
|
204
|
+
Events list. Maximum of 100 events are allowed.
|
|
205
|
+
enabled : Optional[bool]
|
|
206
|
+
Enable or disable a webhook.
|
|
207
|
+
tls : Optional[bool]
|
|
208
|
+
Certificate verification, false for disabled or true for enabled.
|
|
209
|
+
auth_username : Optional[str]
|
|
210
|
+
Webhook HTTP user. Max length: 256 chars.
|
|
211
|
+
auth_password : Optional[str]
|
|
212
|
+
Webhook HTTP password. Max length: 256 chars.
|
|
213
|
+
|
|
214
|
+
Returns
|
|
215
|
+
-------
|
|
216
|
+
Webhook
|
|
217
|
+
API response as a typed Pydantic model
|
|
218
|
+
|
|
219
|
+
Raises
|
|
220
|
+
------
|
|
221
|
+
AppwriteException
|
|
222
|
+
If API request fails
|
|
223
|
+
"""
|
|
224
|
+
|
|
225
|
+
api_path = '/webhooks/{webhookId}'
|
|
226
|
+
api_params = {}
|
|
227
|
+
if webhook_id is None:
|
|
228
|
+
raise AppwriteException('Missing required parameter: "webhook_id"')
|
|
229
|
+
|
|
230
|
+
if name is None:
|
|
231
|
+
raise AppwriteException('Missing required parameter: "name"')
|
|
232
|
+
|
|
233
|
+
if url is None:
|
|
234
|
+
raise AppwriteException('Missing required parameter: "url"')
|
|
235
|
+
|
|
236
|
+
if events is None:
|
|
237
|
+
raise AppwriteException('Missing required parameter: "events"')
|
|
238
|
+
|
|
239
|
+
api_path = api_path.replace('{webhookId}', str(self._normalize_value(webhook_id)))
|
|
240
|
+
|
|
241
|
+
api_params['name'] = self._normalize_value(name)
|
|
242
|
+
api_params['url'] = self._normalize_value(url)
|
|
243
|
+
api_params['events'] = self._normalize_value(events)
|
|
244
|
+
if enabled is not None:
|
|
245
|
+
api_params['enabled'] = self._normalize_value(enabled)
|
|
246
|
+
if tls is not None:
|
|
247
|
+
api_params['tls'] = self._normalize_value(tls)
|
|
248
|
+
if auth_username is not None:
|
|
249
|
+
api_params['authUsername'] = self._normalize_value(auth_username)
|
|
250
|
+
if auth_password is not None:
|
|
251
|
+
api_params['authPassword'] = self._normalize_value(auth_password)
|
|
252
|
+
|
|
253
|
+
response = self.client.call('put', api_path, {
|
|
254
|
+
'X-Appwrite-Project': self.client.get_config('project'),
|
|
255
|
+
'content-type': 'application/json',
|
|
256
|
+
'accept': 'application/json',
|
|
257
|
+
}, api_params)
|
|
258
|
+
|
|
259
|
+
return self._parse_response(response, model=Webhook)
|
|
260
|
+
|
|
261
|
+
|
|
262
|
+
def delete(
|
|
263
|
+
self,
|
|
264
|
+
webhook_id: str
|
|
265
|
+
) -> Dict[str, Any]:
|
|
266
|
+
"""
|
|
267
|
+
Delete a webhook by its unique ID. Once deleted, the webhook will no longer receive project events.
|
|
268
|
+
|
|
269
|
+
Parameters
|
|
270
|
+
----------
|
|
271
|
+
webhook_id : str
|
|
272
|
+
Webhook ID.
|
|
273
|
+
|
|
274
|
+
Returns
|
|
275
|
+
-------
|
|
276
|
+
Dict[str, Any]
|
|
277
|
+
API response as a dictionary
|
|
278
|
+
|
|
279
|
+
Raises
|
|
280
|
+
------
|
|
281
|
+
AppwriteException
|
|
282
|
+
If API request fails
|
|
283
|
+
"""
|
|
284
|
+
|
|
285
|
+
api_path = '/webhooks/{webhookId}'
|
|
286
|
+
api_params = {}
|
|
287
|
+
if webhook_id is None:
|
|
288
|
+
raise AppwriteException('Missing required parameter: "webhook_id"')
|
|
289
|
+
|
|
290
|
+
api_path = api_path.replace('{webhookId}', str(self._normalize_value(webhook_id)))
|
|
291
|
+
|
|
292
|
+
|
|
293
|
+
response = self.client.call('delete', api_path, {
|
|
294
|
+
'X-Appwrite-Project': self.client.get_config('project'),
|
|
295
|
+
'content-type': 'application/json',
|
|
296
|
+
}, api_params)
|
|
297
|
+
|
|
298
|
+
return response
|
|
299
|
+
|
|
300
|
+
|
|
301
|
+
def update_secret(
|
|
302
|
+
self,
|
|
303
|
+
webhook_id: str,
|
|
304
|
+
secret: Optional[str] = None
|
|
305
|
+
) -> Webhook:
|
|
306
|
+
"""
|
|
307
|
+
Update the webhook signing key. This endpoint can be used to regenerate the signing key used to sign and validate payload deliveries for a specific webhook.
|
|
308
|
+
|
|
309
|
+
Parameters
|
|
310
|
+
----------
|
|
311
|
+
webhook_id : str
|
|
312
|
+
Webhook ID.
|
|
313
|
+
secret : Optional[str]
|
|
314
|
+
Webhook secret key. If not provided, a new key will be generated automatically. Key must be at least 8 characters long, and at max 256 characters.
|
|
315
|
+
|
|
316
|
+
Returns
|
|
317
|
+
-------
|
|
318
|
+
Webhook
|
|
319
|
+
API response as a typed Pydantic model
|
|
320
|
+
|
|
321
|
+
Raises
|
|
322
|
+
------
|
|
323
|
+
AppwriteException
|
|
324
|
+
If API request fails
|
|
325
|
+
"""
|
|
326
|
+
|
|
327
|
+
api_path = '/webhooks/{webhookId}/secret'
|
|
328
|
+
api_params = {}
|
|
329
|
+
if webhook_id is None:
|
|
330
|
+
raise AppwriteException('Missing required parameter: "webhook_id"')
|
|
331
|
+
|
|
332
|
+
api_path = api_path.replace('{webhookId}', str(self._normalize_value(webhook_id)))
|
|
333
|
+
|
|
334
|
+
if secret is not None:
|
|
335
|
+
api_params['secret'] = self._normalize_value(secret)
|
|
336
|
+
|
|
337
|
+
response = self.client.call('patch', api_path, {
|
|
338
|
+
'X-Appwrite-Project': self.client.get_config('project'),
|
|
339
|
+
'content-type': 'application/json',
|
|
340
|
+
'accept': 'application/json',
|
|
341
|
+
}, api_params)
|
|
342
|
+
|
|
343
|
+
return self._parse_response(response, model=Webhook)
|
|
344
|
+
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
# This file makes the 'utils' directory a Python package.
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
"""
|
|
2
|
+
A decorator to mark functions as deprecated.
|
|
3
|
+
|
|
4
|
+
When the function is called, a DeprecationWarning is emitted.
|
|
5
|
+
Compatible with Python 2.7+ and Python 3.x.
|
|
6
|
+
"""
|
|
7
|
+
|
|
8
|
+
import functools
|
|
9
|
+
import warnings
|
|
10
|
+
|
|
11
|
+
def deprecated(reason=None):
|
|
12
|
+
"""
|
|
13
|
+
Decorator to mark functions as deprecated.
|
|
14
|
+
Emits a DeprecationWarning when the function is called.
|
|
15
|
+
|
|
16
|
+
Args:
|
|
17
|
+
reason (str, optional): Reason for deprecation. Defaults to None.
|
|
18
|
+
|
|
19
|
+
Usage:
|
|
20
|
+
@deprecated("Use another_function instead.")
|
|
21
|
+
def old_function(...):
|
|
22
|
+
...
|
|
23
|
+
"""
|
|
24
|
+
def decorator(func):
|
|
25
|
+
message = "Call to deprecated function '{}'.{}".format(
|
|
26
|
+
func.__name__,
|
|
27
|
+
" " + reason if reason else ""
|
|
28
|
+
)
|
|
29
|
+
|
|
30
|
+
@functools.wraps(func)
|
|
31
|
+
def wrapped(*args, **kwargs):
|
|
32
|
+
warnings.simplefilter('always', DeprecationWarning) # show warning every time
|
|
33
|
+
try:
|
|
34
|
+
warnings.warn(
|
|
35
|
+
message,
|
|
36
|
+
category=DeprecationWarning,
|
|
37
|
+
stacklevel=2
|
|
38
|
+
)
|
|
39
|
+
return func(*args, **kwargs)
|
|
40
|
+
finally:
|
|
41
|
+
warnings.simplefilter('default', DeprecationWarning) # reset filter
|
|
42
|
+
return wrapped
|
|
43
|
+
|
|
44
|
+
# Support both @deprecated and @deprecated("reason")
|
|
45
|
+
if callable(reason):
|
|
46
|
+
# Used as @deprecated without arguments
|
|
47
|
+
func = reason
|
|
48
|
+
reason = None
|
|
49
|
+
return decorator(func)
|
|
50
|
+
else:
|
|
51
|
+
return decorator
|
|
@@ -0,0 +1,189 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: appwrite-console
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: Appwrite is an open-source self-hosted backend server that abstracts and simplifies complex and repetitive development tasks behind a very simple REST API
|
|
5
|
+
Home-page: https://appwrite.io/support
|
|
6
|
+
Download-URL: https://github.com/appwrite/sdk-for-console-python/archive/0.1.0.tar.gz
|
|
7
|
+
Author: Appwrite Team
|
|
8
|
+
Author-email: Appwrite Team <team@appwrite.io>
|
|
9
|
+
Maintainer: Appwrite Team
|
|
10
|
+
Maintainer-email: Appwrite Team <team@appwrite.io>
|
|
11
|
+
License: BSD-3-Clause
|
|
12
|
+
Project-URL: Homepage, https://appwrite.io/support
|
|
13
|
+
Project-URL: Repository, https://github.com/appwrite/sdk-for-console-python
|
|
14
|
+
Classifier: Development Status :: 5 - Production/Stable
|
|
15
|
+
Classifier: Intended Audience :: Developers
|
|
16
|
+
Classifier: Environment :: Web Environment
|
|
17
|
+
Classifier: Topic :: Software Development
|
|
18
|
+
Classifier: License :: OSI Approved :: BSD License
|
|
19
|
+
Classifier: Programming Language :: Python :: 3
|
|
20
|
+
Classifier: Programming Language :: Python :: 3.9
|
|
21
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
22
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
23
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
24
|
+
Requires-Python: >=3.9
|
|
25
|
+
Description-Content-Type: text/markdown
|
|
26
|
+
License-File: LICENSE
|
|
27
|
+
Requires-Dist: requests
|
|
28
|
+
Requires-Dist: pydantic<3,>=2
|
|
29
|
+
Provides-Extra: test
|
|
30
|
+
Requires-Dist: requests_mock==1.11.0; extra == "test"
|
|
31
|
+
Dynamic: author
|
|
32
|
+
Dynamic: download-url
|
|
33
|
+
Dynamic: home-page
|
|
34
|
+
Dynamic: license-file
|
|
35
|
+
Dynamic: maintainer
|
|
36
|
+
Dynamic: requires-python
|
|
37
|
+
|
|
38
|
+
# Appwrite Console Python SDK
|
|
39
|
+
|
|
40
|
+

|
|
41
|
+

|
|
42
|
+
[](https://travis-ci.com/appwrite/sdk-generator)
|
|
43
|
+
[](https://twitter.com/appwrite)
|
|
44
|
+
[](https://appwrite.io/discord)
|
|
45
|
+
|
|
46
|
+
**This SDK is compatible with Appwrite server version 1.9.x. For older versions, please check [previous releases](https://github.com/appwrite/sdk-for-console-python/releases).**
|
|
47
|
+
|
|
48
|
+
Appwrite is an open-source backend as a service server that abstracts and simplifies complex and repetitive development tasks behind a very simple to use REST API. Appwrite aims to help you develop your apps faster and in a more secure way. Use the Console Python SDK to integrate your app with the Appwrite server to easily start interacting with all of Appwrite backend APIs and tools. For full API documentation and tutorials go to [https://appwrite.io/docs](https://appwrite.io/docs)
|
|
49
|
+
|
|
50
|
+

|
|
51
|
+
|
|
52
|
+
## Installation
|
|
53
|
+
|
|
54
|
+
To install via [PyPI](https://pypi.org/):
|
|
55
|
+
|
|
56
|
+
```bash
|
|
57
|
+
pip install appwrite-console
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
Or with `uv`:
|
|
61
|
+
|
|
62
|
+
```bash
|
|
63
|
+
uv add appwrite-console
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
|
|
67
|
+
## Getting Started
|
|
68
|
+
|
|
69
|
+
The Appwrite Console SDK for Python drives the Console API — organizations, projects,
|
|
70
|
+
billing, and everything else the Console itself calls. It is separate from
|
|
71
|
+
[sdk-for-python](https://github.com/appwrite/sdk-for-python), which targets the public
|
|
72
|
+
server API.
|
|
73
|
+
|
|
74
|
+
### Installation
|
|
75
|
+
|
|
76
|
+
```bash
|
|
77
|
+
pip install appwrite-console
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
The package installs as `appwrite-console` and imports as `appwrite_console`, so it can
|
|
81
|
+
sit alongside `appwrite` in the same environment.
|
|
82
|
+
|
|
83
|
+
**Requirements:** Python 3.9+
|
|
84
|
+
|
|
85
|
+
### Init your SDK
|
|
86
|
+
|
|
87
|
+
```python
|
|
88
|
+
from appwrite_console.client import Client
|
|
89
|
+
|
|
90
|
+
client = Client()
|
|
91
|
+
client.set_endpoint('https://cloud.appwrite.io/v1')
|
|
92
|
+
client.set_project('console')
|
|
93
|
+
client.set_session('your-console-session')
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
Console endpoints authenticate as a Console user, not with a project API key. Use
|
|
97
|
+
`set_session()` with a Console session, or `set_jwt()` where you hold a token.
|
|
98
|
+
|
|
99
|
+
For a self-hosted instance with a self-signed certificate:
|
|
100
|
+
|
|
101
|
+
```python
|
|
102
|
+
client.set_self_signed(True) # Dev only
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
### Organizations
|
|
106
|
+
|
|
107
|
+
```python
|
|
108
|
+
from appwrite_console.services.organizations import Organizations
|
|
109
|
+
|
|
110
|
+
organizations = Organizations(client)
|
|
111
|
+
|
|
112
|
+
result = organizations.list()
|
|
113
|
+
for organization in result.teams:
|
|
114
|
+
print(organization.id, organization.name)
|
|
115
|
+
```
|
|
116
|
+
|
|
117
|
+
### Projects
|
|
118
|
+
|
|
119
|
+
Projects are scoped to an organization:
|
|
120
|
+
|
|
121
|
+
```python
|
|
122
|
+
from appwrite_console.services.organization import Organization
|
|
123
|
+
|
|
124
|
+
organization = Organization(client)
|
|
125
|
+
organization.client.set_organization('your-organization-id')
|
|
126
|
+
|
|
127
|
+
projects = organization.list_projects()
|
|
128
|
+
for project in projects.projects:
|
|
129
|
+
print(project.id, project.name)
|
|
130
|
+
|
|
131
|
+
project = organization.get_project('your-project-id')
|
|
132
|
+
```
|
|
133
|
+
|
|
134
|
+
### Queries
|
|
135
|
+
|
|
136
|
+
```python
|
|
137
|
+
from appwrite_console.query import Query
|
|
138
|
+
|
|
139
|
+
result = organization.list_projects(queries=[
|
|
140
|
+
Query.limit(25),
|
|
141
|
+
Query.order_desc('$createdAt'),
|
|
142
|
+
])
|
|
143
|
+
```
|
|
144
|
+
|
|
145
|
+
### Error handling
|
|
146
|
+
|
|
147
|
+
```python
|
|
148
|
+
from appwrite_console.exception import AppwriteException
|
|
149
|
+
|
|
150
|
+
try:
|
|
151
|
+
project = organization.get_project('missing-project')
|
|
152
|
+
except AppwriteException as error:
|
|
153
|
+
print(error.message, error.code, error.type)
|
|
154
|
+
```
|
|
155
|
+
|
|
156
|
+
### Full example
|
|
157
|
+
|
|
158
|
+
```python
|
|
159
|
+
from appwrite_console.client import Client
|
|
160
|
+
from appwrite_console.services.organizations import Organizations
|
|
161
|
+
from appwrite_console.services.organization import Organization
|
|
162
|
+
from appwrite_console.exception import AppwriteException
|
|
163
|
+
|
|
164
|
+
client = Client()
|
|
165
|
+
client.set_endpoint('https://cloud.appwrite.io/v1')
|
|
166
|
+
client.set_project('console')
|
|
167
|
+
client.set_session('your-console-session')
|
|
168
|
+
|
|
169
|
+
organizations = Organizations(client)
|
|
170
|
+
organization = Organization(client)
|
|
171
|
+
|
|
172
|
+
try:
|
|
173
|
+
for team in organizations.list().teams:
|
|
174
|
+
client.set_organization(team.id)
|
|
175
|
+
|
|
176
|
+
for project in organization.list_projects().projects:
|
|
177
|
+
print(f'{team.name} / {project.name} ({project.id})')
|
|
178
|
+
except AppwriteException as error:
|
|
179
|
+
print(f'Error: {error.message}')
|
|
180
|
+
```
|
|
181
|
+
|
|
182
|
+
|
|
183
|
+
## Contribution
|
|
184
|
+
|
|
185
|
+
This library is auto-generated by Appwrite custom [SDK Generator](https://github.com/appwrite/sdk-generator). To learn more about how you can help us improve this SDK, please check the [contribution guide](https://github.com/appwrite/sdk-generator/blob/master/CONTRIBUTING.md) before sending a pull-request.
|
|
186
|
+
|
|
187
|
+
## License
|
|
188
|
+
|
|
189
|
+
Please see the [BSD-3-Clause license](https://raw.githubusercontent.com/appwrite/appwrite/master/LICENSE) file for more information.
|