From a97a1a2511db43e98cecf7e90f5ee71933050fa4 Mon Sep 17 00:00:00 2001 From: Darshan Date: Mon, 9 Feb 2026 06:57:33 +0000 Subject: [PATCH 1/2] regen-as-per-specs --- CHANGELOG.md | 21 +- README.md | 2 +- appwrite/client.py | 4 +- appwrite/encoders/value_class_encoder.py | 16 +- appwrite/enums/backup_services.py | 6 + appwrite/enums/build_runtime.py | 5 +- appwrite/enums/o_auth_provider.py | 2 + appwrite/enums/roles.py | 6 - appwrite/enums/runtime.py | 5 +- appwrite/enums/scopes.py | 8 + appwrite/services/account.py | 183 +++++++- appwrite/services/backups.py | 441 ++++++++++++++++++ appwrite/services/health.py | 145 ++++++ appwrite/services/organizations.py | 73 +++ appwrite/services/storage.py | 4 +- appwrite/services/teams.py | 9 +- .../account/create-anonymous-session.md | 2 + .../account/create-email-password-session.md | 2 + docs/examples/account/create-email-token.md | 2 + .../account/create-email-verification.md | 2 + docs/examples/account/create-jwt.md | 2 + docs/examples/account/create-key.md | 18 + .../account/create-magic-url-token.md | 2 + .../account/create-mfa-authenticator.md | 2 + docs/examples/account/create-mfa-challenge.md | 2 + .../account/create-mfa-recovery-codes.md | 2 + .../examples/account/create-o-auth-2-token.md | 2 + docs/examples/account/create-phone-token.md | 2 + .../account/create-phone-verification.md | 2 + docs/examples/account/create-recovery.md | 2 + docs/examples/account/create-session.md | 2 + docs/examples/account/create-verification.md | 2 + docs/examples/account/create.md | 2 + docs/examples/account/delete-identity.md | 2 + docs/examples/account/delete-key.md | 15 + .../account/delete-mfa-authenticator.md | 2 + docs/examples/account/delete-session.md | 2 + docs/examples/account/delete-sessions.md | 2 + docs/examples/account/get-key.md | 15 + .../account/get-mfa-recovery-codes.md | 2 + docs/examples/account/get-prefs.md | 2 + docs/examples/account/get-session.md | 2 + docs/examples/account/get.md | 2 + docs/examples/account/list-identities.md | 2 + docs/examples/account/list-keys.md | 15 + docs/examples/account/list-logs.md | 2 + docs/examples/account/list-mfa-factors.md | 2 + docs/examples/account/list-sessions.md | 2 + .../account/update-email-verification.md | 2 + docs/examples/account/update-email.md | 2 + docs/examples/account/update-key.md | 19 + .../account/update-magic-url-session.md | 2 + .../account/update-mfa-authenticator.md | 2 + docs/examples/account/update-mfa-challenge.md | 2 + .../account/update-mfa-recovery-codes.md | 2 + docs/examples/account/update-mfa.md | 2 + docs/examples/account/update-name.md | 2 + docs/examples/account/update-password.md | 2 + docs/examples/account/update-phone-session.md | 2 + .../account/update-phone-verification.md | 2 + docs/examples/account/update-phone.md | 2 + docs/examples/account/update-prefs.md | 2 + docs/examples/account/update-recovery.md | 2 + docs/examples/account/update-session.md | 2 + docs/examples/account/update-status.md | 2 + docs/examples/account/update-verification.md | 2 + docs/examples/avatars/get-browser.md | 2 + docs/examples/avatars/get-credit-card.md | 2 + docs/examples/avatars/get-favicon.md | 2 + docs/examples/avatars/get-flag.md | 2 + docs/examples/avatars/get-image.md | 2 + docs/examples/avatars/get-initials.md | 2 + docs/examples/avatars/get-qr.md | 2 + docs/examples/avatars/get-screenshot.md | 2 + docs/examples/backups/create-archive.md | 17 + docs/examples/backups/create-policy.md | 22 + docs/examples/backups/create-restoration.md | 19 + docs/examples/backups/delete-archive.md | 15 + docs/examples/backups/delete-policy.md | 15 + docs/examples/backups/get-archive.md | 15 + docs/examples/backups/get-policy.md | 15 + docs/examples/backups/get-restoration.md | 15 + docs/examples/backups/list-archives.md | 15 + docs/examples/backups/list-policies.md | 15 + docs/examples/backups/list-restorations.md | 15 + docs/examples/backups/update-policy.md | 19 + .../databases/create-boolean-attribute.md | 2 + docs/examples/databases/create-collection.md | 2 + .../databases/create-datetime-attribute.md | 2 + docs/examples/databases/create-document.md | 2 + docs/examples/databases/create-documents.md | 2 + .../databases/create-email-attribute.md | 2 + .../databases/create-enum-attribute.md | 2 + .../databases/create-float-attribute.md | 2 + docs/examples/databases/create-index.md | 2 + .../databases/create-integer-attribute.md | 2 + .../examples/databases/create-ip-attribute.md | 2 + .../databases/create-line-attribute.md | 2 + .../databases/create-longtext-attribute.md | 2 + .../databases/create-mediumtext-attribute.md | 2 + docs/examples/databases/create-operations.md | 2 + .../databases/create-point-attribute.md | 2 + .../databases/create-polygon-attribute.md | 2 + .../create-relationship-attribute.md | 2 + .../databases/create-string-attribute.md | 2 + .../databases/create-text-attribute.md | 2 + docs/examples/databases/create-transaction.md | 2 + .../databases/create-url-attribute.md | 2 + .../databases/create-varchar-attribute.md | 2 + docs/examples/databases/create.md | 2 + .../databases/decrement-document-attribute.md | 2 + docs/examples/databases/delete-attribute.md | 2 + docs/examples/databases/delete-collection.md | 2 + docs/examples/databases/delete-document.md | 2 + docs/examples/databases/delete-documents.md | 2 + docs/examples/databases/delete-index.md | 2 + docs/examples/databases/delete-transaction.md | 2 + docs/examples/databases/delete.md | 2 + docs/examples/databases/get-attribute.md | 2 + docs/examples/databases/get-collection.md | 2 + docs/examples/databases/get-document.md | 2 + docs/examples/databases/get-index.md | 2 + docs/examples/databases/get-transaction.md | 2 + docs/examples/databases/get.md | 2 + .../databases/increment-document-attribute.md | 2 + docs/examples/databases/list-attributes.md | 2 + docs/examples/databases/list-collections.md | 2 + docs/examples/databases/list-documents.md | 2 + docs/examples/databases/list-indexes.md | 2 + docs/examples/databases/list-transactions.md | 2 + docs/examples/databases/list.md | 2 + .../databases/update-boolean-attribute.md | 2 + docs/examples/databases/update-collection.md | 2 + .../databases/update-datetime-attribute.md | 2 + docs/examples/databases/update-document.md | 2 + docs/examples/databases/update-documents.md | 2 + .../databases/update-email-attribute.md | 2 + .../databases/update-enum-attribute.md | 2 + .../databases/update-float-attribute.md | 2 + .../databases/update-integer-attribute.md | 2 + .../examples/databases/update-ip-attribute.md | 2 + .../databases/update-line-attribute.md | 2 + .../databases/update-longtext-attribute.md | 2 + .../databases/update-mediumtext-attribute.md | 2 + .../databases/update-point-attribute.md | 2 + .../databases/update-polygon-attribute.md | 2 + .../update-relationship-attribute.md | 2 + .../databases/update-string-attribute.md | 2 + .../databases/update-text-attribute.md | 2 + docs/examples/databases/update-transaction.md | 2 + .../databases/update-url-attribute.md | 2 + .../databases/update-varchar-attribute.md | 2 + docs/examples/databases/update.md | 2 + docs/examples/databases/upsert-document.md | 2 + docs/examples/databases/upsert-documents.md | 2 + docs/examples/functions/create-deployment.md | 2 + .../functions/create-duplicate-deployment.md | 2 + docs/examples/functions/create-execution.md | 2 + .../functions/create-template-deployment.md | 2 + docs/examples/functions/create-variable.md | 2 + .../functions/create-vcs-deployment.md | 2 + docs/examples/functions/create.md | 2 + docs/examples/functions/delete-deployment.md | 2 + docs/examples/functions/delete-execution.md | 2 + docs/examples/functions/delete-variable.md | 2 + docs/examples/functions/delete.md | 2 + .../functions/get-deployment-download.md | 2 + docs/examples/functions/get-deployment.md | 2 + docs/examples/functions/get-execution.md | 2 + docs/examples/functions/get-variable.md | 2 + docs/examples/functions/get.md | 2 + docs/examples/functions/list-deployments.md | 2 + docs/examples/functions/list-executions.md | 2 + docs/examples/functions/list-runtimes.md | 2 + .../examples/functions/list-specifications.md | 2 + docs/examples/functions/list-variables.md | 2 + docs/examples/functions/list.md | 2 + .../functions/update-deployment-status.md | 2 + .../functions/update-function-deployment.md | 2 + docs/examples/functions/update-variable.md | 2 + docs/examples/functions/update.md | 2 + docs/examples/graphql/mutation.md | 2 + docs/examples/graphql/query.md | 2 + docs/examples/health/get-antivirus.md | 2 + docs/examples/health/get-cache.md | 2 + docs/examples/health/get-certificate.md | 2 + docs/examples/health/get-db.md | 2 + docs/examples/health/get-failed-jobs.md | 2 + docs/examples/health/get-pub-sub.md | 2 + docs/examples/health/get-queue-audits.md | 2 + .../get-queue-billing-project-aggregation.md | 15 + .../get-queue-billing-team-aggregation.md | 15 + docs/examples/health/get-queue-builds.md | 2 + .../examples/health/get-queue-certificates.md | 2 + docs/examples/health/get-queue-databases.md | 2 + docs/examples/health/get-queue-deletes.md | 2 + docs/examples/health/get-queue-functions.md | 2 + docs/examples/health/get-queue-logs.md | 2 + docs/examples/health/get-queue-mails.md | 2 + docs/examples/health/get-queue-messaging.md | 2 + docs/examples/health/get-queue-migrations.md | 2 + .../health/get-queue-priority-builds.md | 15 + .../health/get-queue-region-manager.md | 15 + .../health/get-queue-stats-resources.md | 2 + docs/examples/health/get-queue-threats.md | 15 + docs/examples/health/get-queue-usage.md | 2 + docs/examples/health/get-queue-webhooks.md | 2 + docs/examples/health/get-storage-local.md | 2 + docs/examples/health/get-storage.md | 2 + docs/examples/health/get-time.md | 2 + docs/examples/health/get.md | 2 + docs/examples/locale/get.md | 2 + docs/examples/locale/list-codes.md | 2 + docs/examples/locale/list-continents.md | 2 + docs/examples/locale/list-countries-eu.md | 2 + docs/examples/locale/list-countries-phones.md | 2 + docs/examples/locale/list-countries.md | 2 + docs/examples/locale/list-currencies.md | 2 + docs/examples/locale/list-languages.md | 2 + .../messaging/create-apns-provider.md | 2 + docs/examples/messaging/create-email.md | 2 + .../examples/messaging/create-fcm-provider.md | 2 + .../messaging/create-mailgun-provider.md | 2 + .../messaging/create-msg-91-provider.md | 2 + docs/examples/messaging/create-push.md | 2 + .../messaging/create-resend-provider.md | 2 + .../messaging/create-sendgrid-provider.md | 2 + docs/examples/messaging/create-sms.md | 2 + .../messaging/create-smtp-provider.md | 2 + docs/examples/messaging/create-subscriber.md | 2 + .../messaging/create-telesign-provider.md | 2 + .../messaging/create-textmagic-provider.md | 2 + docs/examples/messaging/create-topic.md | 2 + .../messaging/create-twilio-provider.md | 2 + .../messaging/create-vonage-provider.md | 2 + docs/examples/messaging/delete-provider.md | 2 + docs/examples/messaging/delete-subscriber.md | 2 + docs/examples/messaging/delete-topic.md | 2 + docs/examples/messaging/delete.md | 2 + docs/examples/messaging/get-message.md | 2 + docs/examples/messaging/get-provider.md | 2 + docs/examples/messaging/get-subscriber.md | 2 + docs/examples/messaging/get-topic.md | 2 + docs/examples/messaging/list-message-logs.md | 2 + docs/examples/messaging/list-messages.md | 2 + docs/examples/messaging/list-provider-logs.md | 2 + docs/examples/messaging/list-providers.md | 2 + .../messaging/list-subscriber-logs.md | 2 + docs/examples/messaging/list-subscribers.md | 2 + docs/examples/messaging/list-targets.md | 2 + docs/examples/messaging/list-topic-logs.md | 2 + docs/examples/messaging/list-topics.md | 2 + .../messaging/update-apns-provider.md | 2 + docs/examples/messaging/update-email.md | 2 + .../examples/messaging/update-fcm-provider.md | 2 + .../messaging/update-mailgun-provider.md | 2 + .../messaging/update-msg-91-provider.md | 2 + docs/examples/messaging/update-push.md | 2 + .../messaging/update-resend-provider.md | 2 + .../messaging/update-sendgrid-provider.md | 2 + docs/examples/messaging/update-sms.md | 2 + .../messaging/update-smtp-provider.md | 2 + .../messaging/update-telesign-provider.md | 2 + .../messaging/update-textmagic-provider.md | 2 + docs/examples/messaging/update-topic.md | 2 + .../messaging/update-twilio-provider.md | 2 + .../messaging/update-vonage-provider.md | 2 + docs/examples/organizations/delete.md | 15 + .../estimation-delete-organization.md | 15 + docs/examples/sites/create-deployment.md | 2 + .../sites/create-duplicate-deployment.md | 2 + .../sites/create-template-deployment.md | 2 + docs/examples/sites/create-variable.md | 2 + docs/examples/sites/create-vcs-deployment.md | 2 + docs/examples/sites/create.md | 2 + docs/examples/sites/delete-deployment.md | 2 + docs/examples/sites/delete-log.md | 2 + docs/examples/sites/delete-variable.md | 2 + docs/examples/sites/delete.md | 2 + .../examples/sites/get-deployment-download.md | 2 + docs/examples/sites/get-deployment.md | 2 + docs/examples/sites/get-log.md | 2 + docs/examples/sites/get-variable.md | 2 + docs/examples/sites/get.md | 2 + docs/examples/sites/list-deployments.md | 2 + docs/examples/sites/list-frameworks.md | 2 + docs/examples/sites/list-logs.md | 2 + docs/examples/sites/list-specifications.md | 2 + docs/examples/sites/list-variables.md | 2 + docs/examples/sites/list.md | 2 + .../sites/update-deployment-status.md | 2 + docs/examples/sites/update-site-deployment.md | 2 + docs/examples/sites/update-variable.md | 2 + docs/examples/sites/update.md | 2 + docs/examples/storage/create-bucket.md | 2 + docs/examples/storage/create-file.md | 2 + docs/examples/storage/delete-bucket.md | 2 + docs/examples/storage/delete-file.md | 2 + docs/examples/storage/get-bucket.md | 2 + docs/examples/storage/get-file-download.md | 2 + docs/examples/storage/get-file-preview.md | 2 + docs/examples/storage/get-file-view.md | 2 + docs/examples/storage/get-file.md | 2 + docs/examples/storage/list-buckets.md | 2 + docs/examples/storage/list-files.md | 2 + docs/examples/storage/update-bucket.md | 2 + docs/examples/storage/update-file.md | 2 + .../tablesdb/create-boolean-column.md | 2 + .../tablesdb/create-datetime-column.md | 2 + docs/examples/tablesdb/create-email-column.md | 2 + docs/examples/tablesdb/create-enum-column.md | 2 + docs/examples/tablesdb/create-float-column.md | 2 + docs/examples/tablesdb/create-index.md | 2 + .../tablesdb/create-integer-column.md | 2 + docs/examples/tablesdb/create-ip-column.md | 2 + docs/examples/tablesdb/create-line-column.md | 2 + .../tablesdb/create-longtext-column.md | 2 + .../tablesdb/create-mediumtext-column.md | 2 + docs/examples/tablesdb/create-operations.md | 2 + docs/examples/tablesdb/create-point-column.md | 2 + .../tablesdb/create-polygon-column.md | 2 + .../tablesdb/create-relationship-column.md | 2 + docs/examples/tablesdb/create-row.md | 2 + docs/examples/tablesdb/create-rows.md | 2 + .../examples/tablesdb/create-string-column.md | 2 + docs/examples/tablesdb/create-table.md | 2 + docs/examples/tablesdb/create-text-column.md | 2 + docs/examples/tablesdb/create-transaction.md | 2 + docs/examples/tablesdb/create-url-column.md | 2 + .../tablesdb/create-varchar-column.md | 2 + docs/examples/tablesdb/create.md | 2 + .../examples/tablesdb/decrement-row-column.md | 2 + docs/examples/tablesdb/delete-column.md | 2 + docs/examples/tablesdb/delete-index.md | 2 + docs/examples/tablesdb/delete-row.md | 2 + docs/examples/tablesdb/delete-rows.md | 2 + docs/examples/tablesdb/delete-table.md | 2 + docs/examples/tablesdb/delete-transaction.md | 2 + docs/examples/tablesdb/delete.md | 2 + docs/examples/tablesdb/get-column.md | 2 + docs/examples/tablesdb/get-index.md | 2 + docs/examples/tablesdb/get-row.md | 2 + docs/examples/tablesdb/get-table.md | 2 + docs/examples/tablesdb/get-transaction.md | 2 + docs/examples/tablesdb/get.md | 2 + .../examples/tablesdb/increment-row-column.md | 2 + docs/examples/tablesdb/list-columns.md | 2 + docs/examples/tablesdb/list-indexes.md | 2 + docs/examples/tablesdb/list-rows.md | 2 + docs/examples/tablesdb/list-tables.md | 2 + docs/examples/tablesdb/list-transactions.md | 2 + docs/examples/tablesdb/list.md | 2 + .../tablesdb/update-boolean-column.md | 2 + .../tablesdb/update-datetime-column.md | 2 + docs/examples/tablesdb/update-email-column.md | 2 + docs/examples/tablesdb/update-enum-column.md | 2 + docs/examples/tablesdb/update-float-column.md | 2 + .../tablesdb/update-integer-column.md | 2 + docs/examples/tablesdb/update-ip-column.md | 2 + docs/examples/tablesdb/update-line-column.md | 2 + .../tablesdb/update-longtext-column.md | 2 + .../tablesdb/update-mediumtext-column.md | 2 + docs/examples/tablesdb/update-point-column.md | 2 + .../tablesdb/update-polygon-column.md | 2 + .../tablesdb/update-relationship-column.md | 2 + docs/examples/tablesdb/update-row.md | 2 + docs/examples/tablesdb/update-rows.md | 2 + .../examples/tablesdb/update-string-column.md | 2 + docs/examples/tablesdb/update-table.md | 2 + docs/examples/tablesdb/update-text-column.md | 2 + docs/examples/tablesdb/update-transaction.md | 2 + docs/examples/tablesdb/update-url-column.md | 2 + .../tablesdb/update-varchar-column.md | 2 + docs/examples/tablesdb/update.md | 2 + docs/examples/tablesdb/upsert-row.md | 2 + docs/examples/tablesdb/upsert-rows.md | 2 + docs/examples/teams/create-membership.md | 5 +- docs/examples/teams/create.md | 2 + docs/examples/teams/delete-membership.md | 2 + docs/examples/teams/delete.md | 2 + docs/examples/teams/get-membership.md | 2 + docs/examples/teams/get-prefs.md | 2 + docs/examples/teams/get.md | 2 + docs/examples/teams/list-memberships.md | 2 + docs/examples/teams/list.md | 2 + .../teams/update-membership-status.md | 2 + docs/examples/teams/update-membership.md | 5 +- docs/examples/teams/update-name.md | 2 + docs/examples/teams/update-prefs.md | 2 + docs/examples/tokens/create-file-token.md | 2 + docs/examples/tokens/delete.md | 2 + docs/examples/tokens/get.md | 2 + docs/examples/tokens/list.md | 2 + docs/examples/tokens/update.md | 2 + docs/examples/users/create-argon-2-user.md | 2 + docs/examples/users/create-bcrypt-user.md | 2 + docs/examples/users/create-jwt.md | 2 + docs/examples/users/create-md-5-user.md | 2 + .../users/create-mfa-recovery-codes.md | 2 + docs/examples/users/create-ph-pass-user.md | 2 + .../users/create-scrypt-modified-user.md | 2 + docs/examples/users/create-scrypt-user.md | 2 + docs/examples/users/create-session.md | 2 + docs/examples/users/create-sha-user.md | 2 + docs/examples/users/create-target.md | 2 + docs/examples/users/create-token.md | 2 + docs/examples/users/create.md | 2 + docs/examples/users/delete-identity.md | 2 + .../users/delete-mfa-authenticator.md | 2 + docs/examples/users/delete-session.md | 2 + docs/examples/users/delete-sessions.md | 2 + docs/examples/users/delete-target.md | 2 + docs/examples/users/delete.md | 2 + docs/examples/users/get-mfa-recovery-codes.md | 2 + docs/examples/users/get-prefs.md | 2 + docs/examples/users/get-target.md | 2 + docs/examples/users/get.md | 2 + docs/examples/users/list-identities.md | 2 + docs/examples/users/list-logs.md | 2 + docs/examples/users/list-memberships.md | 2 + docs/examples/users/list-mfa-factors.md | 2 + docs/examples/users/list-sessions.md | 2 + docs/examples/users/list-targets.md | 2 + docs/examples/users/list.md | 2 + .../users/update-email-verification.md | 2 + docs/examples/users/update-email.md | 2 + docs/examples/users/update-labels.md | 2 + .../users/update-mfa-recovery-codes.md | 2 + docs/examples/users/update-mfa.md | 2 + docs/examples/users/update-name.md | 2 + docs/examples/users/update-password.md | 2 + .../users/update-phone-verification.md | 2 + docs/examples/users/update-phone.md | 2 + docs/examples/users/update-prefs.md | 2 + docs/examples/users/update-status.md | 2 + docs/examples/users/update-target.md | 2 + setup.py | 4 +- 437 files changed, 2059 insertions(+), 57 deletions(-) create mode 100644 appwrite/enums/backup_services.py delete mode 100644 appwrite/enums/roles.py create mode 100644 appwrite/services/backups.py create mode 100644 appwrite/services/organizations.py create mode 100644 docs/examples/account/create-key.md create mode 100644 docs/examples/account/delete-key.md create mode 100644 docs/examples/account/get-key.md create mode 100644 docs/examples/account/list-keys.md create mode 100644 docs/examples/account/update-key.md create mode 100644 docs/examples/backups/create-archive.md create mode 100644 docs/examples/backups/create-policy.md create mode 100644 docs/examples/backups/create-restoration.md create mode 100644 docs/examples/backups/delete-archive.md create mode 100644 docs/examples/backups/delete-policy.md create mode 100644 docs/examples/backups/get-archive.md create mode 100644 docs/examples/backups/get-policy.md create mode 100644 docs/examples/backups/get-restoration.md create mode 100644 docs/examples/backups/list-archives.md create mode 100644 docs/examples/backups/list-policies.md create mode 100644 docs/examples/backups/list-restorations.md create mode 100644 docs/examples/backups/update-policy.md create mode 100644 docs/examples/health/get-queue-billing-project-aggregation.md create mode 100644 docs/examples/health/get-queue-billing-team-aggregation.md create mode 100644 docs/examples/health/get-queue-priority-builds.md create mode 100644 docs/examples/health/get-queue-region-manager.md create mode 100644 docs/examples/health/get-queue-threats.md create mode 100644 docs/examples/organizations/delete.md create mode 100644 docs/examples/organizations/estimation-delete-organization.md diff --git a/CHANGELOG.md b/CHANGELOG.md index f662f5f2..31396fa3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,24 +1,5 @@ # Change Log -## 15.0.0 - -* Add array-based enum parameters (e.g., `permissions: list[BrowserPermission]`). -* Breaking change: `Output` enum has been removed; use `ImageFormat` instead. -* Add `getQueueAudits` support to `Health` service. -* Add longtext/mediumtext/text/varchar attribute and column helpers to `Databases` and `TablesDB` services. - -## 14.1.0 - -* Added ability to create columns and indexes synchronously while creating a table - -## 14.0.0 - -* Rename `VCSDeploymentType` enum to `VCSReferenceType` -* Change `create_template_deployment` method signature: replace `version` parameter with `type` (TemplateReferenceType) and `reference` parameters -* Add `get_screenshot` method to `Avatars` service -* Add `Theme`, `Timezone` and `Output` enums -* Add support for dart39 and flutter335 runtimes - ## 13.6.1 * Fix passing of `None` to nullable parameters @@ -69,4 +50,4 @@ ## 9.0.3 -* Update sdk to use Numpy-style docstrings \ No newline at end of file +* Update sdk to use Numpy-style docstrings diff --git a/README.md b/README.md index 4693d74b..fa3f8d46 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,7 @@ [![Twitter Account](https://img.shields.io/twitter/follow/appwrite?color=00acee&label=twitter&style=flat-square)](https://twitter.com/appwrite) [![Discord](https://img.shields.io/discord/564160730845151244?label=discord&style=flat-square)](https://appwrite.io/discord) -**This SDK is compatible with Appwrite server version 1.8.x. For older versions, please check [previous releases](https://github.com/appwrite/sdk-for-python/releases).** +**This SDK is compatible with Appwrite server version latest. For older versions, please check [previous releases](https://github.com/appwrite/sdk-for-python/releases).** 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 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) diff --git a/appwrite/client.py b/appwrite/client.py index b4d22312..cb7777ac 100644 --- a/appwrite/client.py +++ b/appwrite/client.py @@ -15,11 +15,11 @@ def __init__(self): self._endpoint = 'https://cloud.appwrite.io/v1' self._global_headers = { 'content-type': '', - 'user-agent' : f'AppwritePythonSDK/15.0.0 ({platform.uname().system}; {platform.uname().version}; {platform.uname().machine})', + 'user-agent' : f'AppwritePythonSDK/15.0.1 ({platform.uname().system}; {platform.uname().version}; {platform.uname().machine})', 'x-sdk-name': 'Python', 'x-sdk-platform': 'server', 'x-sdk-language': 'python', - 'x-sdk-version': '15.0.0', + 'x-sdk-version': '15.0.1', 'X-Appwrite-Response-Format' : '1.8.0', } diff --git a/appwrite/encoders/value_class_encoder.py b/appwrite/encoders/value_class_encoder.py index 74020c5d..cc22a3b0 100644 --- a/appwrite/encoders/value_class_encoder.py +++ b/appwrite/encoders/value_class_encoder.py @@ -1,4 +1,5 @@ import json +from ..enums.scopes import Scopes from ..enums.authenticator_type import AuthenticatorType from ..enums.authentication_factor import AuthenticationFactor from ..enums.o_auth_provider import OAuthProvider @@ -9,12 +10,12 @@ from ..enums.timezone import Timezone from ..enums.browser_permission import BrowserPermission from ..enums.image_format import ImageFormat +from ..enums.backup_services import BackupServices from ..enums.relationship_type import RelationshipType from ..enums.relation_mutate import RelationMutate from ..enums.index_type import IndexType from ..enums.order_by import OrderBy from ..enums.runtime import Runtime -from ..enums.scopes import Scopes from ..enums.template_reference_type import TemplateReferenceType from ..enums.vcs_reference_type import VCSReferenceType from ..enums.deployment_download_type import DeploymentDownloadType @@ -27,7 +28,6 @@ from ..enums.adapter import Adapter from ..enums.compression import Compression from ..enums.image_gravity import ImageGravity -from ..enums.roles import Roles from ..enums.password_hash import PasswordHash from ..enums.messaging_provider_type import MessagingProviderType from ..enums.database_type import DatabaseType @@ -43,6 +43,9 @@ class ValueClassEncoder(json.JSONEncoder): def default(self, o): + if isinstance(o, Scopes): + return o.value + if isinstance(o, AuthenticatorType): return o.value @@ -73,6 +76,9 @@ def default(self, o): if isinstance(o, ImageFormat): return o.value + if isinstance(o, BackupServices): + return o.value + if isinstance(o, RelationshipType): return o.value @@ -88,9 +94,6 @@ def default(self, o): if isinstance(o, Runtime): return o.value - if isinstance(o, Scopes): - return o.value - if isinstance(o, TemplateReferenceType): return o.value @@ -127,9 +130,6 @@ def default(self, o): if isinstance(o, ImageGravity): return o.value - if isinstance(o, Roles): - return o.value - if isinstance(o, PasswordHash): return o.value diff --git a/appwrite/enums/backup_services.py b/appwrite/enums/backup_services.py new file mode 100644 index 00000000..c3eac0f9 --- /dev/null +++ b/appwrite/enums/backup_services.py @@ -0,0 +1,6 @@ +from enum import Enum + +class BackupServices(Enum): + DATABASES = "databases" + FUNCTIONS = "functions" + STORAGE = "storage" diff --git a/appwrite/enums/build_runtime.py b/appwrite/enums/build_runtime.py index 0b506b96..6b40fada 100644 --- a/appwrite/enums/build_runtime.py +++ b/appwrite/enums/build_runtime.py @@ -23,9 +23,6 @@ class BuildRuntime(Enum): PYTHON_3_12 = "python-3.12" PYTHON_ML_3_11 = "python-ml-3.11" PYTHON_ML_3_12 = "python-ml-3.12" - DENO_1_21 = "deno-1.21" - DENO_1_24 = "deno-1.24" - DENO_1_35 = "deno-1.35" DENO_1_40 = "deno-1.40" DENO_1_46 = "deno-1.46" DENO_2_0 = "deno-2.0" @@ -40,6 +37,7 @@ class BuildRuntime(Enum): DART_3_5 = "dart-3.5" DART_3_8 = "dart-3.8" DART_3_9 = "dart-3.9" + DART_3_10 = "dart-3.10" DOTNET_6_0 = "dotnet-6.0" DOTNET_7_0 = "dotnet-7.0" DOTNET_8_0 = "dotnet-8.0" @@ -68,3 +66,4 @@ class BuildRuntime(Enum): FLUTTER_3_29 = "flutter-3.29" FLUTTER_3_32 = "flutter-3.32" FLUTTER_3_35 = "flutter-3.35" + FLUTTER_3_38 = "flutter-3.38" diff --git a/appwrite/enums/o_auth_provider.py b/appwrite/enums/o_auth_provider.py index b200f77e..1499be17 100644 --- a/appwrite/enums/o_auth_provider.py +++ b/appwrite/enums/o_auth_provider.py @@ -40,3 +40,5 @@ class OAuthProvider(Enum): YANDEX = "yandex" ZOHO = "zoho" ZOOM = "zoom" + GITHUBIMAGINE = "githubImagine" + GOOGLEIMAGINE = "googleImagine" diff --git a/appwrite/enums/roles.py b/appwrite/enums/roles.py deleted file mode 100644 index b721a219..00000000 --- a/appwrite/enums/roles.py +++ /dev/null @@ -1,6 +0,0 @@ -from enum import Enum - -class Roles(Enum): - ADMIN = "admin" - DEVELOPER = "developer" - OWNER = "owner" diff --git a/appwrite/enums/runtime.py b/appwrite/enums/runtime.py index 0f0be3cb..2bc85522 100644 --- a/appwrite/enums/runtime.py +++ b/appwrite/enums/runtime.py @@ -23,9 +23,6 @@ class Runtime(Enum): PYTHON_3_12 = "python-3.12" PYTHON_ML_3_11 = "python-ml-3.11" PYTHON_ML_3_12 = "python-ml-3.12" - DENO_1_21 = "deno-1.21" - DENO_1_24 = "deno-1.24" - DENO_1_35 = "deno-1.35" DENO_1_40 = "deno-1.40" DENO_1_46 = "deno-1.46" DENO_2_0 = "deno-2.0" @@ -40,6 +37,7 @@ class Runtime(Enum): DART_3_5 = "dart-3.5" DART_3_8 = "dart-3.8" DART_3_9 = "dart-3.9" + DART_3_10 = "dart-3.10" DOTNET_6_0 = "dotnet-6.0" DOTNET_7_0 = "dotnet-7.0" DOTNET_8_0 = "dotnet-8.0" @@ -68,3 +66,4 @@ class Runtime(Enum): FLUTTER_3_29 = "flutter-3.29" FLUTTER_3_32 = "flutter-3.32" FLUTTER_3_35 = "flutter-3.35" + FLUTTER_3_38 = "flutter-3.38" diff --git a/appwrite/enums/scopes.py b/appwrite/enums/scopes.py index 50afa9eb..193322a5 100644 --- a/appwrite/enums/scopes.py +++ b/appwrite/enums/scopes.py @@ -56,3 +56,11 @@ class Scopes(Enum): ASSISTANT_READ = "assistant.read" TOKENS_READ = "tokens.read" TOKENS_WRITE = "tokens.write" + POLICIES_WRITE = "policies.write" + POLICIES_READ = "policies.read" + ARCHIVES_READ = "archives.read" + ARCHIVES_WRITE = "archives.write" + RESTORATIONS_READ = "restorations.read" + RESTORATIONS_WRITE = "restorations.write" + DOMAINS_READ = "domains.read" + DOMAINS_WRITE = "domains.write" diff --git a/appwrite/services/account.py b/appwrite/services/account.py index 29bfd007..cdb7fd9b 100644 --- a/appwrite/services/account.py +++ b/appwrite/services/account.py @@ -2,6 +2,7 @@ from typing import List, Dict, Any, Optional from ..exception import AppwriteException from appwrite.utils.deprecated import deprecated +from ..enums.scopes import Scopes; from ..enums.authenticator_type import AuthenticatorType; from ..enums.authentication_factor import AuthenticationFactor; from ..enums.o_auth_provider import OAuthProvider; @@ -215,6 +216,186 @@ def create_jwt(self, duration: Optional[float] = None) -> Dict[str, Any]: 'content-type': 'application/json', }, api_params) + def list_keys(self, total: Optional[bool] = None) -> Dict[str, Any]: + """ + Get a list of all API keys from the current account. + + Parameters + ---------- + total : Optional[bool] + When set to false, the total count returned will be 0 and will not be calculated. + + Returns + ------- + Dict[str, Any] + API response as a dictionary + + Raises + ------ + AppwriteException + If API request fails + """ + + api_path = '/account/keys' + api_params = {} + + if total is not None: + api_params['total'] = total + + return self.client.call('get', api_path, { + }, api_params) + + def create_key(self, name: str, scopes: List[Scopes], expire: Optional[str] = None) -> Dict[str, Any]: + """ + Create a new account API key. + + Parameters + ---------- + name : str + Key name. Max length: 128 chars. + scopes : List[Scopes] + Key scopes list. Maximum of 100 scopes are allowed. + expire : Optional[str] + Expiration time in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. Use null for unlimited expiration. + + Returns + ------- + Dict[str, Any] + API response as a dictionary + + Raises + ------ + AppwriteException + If API request fails + """ + + api_path = '/account/keys' + api_params = {} + if name is None: + raise AppwriteException('Missing required parameter: "name"') + + if scopes is None: + raise AppwriteException('Missing required parameter: "scopes"') + + + api_params['name'] = name + api_params['scopes'] = scopes + api_params['expire'] = expire + + return self.client.call('post', api_path, { + 'content-type': 'application/json', + }, api_params) + + def get_key(self, key_id: str) -> Dict[str, Any]: + """ + Get a key by its unique ID. This endpoint returns details about a specific API key in your account including it's scopes. + + Parameters + ---------- + key_id : str + Key unique ID. + + Returns + ------- + Dict[str, Any] + API response as a dictionary + + Raises + ------ + AppwriteException + If API request fails + """ + + api_path = '/account/keys/{keyId}' + api_params = {} + if key_id is None: + raise AppwriteException('Missing required parameter: "key_id"') + + api_path = api_path.replace('{keyId}', key_id) + + + return self.client.call('get', api_path, { + }, api_params) + + def update_key(self, key_id: str, name: str, scopes: List[Scopes], expire: Optional[str] = None) -> Dict[str, Any]: + """ + Update a key by its unique ID. Use this endpoint to update the name, scopes, or expiration time of an API key. + + Parameters + ---------- + key_id : str + Key unique ID. + name : str + Key name. Max length: 128 chars. + scopes : List[Scopes] + Key scopes list. Maximum of 100 scopes are allowed. + expire : Optional[str] + Expiration time in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. Use null for unlimited expiration. + + Returns + ------- + Dict[str, Any] + API response as a dictionary + + Raises + ------ + AppwriteException + If API request fails + """ + + api_path = '/account/keys/{keyId}' + api_params = {} + if key_id is None: + raise AppwriteException('Missing required parameter: "key_id"') + + if name is None: + raise AppwriteException('Missing required parameter: "name"') + + if scopes is None: + raise AppwriteException('Missing required parameter: "scopes"') + + api_path = api_path.replace('{keyId}', key_id) + + api_params['name'] = name + api_params['scopes'] = scopes + api_params['expire'] = expire + + return self.client.call('put', api_path, { + 'content-type': 'application/json', + }, api_params) + + def delete_key(self, key_id: str) -> Dict[str, Any]: + """ + Delete a key by its unique ID. Once deleted, the key can no longer be used to authenticate API calls. + + Parameters + ---------- + key_id : str + Key unique ID. + + Returns + ------- + Dict[str, Any] + API response as a dictionary + + Raises + ------ + AppwriteException + If API request fails + """ + + api_path = '/account/keys/{keyId}' + api_params = {} + if key_id is None: + raise AppwriteException('Missing required parameter: "key_id"') + + api_path = api_path.replace('{keyId}', key_id) + + + return self.client.call('delete', api_path, { + 'content-type': 'application/json', + }, api_params) + def list_logs(self, queries: Optional[List[str]] = None, total: Optional[bool] = None) -> Dict[str, Any]: """ Get the list of latest security activity logs for the currently logged in user. Each log returns user IP address, location and date and time of log. @@ -1228,7 +1409,7 @@ def create_o_auth2_token(self, provider: OAuthProvider, success: Optional[str] = Parameters ---------- provider : OAuthProvider - OAuth2 Provider. Currently, supported providers are: amazon, apple, auth0, authentik, autodesk, bitbucket, bitly, box, dailymotion, discord, disqus, dropbox, etsy, facebook, figma, github, gitlab, google, linkedin, microsoft, notion, oidc, okta, paypal, paypalSandbox, podio, salesforce, slack, spotify, stripe, tradeshift, tradeshiftBox, twitch, wordpress, yahoo, yammer, yandex, zoho, zoom. + OAuth2 Provider. Currently, supported providers are: amazon, apple, auth0, authentik, autodesk, bitbucket, bitly, box, dailymotion, discord, disqus, dropbox, etsy, facebook, figma, github, gitlab, google, linkedin, microsoft, notion, oidc, okta, paypal, paypalSandbox, podio, salesforce, slack, spotify, stripe, tradeshift, tradeshiftBox, twitch, wordpress, yahoo, yammer, yandex, zoho, zoom, githubImagine, googleImagine. success : Optional[str] URL to redirect back to your app after a successful login attempt. Only URLs from hostnames in your project's platform list are allowed. This requirement helps to prevent an [open redirect](https://cheatsheetseries.owasp.org/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html) attack against your project API. failure : Optional[str] diff --git a/appwrite/services/backups.py b/appwrite/services/backups.py new file mode 100644 index 00000000..2e689423 --- /dev/null +++ b/appwrite/services/backups.py @@ -0,0 +1,441 @@ +from ..service import Service +from typing import List, Dict, Any, Optional +from ..exception import AppwriteException +from appwrite.utils.deprecated import deprecated +from ..enums.backup_services import BackupServices; + +class Backups(Service): + + def __init__(self, client) -> None: + super(Backups, self).__init__(client) + + def list_archives(self, queries: Optional[List[str]] = None) -> Dict[str, Any]: + """ + List all archives for a project. + + Parameters + ---------- + queries : Optional[List[str]] + 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. + + Returns + ------- + Dict[str, Any] + API response as a dictionary + + Raises + ------ + AppwriteException + If API request fails + """ + + api_path = '/backups/archives' + api_params = {} + + if queries is not None: + api_params['queries'] = queries + + return self.client.call('get', api_path, { + }, api_params) + + def create_archive(self, services: List[BackupServices], resource_id: Optional[str] = None) -> Dict[str, Any]: + """ + Create a new archive asynchronously for a project. + + Parameters + ---------- + services : List[BackupServices] + Array of services to backup + resource_id : Optional[str] + Resource ID. When set, only this single resource will be backed up. + + Returns + ------- + Dict[str, Any] + API response as a dictionary + + Raises + ------ + AppwriteException + If API request fails + """ + + api_path = '/backups/archives' + api_params = {} + if services is None: + raise AppwriteException('Missing required parameter: "services"') + + + api_params['services'] = services + api_params['resourceId'] = resource_id + + return self.client.call('post', api_path, { + 'content-type': 'application/json', + }, api_params) + + def get_archive(self, archive_id: str) -> Dict[str, Any]: + """ + Get a backup archive using it's ID. + + Parameters + ---------- + archive_id : str + Archive ID. Choose a custom ID`. 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. + + Returns + ------- + Dict[str, Any] + API response as a dictionary + + Raises + ------ + AppwriteException + If API request fails + """ + + api_path = '/backups/archives/{archiveId}' + api_params = {} + if archive_id is None: + raise AppwriteException('Missing required parameter: "archive_id"') + + api_path = api_path.replace('{archiveId}', archive_id) + + + return self.client.call('get', api_path, { + }, api_params) + + def delete_archive(self, archive_id: str) -> Dict[str, Any]: + """ + Delete an existing archive for a project. + + Parameters + ---------- + archive_id : str + Policy 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. + + Returns + ------- + Dict[str, Any] + API response as a dictionary + + Raises + ------ + AppwriteException + If API request fails + """ + + api_path = '/backups/archives/{archiveId}' + api_params = {} + if archive_id is None: + raise AppwriteException('Missing required parameter: "archive_id"') + + api_path = api_path.replace('{archiveId}', archive_id) + + + return self.client.call('delete', api_path, { + 'content-type': 'application/json', + }, api_params) + + def list_policies(self, queries: Optional[List[str]] = None) -> Dict[str, Any]: + """ + List all policies for a project. + + Parameters + ---------- + queries : Optional[List[str]] + 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. + + Returns + ------- + Dict[str, Any] + API response as a dictionary + + Raises + ------ + AppwriteException + If API request fails + """ + + api_path = '/backups/policies' + api_params = {} + + if queries is not None: + api_params['queries'] = queries + + return self.client.call('get', api_path, { + }, api_params) + + def create_policy(self, policy_id: str, services: List[BackupServices], retention: float, schedule: str, name: Optional[str] = None, resource_id: Optional[str] = None, enabled: Optional[bool] = None) -> Dict[str, Any]: + """ + Create a new backup policy. + + Parameters + ---------- + policy_id : str + Policy 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. + services : List[BackupServices] + Array of services to backup + retention : float + Days to keep backups before deletion + schedule : str + Schedule CRON syntax. + name : Optional[str] + Policy name. Max length: 128 chars. + resource_id : Optional[str] + Resource ID. When set, only this single resource will be backed up. + enabled : Optional[bool] + Is policy enabled? When set to 'disabled', no backups will be taken + + Returns + ------- + Dict[str, Any] + API response as a dictionary + + Raises + ------ + AppwriteException + If API request fails + """ + + api_path = '/backups/policies' + api_params = {} + if policy_id is None: + raise AppwriteException('Missing required parameter: "policy_id"') + + if services is None: + raise AppwriteException('Missing required parameter: "services"') + + if retention is None: + raise AppwriteException('Missing required parameter: "retention"') + + if schedule is None: + raise AppwriteException('Missing required parameter: "schedule"') + + + api_params['policyId'] = policy_id + if name is not None: + api_params['name'] = name + api_params['services'] = services + api_params['resourceId'] = resource_id + if enabled is not None: + api_params['enabled'] = enabled + api_params['retention'] = retention + api_params['schedule'] = schedule + + return self.client.call('post', api_path, { + 'content-type': 'application/json', + }, api_params) + + def get_policy(self, policy_id: str) -> Dict[str, Any]: + """ + Get a backup policy using it's ID. + + Parameters + ---------- + policy_id : str + Policy ID. Choose a custom ID`. 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. + + Returns + ------- + Dict[str, Any] + API response as a dictionary + + Raises + ------ + AppwriteException + If API request fails + """ + + api_path = '/backups/policies/{policyId}' + api_params = {} + if policy_id is None: + raise AppwriteException('Missing required parameter: "policy_id"') + + api_path = api_path.replace('{policyId}', policy_id) + + + return self.client.call('get', api_path, { + }, api_params) + + def update_policy(self, policy_id: str, name: Optional[str] = None, retention: Optional[float] = None, schedule: Optional[str] = None, enabled: Optional[bool] = None) -> Dict[str, Any]: + """ + Update an existing policy using it's ID. + + Parameters + ---------- + policy_id : str + Policy ID. Choose a custom ID`. 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. + name : Optional[str] + Policy name. Max length: 128 chars. + retention : Optional[float] + Days to keep backups before deletion + schedule : Optional[str] + Cron expression + enabled : Optional[bool] + Is Backup enabled? When set to 'disabled', No backup will be taken + + Returns + ------- + Dict[str, Any] + API response as a dictionary + + Raises + ------ + AppwriteException + If API request fails + """ + + api_path = '/backups/policies/{policyId}' + api_params = {} + if policy_id is None: + raise AppwriteException('Missing required parameter: "policy_id"') + + api_path = api_path.replace('{policyId}', policy_id) + + api_params['name'] = name + api_params['retention'] = retention + if schedule is not None: + api_params['schedule'] = schedule + api_params['enabled'] = enabled + + return self.client.call('patch', api_path, { + 'content-type': 'application/json', + }, api_params) + + def delete_policy(self, policy_id: str) -> Dict[str, Any]: + """ + Delete a policy using it's ID. + + Parameters + ---------- + policy_id : str + Policy 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. + + Returns + ------- + Dict[str, Any] + API response as a dictionary + + Raises + ------ + AppwriteException + If API request fails + """ + + api_path = '/backups/policies/{policyId}' + api_params = {} + if policy_id is None: + raise AppwriteException('Missing required parameter: "policy_id"') + + api_path = api_path.replace('{policyId}', policy_id) + + + return self.client.call('delete', api_path, { + 'content-type': 'application/json', + }, api_params) + + def create_restoration(self, archive_id: str, services: List[BackupServices], new_resource_id: Optional[str] = None, new_resource_name: Optional[str] = None) -> Dict[str, Any]: + """ + Create and trigger a new restoration for a backup on a project. + + Parameters + ---------- + archive_id : str + Backup archive ID to restore + services : List[BackupServices] + Array of services to restore + new_resource_id : Optional[str] + Unique 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. + new_resource_name : Optional[str] + Database name. Max length: 128 chars. + + Returns + ------- + Dict[str, Any] + API response as a dictionary + + Raises + ------ + AppwriteException + If API request fails + """ + + api_path = '/backups/restoration' + api_params = {} + if archive_id is None: + raise AppwriteException('Missing required parameter: "archive_id"') + + if services is None: + raise AppwriteException('Missing required parameter: "services"') + + + api_params['archiveId'] = archive_id + api_params['services'] = services + if new_resource_id is not None: + api_params['newResourceId'] = new_resource_id + if new_resource_name is not None: + api_params['newResourceName'] = new_resource_name + + return self.client.call('post', api_path, { + 'content-type': 'application/json', + }, api_params) + + def list_restorations(self, queries: Optional[List[str]] = None) -> Dict[str, Any]: + """ + List all backup restorations for a project. + + Parameters + ---------- + queries : Optional[List[str]] + 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. + + Returns + ------- + Dict[str, Any] + API response as a dictionary + + Raises + ------ + AppwriteException + If API request fails + """ + + api_path = '/backups/restorations' + api_params = {} + + if queries is not None: + api_params['queries'] = queries + + return self.client.call('get', api_path, { + }, api_params) + + def get_restoration(self, restoration_id: str) -> Dict[str, Any]: + """ + Get the current status of a backup restoration. + + Parameters + ---------- + restoration_id : str + Restoration ID. Choose a custom ID`. 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. + + Returns + ------- + Dict[str, Any] + API response as a dictionary + + Raises + ------ + AppwriteException + If API request fails + """ + + api_path = '/backups/restorations/{restorationId}' + api_params = {} + if restoration_id is None: + raise AppwriteException('Missing required parameter: "restoration_id"') + + api_path = api_path.replace('{restorationId}', restoration_id) + + + return self.client.call('get', api_path, { + }, api_params) diff --git a/appwrite/services/health.py b/appwrite/services/health.py index 47ab5635..fd017017 100644 --- a/appwrite/services/health.py +++ b/appwrite/services/health.py @@ -172,6 +172,64 @@ def get_queue_audits(self, threshold: Optional[float] = None) -> Dict[str, Any]: return self.client.call('get', api_path, { }, api_params) + def get_queue_billing_project_aggregation(self, threshold: Optional[float] = None) -> Dict[str, Any]: + """ + Get billing project aggregation queue. + + Parameters + ---------- + threshold : Optional[float] + Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000. + + Returns + ------- + Dict[str, Any] + API response as a dictionary + + Raises + ------ + AppwriteException + If API request fails + """ + + api_path = '/health/queue/billing-project-aggregation' + api_params = {} + + if threshold is not None: + api_params['threshold'] = threshold + + return self.client.call('get', api_path, { + }, api_params) + + def get_queue_billing_team_aggregation(self, threshold: Optional[float] = None) -> Dict[str, Any]: + """ + Get billing team aggregation queue. + + Parameters + ---------- + threshold : Optional[float] + Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000. + + Returns + ------- + Dict[str, Any] + API response as a dictionary + + Raises + ------ + AppwriteException + If API request fails + """ + + api_path = '/health/queue/billing-team-aggregation' + api_params = {} + + if threshold is not None: + api_params['threshold'] = threshold + + return self.client.call('get', api_path, { + }, api_params) + def get_queue_builds(self, threshold: Optional[float] = None) -> Dict[str, Any]: """ Get the number of builds that are waiting to be processed in the Appwrite internal queue server. @@ -201,6 +259,35 @@ def get_queue_builds(self, threshold: Optional[float] = None) -> Dict[str, Any]: return self.client.call('get', api_path, { }, api_params) + def get_queue_priority_builds(self, threshold: Optional[float] = None) -> Dict[str, Any]: + """ + Get the priority builds queue size. + + Parameters + ---------- + threshold : Optional[float] + Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 500. + + Returns + ------- + Dict[str, Any] + API response as a dictionary + + Raises + ------ + AppwriteException + If API request fails + """ + + api_path = '/health/queue/builds-priority' + api_params = {} + + if threshold is not None: + api_params['threshold'] = threshold + + return self.client.call('get', api_path, { + }, api_params) + def get_queue_certificates(self, threshold: Optional[float] = None) -> Dict[str, Any]: """ Get the number of certificates that are waiting to be issued against [Letsencrypt](https://letsencrypt.org/) in the Appwrite internal queue server. @@ -473,6 +560,35 @@ def get_queue_migrations(self, threshold: Optional[float] = None) -> Dict[str, A return self.client.call('get', api_path, { }, api_params) + def get_queue_region_manager(self, threshold: Optional[float] = None) -> Dict[str, Any]: + """ + Get region manager queue. + + Parameters + ---------- + threshold : Optional[float] + Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 100. + + Returns + ------- + Dict[str, Any] + API response as a dictionary + + Raises + ------ + AppwriteException + If API request fails + """ + + api_path = '/health/queue/region-manager' + api_params = {} + + if threshold is not None: + api_params['threshold'] = threshold + + return self.client.call('get', api_path, { + }, api_params) + def get_queue_stats_resources(self, threshold: Optional[float] = None) -> Dict[str, Any]: """ Get the number of metrics that are waiting to be processed in the Appwrite stats resources queue. @@ -531,6 +647,35 @@ def get_queue_usage(self, threshold: Optional[float] = None) -> Dict[str, Any]: return self.client.call('get', api_path, { }, api_params) + def get_queue_threats(self, threshold: Optional[float] = None) -> Dict[str, Any]: + """ + Get threats queue. + + Parameters + ---------- + threshold : Optional[float] + Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 100. + + Returns + ------- + Dict[str, Any] + API response as a dictionary + + Raises + ------ + AppwriteException + If API request fails + """ + + api_path = '/health/queue/threats' + api_params = {} + + if threshold is not None: + api_params['threshold'] = threshold + + return self.client.call('get', api_path, { + }, api_params) + def get_queue_webhooks(self, threshold: Optional[float] = None) -> Dict[str, Any]: """ Get the number of webhooks that are waiting to be processed in the Appwrite internal queue server. diff --git a/appwrite/services/organizations.py b/appwrite/services/organizations.py new file mode 100644 index 00000000..cc3172df --- /dev/null +++ b/appwrite/services/organizations.py @@ -0,0 +1,73 @@ +from ..service import Service +from typing import List, Dict, Any, Optional +from ..exception import AppwriteException +from appwrite.utils.deprecated import deprecated + +class Organizations(Service): + + def __init__(self, client) -> None: + super(Organizations, self).__init__(client) + + def delete(self, organization_id: str) -> Dict[str, Any]: + """ + Delete an organization. + + Parameters + ---------- + organization_id : str + Team ID. + + Returns + ------- + Dict[str, Any] + API response as a dictionary + + Raises + ------ + AppwriteException + If API request fails + """ + + api_path = '/organizations/{organizationId}' + api_params = {} + if organization_id is None: + raise AppwriteException('Missing required parameter: "organization_id"') + + api_path = api_path.replace('{organizationId}', organization_id) + + + return self.client.call('delete', api_path, { + 'content-type': 'application/json', + }, api_params) + + def estimation_delete_organization(self, organization_id: str) -> Dict[str, Any]: + """ + Get estimation for deleting an organization. + + Parameters + ---------- + organization_id : str + Team ID. + + Returns + ------- + Dict[str, Any] + API response as a dictionary + + Raises + ------ + AppwriteException + If API request fails + """ + + api_path = '/organizations/{organizationId}/estimations/delete-organization' + api_params = {} + if organization_id is None: + raise AppwriteException('Missing required parameter: "organization_id"') + + api_path = api_path.replace('{organizationId}', organization_id) + + + return self.client.call('patch', api_path, { + 'content-type': 'application/json', + }, api_params) diff --git a/appwrite/services/storage.py b/appwrite/services/storage.py index 655df2e1..36f993da 100644 --- a/appwrite/services/storage.py +++ b/appwrite/services/storage.py @@ -66,7 +66,7 @@ def create_bucket(self, bucket_id: str, name: str, permissions: Optional[List[st enabled : Optional[bool] Is bucket enabled? When set to 'disabled', users cannot access the files in this bucket but Server SDKs with and API key can still access the bucket. No files are lost when this is toggled. maximum_file_size : Optional[float] - Maximum file size allowed in bytes. Maximum allowed value is 30MB. + Maximum file size allowed in bytes. Maximum allowed value is 5GB. allowed_file_extensions : Optional[List[str]] Allowed file extensions. Maximum of 100 extensions are allowed, each 64 characters long. compression : Optional[Compression] @@ -170,7 +170,7 @@ def update_bucket(self, bucket_id: str, name: str, permissions: Optional[List[st enabled : Optional[bool] Is bucket enabled? When set to 'disabled', users cannot access the files in this bucket but Server SDKs with and API key can still access the bucket. No files are lost when this is toggled. maximum_file_size : Optional[float] - Maximum file size allowed in bytes. Maximum allowed value is 30MB. + Maximum file size allowed in bytes. Maximum allowed value is 5GB. allowed_file_extensions : Optional[List[str]] Allowed file extensions. Maximum of 100 extensions are allowed, each 64 characters long. compression : Optional[Compression] diff --git a/appwrite/services/teams.py b/appwrite/services/teams.py index a5dd4c3f..1e15296f 100644 --- a/appwrite/services/teams.py +++ b/appwrite/services/teams.py @@ -2,7 +2,6 @@ from typing import List, Dict, Any, Optional from ..exception import AppwriteException from appwrite.utils.deprecated import deprecated -from ..enums.roles import Roles; class Teams(Service): @@ -232,7 +231,7 @@ def list_memberships(self, team_id: str, queries: Optional[List[str]] = None, se return self.client.call('get', api_path, { }, api_params) - def create_membership(self, team_id: str, roles: List[Roles], email: Optional[str] = None, user_id: Optional[str] = None, phone: Optional[str] = None, url: Optional[str] = None, name: Optional[str] = None) -> Dict[str, Any]: + def create_membership(self, team_id: str, roles: List[str], email: Optional[str] = None, user_id: Optional[str] = None, phone: Optional[str] = None, url: Optional[str] = None, name: Optional[str] = None) -> Dict[str, Any]: """ Invite a new member to join your team. Provide an ID for existing users, or invite unregistered users using an email or phone number. If initiated from a Client SDK, Appwrite will send an email or sms with a link to join the team to the invited user, and an account will be created for them if one doesn't exist. If initiated from a Server SDK, the new member will be added automatically to the team. @@ -247,7 +246,7 @@ def create_membership(self, team_id: str, roles: List[Roles], email: Optional[st ---------- team_id : str Team ID. - roles : List[Roles] + roles : List[str] Array of strings. Use this param to set the user roles in the team. A role can be any string. Learn more about [roles and permissions](https://appwrite.io/docs/permissions). Maximum of 100 roles are allowed, each 32 characters long. email : Optional[str] Email of the new team member. @@ -334,7 +333,7 @@ def get_membership(self, team_id: str, membership_id: str) -> Dict[str, Any]: return self.client.call('get', api_path, { }, api_params) - def update_membership(self, team_id: str, membership_id: str, roles: List[Roles]) -> Dict[str, Any]: + def update_membership(self, team_id: str, membership_id: str, roles: List[str]) -> Dict[str, Any]: """ Modify the roles of a team member. Only team members with the owner role have access to this endpoint. Learn more about [roles and permissions](https://appwrite.io/docs/permissions). @@ -345,7 +344,7 @@ def update_membership(self, team_id: str, membership_id: str, roles: List[Roles] Team ID. membership_id : str Membership ID. - roles : List[Roles] + roles : List[str] An array of strings. Use this param to set the user's roles in the team. A role can be any string. Learn more about [roles and permissions](https://appwrite.io/docs/permissions). Maximum of 100 roles are allowed, each 32 characters long. Returns diff --git a/docs/examples/account/create-anonymous-session.md b/docs/examples/account/create-anonymous-session.md index d98cceaf..bf0aeab5 100644 --- a/docs/examples/account/create-anonymous-session.md +++ b/docs/examples/account/create-anonymous-session.md @@ -1,3 +1,4 @@ +```python from appwrite.client import Client from appwrite.services.account import Account @@ -9,3 +10,4 @@ client.set_session('') # The user session to authenticate with account = Account(client) result = account.create_anonymous_session() +``` diff --git a/docs/examples/account/create-email-password-session.md b/docs/examples/account/create-email-password-session.md index c69b50ad..5849f029 100644 --- a/docs/examples/account/create-email-password-session.md +++ b/docs/examples/account/create-email-password-session.md @@ -1,3 +1,4 @@ +```python from appwrite.client import Client from appwrite.services.account import Account @@ -12,3 +13,4 @@ result = account.create_email_password_session( email = 'email@example.com', password = 'password' ) +``` diff --git a/docs/examples/account/create-email-token.md b/docs/examples/account/create-email-token.md index 0e4f1b6a..4c783225 100644 --- a/docs/examples/account/create-email-token.md +++ b/docs/examples/account/create-email-token.md @@ -1,3 +1,4 @@ +```python from appwrite.client import Client from appwrite.services.account import Account @@ -13,3 +14,4 @@ result = account.create_email_token( email = 'email@example.com', phrase = False # optional ) +``` diff --git a/docs/examples/account/create-email-verification.md b/docs/examples/account/create-email-verification.md index a76a4bdb..87b1e5b7 100644 --- a/docs/examples/account/create-email-verification.md +++ b/docs/examples/account/create-email-verification.md @@ -1,3 +1,4 @@ +```python from appwrite.client import Client from appwrite.services.account import Account @@ -11,3 +12,4 @@ account = Account(client) result = account.create_email_verification( url = 'https://example.com' ) +``` diff --git a/docs/examples/account/create-jwt.md b/docs/examples/account/create-jwt.md index 6f95338c..d4c6d355 100644 --- a/docs/examples/account/create-jwt.md +++ b/docs/examples/account/create-jwt.md @@ -1,3 +1,4 @@ +```python from appwrite.client import Client from appwrite.services.account import Account @@ -11,3 +12,4 @@ account = Account(client) result = account.create_jwt( duration = 0 # optional ) +``` diff --git a/docs/examples/account/create-key.md b/docs/examples/account/create-key.md new file mode 100644 index 00000000..9e5a2191 --- /dev/null +++ b/docs/examples/account/create-key.md @@ -0,0 +1,18 @@ +```python +from appwrite.client import Client +from appwrite.services.account import Account +from appwrite.enums import Scopes + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID +client.set_session('') # The user session to authenticate with + +account = Account(client) + +result = account.create_key( + name = '', + scopes = [Scopes.ACCOUNT], + expire = '' # optional +) +``` diff --git a/docs/examples/account/create-magic-url-token.md b/docs/examples/account/create-magic-url-token.md index 439f2e74..f3a1670f 100644 --- a/docs/examples/account/create-magic-url-token.md +++ b/docs/examples/account/create-magic-url-token.md @@ -1,3 +1,4 @@ +```python from appwrite.client import Client from appwrite.services.account import Account @@ -14,3 +15,4 @@ result = account.create_magic_url_token( url = 'https://example.com', # optional phrase = False # optional ) +``` diff --git a/docs/examples/account/create-mfa-authenticator.md b/docs/examples/account/create-mfa-authenticator.md index 70cee1d6..784d2afc 100644 --- a/docs/examples/account/create-mfa-authenticator.md +++ b/docs/examples/account/create-mfa-authenticator.md @@ -1,3 +1,4 @@ +```python from appwrite.client import Client from appwrite.services.account import Account from appwrite.enums import AuthenticatorType @@ -12,3 +13,4 @@ account = Account(client) result = account.create_mfa_authenticator( type = AuthenticatorType.TOTP ) +``` diff --git a/docs/examples/account/create-mfa-challenge.md b/docs/examples/account/create-mfa-challenge.md index 85dcd7a9..712b7e2b 100644 --- a/docs/examples/account/create-mfa-challenge.md +++ b/docs/examples/account/create-mfa-challenge.md @@ -1,3 +1,4 @@ +```python from appwrite.client import Client from appwrite.services.account import Account from appwrite.enums import AuthenticationFactor @@ -12,3 +13,4 @@ account = Account(client) result = account.create_mfa_challenge( factor = AuthenticationFactor.EMAIL ) +``` diff --git a/docs/examples/account/create-mfa-recovery-codes.md b/docs/examples/account/create-mfa-recovery-codes.md index 69aaa609..2511cfb4 100644 --- a/docs/examples/account/create-mfa-recovery-codes.md +++ b/docs/examples/account/create-mfa-recovery-codes.md @@ -1,3 +1,4 @@ +```python from appwrite.client import Client from appwrite.services.account import Account @@ -9,3 +10,4 @@ client.set_session('') # The user session to authenticate with account = Account(client) result = account.create_mfa_recovery_codes() +``` diff --git a/docs/examples/account/create-o-auth-2-token.md b/docs/examples/account/create-o-auth-2-token.md index 4d4c0680..4ffa9ffb 100644 --- a/docs/examples/account/create-o-auth-2-token.md +++ b/docs/examples/account/create-o-auth-2-token.md @@ -1,3 +1,4 @@ +```python from appwrite.client import Client from appwrite.services.account import Account from appwrite.enums import OAuthProvider @@ -15,3 +16,4 @@ result = account.create_o_auth2_token( failure = 'https://example.com', # optional scopes = [] # optional ) +``` diff --git a/docs/examples/account/create-phone-token.md b/docs/examples/account/create-phone-token.md index 3b636697..c30cbf94 100644 --- a/docs/examples/account/create-phone-token.md +++ b/docs/examples/account/create-phone-token.md @@ -1,3 +1,4 @@ +```python from appwrite.client import Client from appwrite.services.account import Account @@ -12,3 +13,4 @@ result = account.create_phone_token( user_id = '', phone = '+12065550100' ) +``` diff --git a/docs/examples/account/create-phone-verification.md b/docs/examples/account/create-phone-verification.md index c130646b..50db6a94 100644 --- a/docs/examples/account/create-phone-verification.md +++ b/docs/examples/account/create-phone-verification.md @@ -1,3 +1,4 @@ +```python from appwrite.client import Client from appwrite.services.account import Account @@ -9,3 +10,4 @@ client.set_session('') # The user session to authenticate with account = Account(client) result = account.create_phone_verification() +``` diff --git a/docs/examples/account/create-recovery.md b/docs/examples/account/create-recovery.md index 51c17772..ecf596ca 100644 --- a/docs/examples/account/create-recovery.md +++ b/docs/examples/account/create-recovery.md @@ -1,3 +1,4 @@ +```python from appwrite.client import Client from appwrite.services.account import Account @@ -12,3 +13,4 @@ result = account.create_recovery( email = 'email@example.com', url = 'https://example.com' ) +``` diff --git a/docs/examples/account/create-session.md b/docs/examples/account/create-session.md index a05d4f24..27f07330 100644 --- a/docs/examples/account/create-session.md +++ b/docs/examples/account/create-session.md @@ -1,3 +1,4 @@ +```python from appwrite.client import Client from appwrite.services.account import Account @@ -12,3 +13,4 @@ result = account.create_session( user_id = '', secret = '' ) +``` diff --git a/docs/examples/account/create-verification.md b/docs/examples/account/create-verification.md index d66fc2cd..3330c233 100644 --- a/docs/examples/account/create-verification.md +++ b/docs/examples/account/create-verification.md @@ -1,3 +1,4 @@ +```python from appwrite.client import Client from appwrite.services.account import Account @@ -11,3 +12,4 @@ account = Account(client) result = account.create_verification( url = 'https://example.com' ) +``` diff --git a/docs/examples/account/create.md b/docs/examples/account/create.md index a0c09f10..1781c238 100644 --- a/docs/examples/account/create.md +++ b/docs/examples/account/create.md @@ -1,3 +1,4 @@ +```python from appwrite.client import Client from appwrite.services.account import Account @@ -14,3 +15,4 @@ result = account.create( password = '', name = '' # optional ) +``` diff --git a/docs/examples/account/delete-identity.md b/docs/examples/account/delete-identity.md index 0c894fa6..1ba48c20 100644 --- a/docs/examples/account/delete-identity.md +++ b/docs/examples/account/delete-identity.md @@ -1,3 +1,4 @@ +```python from appwrite.client import Client from appwrite.services.account import Account @@ -11,3 +12,4 @@ account = Account(client) result = account.delete_identity( identity_id = '' ) +``` diff --git a/docs/examples/account/delete-key.md b/docs/examples/account/delete-key.md new file mode 100644 index 00000000..aebc09eb --- /dev/null +++ b/docs/examples/account/delete-key.md @@ -0,0 +1,15 @@ +```python +from appwrite.client import Client +from appwrite.services.account import Account + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID +client.set_session('') # The user session to authenticate with + +account = Account(client) + +result = account.delete_key( + key_id = '' +) +``` diff --git a/docs/examples/account/delete-mfa-authenticator.md b/docs/examples/account/delete-mfa-authenticator.md index 83709c7a..faeccb8b 100644 --- a/docs/examples/account/delete-mfa-authenticator.md +++ b/docs/examples/account/delete-mfa-authenticator.md @@ -1,3 +1,4 @@ +```python from appwrite.client import Client from appwrite.services.account import Account from appwrite.enums import AuthenticatorType @@ -12,3 +13,4 @@ account = Account(client) result = account.delete_mfa_authenticator( type = AuthenticatorType.TOTP ) +``` diff --git a/docs/examples/account/delete-session.md b/docs/examples/account/delete-session.md index 5967d702..051a38a5 100644 --- a/docs/examples/account/delete-session.md +++ b/docs/examples/account/delete-session.md @@ -1,3 +1,4 @@ +```python from appwrite.client import Client from appwrite.services.account import Account @@ -11,3 +12,4 @@ account = Account(client) result = account.delete_session( session_id = '' ) +``` diff --git a/docs/examples/account/delete-sessions.md b/docs/examples/account/delete-sessions.md index 5061f84c..4db5c1ec 100644 --- a/docs/examples/account/delete-sessions.md +++ b/docs/examples/account/delete-sessions.md @@ -1,3 +1,4 @@ +```python from appwrite.client import Client from appwrite.services.account import Account @@ -9,3 +10,4 @@ client.set_session('') # The user session to authenticate with account = Account(client) result = account.delete_sessions() +``` diff --git a/docs/examples/account/get-key.md b/docs/examples/account/get-key.md new file mode 100644 index 00000000..2e60a61d --- /dev/null +++ b/docs/examples/account/get-key.md @@ -0,0 +1,15 @@ +```python +from appwrite.client import Client +from appwrite.services.account import Account + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID +client.set_session('') # The user session to authenticate with + +account = Account(client) + +result = account.get_key( + key_id = '' +) +``` diff --git a/docs/examples/account/get-mfa-recovery-codes.md b/docs/examples/account/get-mfa-recovery-codes.md index c8fe494d..bec99a18 100644 --- a/docs/examples/account/get-mfa-recovery-codes.md +++ b/docs/examples/account/get-mfa-recovery-codes.md @@ -1,3 +1,4 @@ +```python from appwrite.client import Client from appwrite.services.account import Account @@ -9,3 +10,4 @@ client.set_session('') # The user session to authenticate with account = Account(client) result = account.get_mfa_recovery_codes() +``` diff --git a/docs/examples/account/get-prefs.md b/docs/examples/account/get-prefs.md index d577b4b2..35603f21 100644 --- a/docs/examples/account/get-prefs.md +++ b/docs/examples/account/get-prefs.md @@ -1,3 +1,4 @@ +```python from appwrite.client import Client from appwrite.services.account import Account @@ -9,3 +10,4 @@ client.set_session('') # The user session to authenticate with account = Account(client) result = account.get_prefs() +``` diff --git a/docs/examples/account/get-session.md b/docs/examples/account/get-session.md index 3e2937b9..f978dfcb 100644 --- a/docs/examples/account/get-session.md +++ b/docs/examples/account/get-session.md @@ -1,3 +1,4 @@ +```python from appwrite.client import Client from appwrite.services.account import Account @@ -11,3 +12,4 @@ account = Account(client) result = account.get_session( session_id = '' ) +``` diff --git a/docs/examples/account/get.md b/docs/examples/account/get.md index 54262285..2ec458f3 100644 --- a/docs/examples/account/get.md +++ b/docs/examples/account/get.md @@ -1,3 +1,4 @@ +```python from appwrite.client import Client from appwrite.services.account import Account @@ -9,3 +10,4 @@ client.set_session('') # The user session to authenticate with account = Account(client) result = account.get() +``` diff --git a/docs/examples/account/list-identities.md b/docs/examples/account/list-identities.md index 78eef4b9..8ba86256 100644 --- a/docs/examples/account/list-identities.md +++ b/docs/examples/account/list-identities.md @@ -1,3 +1,4 @@ +```python from appwrite.client import Client from appwrite.services.account import Account @@ -12,3 +13,4 @@ result = account.list_identities( queries = [], # optional total = False # optional ) +``` diff --git a/docs/examples/account/list-keys.md b/docs/examples/account/list-keys.md new file mode 100644 index 00000000..7daebc58 --- /dev/null +++ b/docs/examples/account/list-keys.md @@ -0,0 +1,15 @@ +```python +from appwrite.client import Client +from appwrite.services.account import Account + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID +client.set_session('') # The user session to authenticate with + +account = Account(client) + +result = account.list_keys( + total = False # optional +) +``` diff --git a/docs/examples/account/list-logs.md b/docs/examples/account/list-logs.md index ae70fcb0..8f406384 100644 --- a/docs/examples/account/list-logs.md +++ b/docs/examples/account/list-logs.md @@ -1,3 +1,4 @@ +```python from appwrite.client import Client from appwrite.services.account import Account @@ -12,3 +13,4 @@ result = account.list_logs( queries = [], # optional total = False # optional ) +``` diff --git a/docs/examples/account/list-mfa-factors.md b/docs/examples/account/list-mfa-factors.md index 72a39246..9558fa15 100644 --- a/docs/examples/account/list-mfa-factors.md +++ b/docs/examples/account/list-mfa-factors.md @@ -1,3 +1,4 @@ +```python from appwrite.client import Client from appwrite.services.account import Account @@ -9,3 +10,4 @@ client.set_session('') # The user session to authenticate with account = Account(client) result = account.list_mfa_factors() +``` diff --git a/docs/examples/account/list-sessions.md b/docs/examples/account/list-sessions.md index c553a7bc..8603dc9b 100644 --- a/docs/examples/account/list-sessions.md +++ b/docs/examples/account/list-sessions.md @@ -1,3 +1,4 @@ +```python from appwrite.client import Client from appwrite.services.account import Account @@ -9,3 +10,4 @@ client.set_session('') # The user session to authenticate with account = Account(client) result = account.list_sessions() +``` diff --git a/docs/examples/account/update-email-verification.md b/docs/examples/account/update-email-verification.md index 5e99587e..51f0f482 100644 --- a/docs/examples/account/update-email-verification.md +++ b/docs/examples/account/update-email-verification.md @@ -1,3 +1,4 @@ +```python from appwrite.client import Client from appwrite.services.account import Account @@ -12,3 +13,4 @@ result = account.update_email_verification( user_id = '', secret = '' ) +``` diff --git a/docs/examples/account/update-email.md b/docs/examples/account/update-email.md index 14de4fd4..4b9f530d 100644 --- a/docs/examples/account/update-email.md +++ b/docs/examples/account/update-email.md @@ -1,3 +1,4 @@ +```python from appwrite.client import Client from appwrite.services.account import Account @@ -12,3 +13,4 @@ result = account.update_email( email = 'email@example.com', password = 'password' ) +``` diff --git a/docs/examples/account/update-key.md b/docs/examples/account/update-key.md new file mode 100644 index 00000000..0b5c9532 --- /dev/null +++ b/docs/examples/account/update-key.md @@ -0,0 +1,19 @@ +```python +from appwrite.client import Client +from appwrite.services.account import Account +from appwrite.enums import Scopes + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID +client.set_session('') # The user session to authenticate with + +account = Account(client) + +result = account.update_key( + key_id = '', + name = '', + scopes = [Scopes.ACCOUNT], + expire = '' # optional +) +``` diff --git a/docs/examples/account/update-magic-url-session.md b/docs/examples/account/update-magic-url-session.md index 60baca81..777c5d8e 100644 --- a/docs/examples/account/update-magic-url-session.md +++ b/docs/examples/account/update-magic-url-session.md @@ -1,3 +1,4 @@ +```python from appwrite.client import Client from appwrite.services.account import Account @@ -12,3 +13,4 @@ result = account.update_magic_url_session( user_id = '', secret = '' ) +``` diff --git a/docs/examples/account/update-mfa-authenticator.md b/docs/examples/account/update-mfa-authenticator.md index d53607fe..9fc0f8e5 100644 --- a/docs/examples/account/update-mfa-authenticator.md +++ b/docs/examples/account/update-mfa-authenticator.md @@ -1,3 +1,4 @@ +```python from appwrite.client import Client from appwrite.services.account import Account from appwrite.enums import AuthenticatorType @@ -13,3 +14,4 @@ result = account.update_mfa_authenticator( type = AuthenticatorType.TOTP, otp = '' ) +``` diff --git a/docs/examples/account/update-mfa-challenge.md b/docs/examples/account/update-mfa-challenge.md index cfc58c58..2da910b0 100644 --- a/docs/examples/account/update-mfa-challenge.md +++ b/docs/examples/account/update-mfa-challenge.md @@ -1,3 +1,4 @@ +```python from appwrite.client import Client from appwrite.services.account import Account @@ -12,3 +13,4 @@ result = account.update_mfa_challenge( challenge_id = '', otp = '' ) +``` diff --git a/docs/examples/account/update-mfa-recovery-codes.md b/docs/examples/account/update-mfa-recovery-codes.md index 51718eb0..2b74e1d0 100644 --- a/docs/examples/account/update-mfa-recovery-codes.md +++ b/docs/examples/account/update-mfa-recovery-codes.md @@ -1,3 +1,4 @@ +```python from appwrite.client import Client from appwrite.services.account import Account @@ -9,3 +10,4 @@ client.set_session('') # The user session to authenticate with account = Account(client) result = account.update_mfa_recovery_codes() +``` diff --git a/docs/examples/account/update-mfa.md b/docs/examples/account/update-mfa.md index 7083d096..43e4077a 100644 --- a/docs/examples/account/update-mfa.md +++ b/docs/examples/account/update-mfa.md @@ -1,3 +1,4 @@ +```python from appwrite.client import Client from appwrite.services.account import Account @@ -11,3 +12,4 @@ account = Account(client) result = account.update_mfa( mfa = False ) +``` diff --git a/docs/examples/account/update-name.md b/docs/examples/account/update-name.md index 534a94e8..d5b5df36 100644 --- a/docs/examples/account/update-name.md +++ b/docs/examples/account/update-name.md @@ -1,3 +1,4 @@ +```python from appwrite.client import Client from appwrite.services.account import Account @@ -11,3 +12,4 @@ account = Account(client) result = account.update_name( name = '' ) +``` diff --git a/docs/examples/account/update-password.md b/docs/examples/account/update-password.md index 3c072e32..aa09dbe2 100644 --- a/docs/examples/account/update-password.md +++ b/docs/examples/account/update-password.md @@ -1,3 +1,4 @@ +```python from appwrite.client import Client from appwrite.services.account import Account @@ -12,3 +13,4 @@ result = account.update_password( password = '', old_password = 'password' # optional ) +``` diff --git a/docs/examples/account/update-phone-session.md b/docs/examples/account/update-phone-session.md index 5fbba213..7fd599a1 100644 --- a/docs/examples/account/update-phone-session.md +++ b/docs/examples/account/update-phone-session.md @@ -1,3 +1,4 @@ +```python from appwrite.client import Client from appwrite.services.account import Account @@ -12,3 +13,4 @@ result = account.update_phone_session( user_id = '', secret = '' ) +``` diff --git a/docs/examples/account/update-phone-verification.md b/docs/examples/account/update-phone-verification.md index bcc57dee..1fa74a8b 100644 --- a/docs/examples/account/update-phone-verification.md +++ b/docs/examples/account/update-phone-verification.md @@ -1,3 +1,4 @@ +```python from appwrite.client import Client from appwrite.services.account import Account @@ -12,3 +13,4 @@ result = account.update_phone_verification( user_id = '', secret = '' ) +``` diff --git a/docs/examples/account/update-phone.md b/docs/examples/account/update-phone.md index a2cb7d3c..212bb2dc 100644 --- a/docs/examples/account/update-phone.md +++ b/docs/examples/account/update-phone.md @@ -1,3 +1,4 @@ +```python from appwrite.client import Client from appwrite.services.account import Account @@ -12,3 +13,4 @@ result = account.update_phone( phone = '+12065550100', password = 'password' ) +``` diff --git a/docs/examples/account/update-prefs.md b/docs/examples/account/update-prefs.md index 8981af83..0aa3fa90 100644 --- a/docs/examples/account/update-prefs.md +++ b/docs/examples/account/update-prefs.md @@ -1,3 +1,4 @@ +```python from appwrite.client import Client from appwrite.services.account import Account @@ -15,3 +16,4 @@ result = account.update_prefs( "darkTheme": True } ) +``` diff --git a/docs/examples/account/update-recovery.md b/docs/examples/account/update-recovery.md index ed140abc..8c14a3ab 100644 --- a/docs/examples/account/update-recovery.md +++ b/docs/examples/account/update-recovery.md @@ -1,3 +1,4 @@ +```python from appwrite.client import Client from appwrite.services.account import Account @@ -13,3 +14,4 @@ result = account.update_recovery( secret = '', password = '' ) +``` diff --git a/docs/examples/account/update-session.md b/docs/examples/account/update-session.md index abee773e..2b3082db 100644 --- a/docs/examples/account/update-session.md +++ b/docs/examples/account/update-session.md @@ -1,3 +1,4 @@ +```python from appwrite.client import Client from appwrite.services.account import Account @@ -11,3 +12,4 @@ account = Account(client) result = account.update_session( session_id = '' ) +``` diff --git a/docs/examples/account/update-status.md b/docs/examples/account/update-status.md index a5272f09..baf49617 100644 --- a/docs/examples/account/update-status.md +++ b/docs/examples/account/update-status.md @@ -1,3 +1,4 @@ +```python from appwrite.client import Client from appwrite.services.account import Account @@ -9,3 +10,4 @@ client.set_session('') # The user session to authenticate with account = Account(client) result = account.update_status() +``` diff --git a/docs/examples/account/update-verification.md b/docs/examples/account/update-verification.md index fbc7af53..9e49718e 100644 --- a/docs/examples/account/update-verification.md +++ b/docs/examples/account/update-verification.md @@ -1,3 +1,4 @@ +```python from appwrite.client import Client from appwrite.services.account import Account @@ -12,3 +13,4 @@ result = account.update_verification( user_id = '', secret = '' ) +``` diff --git a/docs/examples/avatars/get-browser.md b/docs/examples/avatars/get-browser.md index ff11b8b4..4e5b7a1b 100644 --- a/docs/examples/avatars/get-browser.md +++ b/docs/examples/avatars/get-browser.md @@ -1,3 +1,4 @@ +```python from appwrite.client import Client from appwrite.services.avatars import Avatars from appwrite.enums import Browser @@ -15,3 +16,4 @@ result = avatars.get_browser( height = 0, # optional quality = -1 # optional ) +``` diff --git a/docs/examples/avatars/get-credit-card.md b/docs/examples/avatars/get-credit-card.md index 286f4d34..58729157 100644 --- a/docs/examples/avatars/get-credit-card.md +++ b/docs/examples/avatars/get-credit-card.md @@ -1,3 +1,4 @@ +```python from appwrite.client import Client from appwrite.services.avatars import Avatars from appwrite.enums import CreditCard @@ -15,3 +16,4 @@ result = avatars.get_credit_card( height = 0, # optional quality = -1 # optional ) +``` diff --git a/docs/examples/avatars/get-favicon.md b/docs/examples/avatars/get-favicon.md index f034ea41..b201146c 100644 --- a/docs/examples/avatars/get-favicon.md +++ b/docs/examples/avatars/get-favicon.md @@ -1,3 +1,4 @@ +```python from appwrite.client import Client from appwrite.services.avatars import Avatars @@ -11,3 +12,4 @@ avatars = Avatars(client) result = avatars.get_favicon( url = 'https://example.com' ) +``` diff --git a/docs/examples/avatars/get-flag.md b/docs/examples/avatars/get-flag.md index 6365a78b..2bd0776a 100644 --- a/docs/examples/avatars/get-flag.md +++ b/docs/examples/avatars/get-flag.md @@ -1,3 +1,4 @@ +```python from appwrite.client import Client from appwrite.services.avatars import Avatars from appwrite.enums import Flag @@ -15,3 +16,4 @@ result = avatars.get_flag( height = 0, # optional quality = -1 # optional ) +``` diff --git a/docs/examples/avatars/get-image.md b/docs/examples/avatars/get-image.md index 9272c4d8..fa013f1a 100644 --- a/docs/examples/avatars/get-image.md +++ b/docs/examples/avatars/get-image.md @@ -1,3 +1,4 @@ +```python from appwrite.client import Client from appwrite.services.avatars import Avatars @@ -13,3 +14,4 @@ result = avatars.get_image( width = 0, # optional height = 0 # optional ) +``` diff --git a/docs/examples/avatars/get-initials.md b/docs/examples/avatars/get-initials.md index 2729ff51..2dff22a7 100644 --- a/docs/examples/avatars/get-initials.md +++ b/docs/examples/avatars/get-initials.md @@ -1,3 +1,4 @@ +```python from appwrite.client import Client from appwrite.services.avatars import Avatars @@ -14,3 +15,4 @@ result = avatars.get_initials( height = 0, # optional background = '' # optional ) +``` diff --git a/docs/examples/avatars/get-qr.md b/docs/examples/avatars/get-qr.md index 3fb76a7f..f3dbede1 100644 --- a/docs/examples/avatars/get-qr.md +++ b/docs/examples/avatars/get-qr.md @@ -1,3 +1,4 @@ +```python from appwrite.client import Client from appwrite.services.avatars import Avatars @@ -14,3 +15,4 @@ result = avatars.get_qr( margin = 0, # optional download = False # optional ) +``` diff --git a/docs/examples/avatars/get-screenshot.md b/docs/examples/avatars/get-screenshot.md index 6ad99db0..31587c31 100644 --- a/docs/examples/avatars/get-screenshot.md +++ b/docs/examples/avatars/get-screenshot.md @@ -1,3 +1,4 @@ +```python from appwrite.client import Client from appwrite.services.avatars import Avatars from appwrite.enums import Theme @@ -37,3 +38,4 @@ result = avatars.get_screenshot( quality = 85, # optional output = ImageFormat.JPEG # optional ) +``` diff --git a/docs/examples/backups/create-archive.md b/docs/examples/backups/create-archive.md new file mode 100644 index 00000000..5393fa31 --- /dev/null +++ b/docs/examples/backups/create-archive.md @@ -0,0 +1,17 @@ +```python +from appwrite.client import Client +from appwrite.services.backups import Backups +from appwrite.enums import BackupServices + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID +client.set_key('') # Your secret API key + +backups = Backups(client) + +result = backups.create_archive( + services = [BackupServices.DATABASES], + resource_id = '' # optional +) +``` diff --git a/docs/examples/backups/create-policy.md b/docs/examples/backups/create-policy.md new file mode 100644 index 00000000..74458b12 --- /dev/null +++ b/docs/examples/backups/create-policy.md @@ -0,0 +1,22 @@ +```python +from appwrite.client import Client +from appwrite.services.backups import Backups +from appwrite.enums import BackupServices + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID +client.set_key('') # Your secret API key + +backups = Backups(client) + +result = backups.create_policy( + policy_id = '', + services = [BackupServices.DATABASES], + retention = 1, + schedule = '', + name = '', # optional + resource_id = '', # optional + enabled = False # optional +) +``` diff --git a/docs/examples/backups/create-restoration.md b/docs/examples/backups/create-restoration.md new file mode 100644 index 00000000..31fb49a5 --- /dev/null +++ b/docs/examples/backups/create-restoration.md @@ -0,0 +1,19 @@ +```python +from appwrite.client import Client +from appwrite.services.backups import Backups +from appwrite.enums import BackupServices + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID +client.set_key('') # Your secret API key + +backups = Backups(client) + +result = backups.create_restoration( + archive_id = '', + services = [BackupServices.DATABASES], + new_resource_id = '', # optional + new_resource_name = '' # optional +) +``` diff --git a/docs/examples/backups/delete-archive.md b/docs/examples/backups/delete-archive.md new file mode 100644 index 00000000..106e9f0f --- /dev/null +++ b/docs/examples/backups/delete-archive.md @@ -0,0 +1,15 @@ +```python +from appwrite.client import Client +from appwrite.services.backups import Backups + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID +client.set_key('') # Your secret API key + +backups = Backups(client) + +result = backups.delete_archive( + archive_id = '' +) +``` diff --git a/docs/examples/backups/delete-policy.md b/docs/examples/backups/delete-policy.md new file mode 100644 index 00000000..0583a820 --- /dev/null +++ b/docs/examples/backups/delete-policy.md @@ -0,0 +1,15 @@ +```python +from appwrite.client import Client +from appwrite.services.backups import Backups + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID +client.set_key('') # Your secret API key + +backups = Backups(client) + +result = backups.delete_policy( + policy_id = '' +) +``` diff --git a/docs/examples/backups/get-archive.md b/docs/examples/backups/get-archive.md new file mode 100644 index 00000000..3aa3e4ef --- /dev/null +++ b/docs/examples/backups/get-archive.md @@ -0,0 +1,15 @@ +```python +from appwrite.client import Client +from appwrite.services.backups import Backups + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID +client.set_key('') # Your secret API key + +backups = Backups(client) + +result = backups.get_archive( + archive_id = '' +) +``` diff --git a/docs/examples/backups/get-policy.md b/docs/examples/backups/get-policy.md new file mode 100644 index 00000000..8ebea3ae --- /dev/null +++ b/docs/examples/backups/get-policy.md @@ -0,0 +1,15 @@ +```python +from appwrite.client import Client +from appwrite.services.backups import Backups + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID +client.set_key('') # Your secret API key + +backups = Backups(client) + +result = backups.get_policy( + policy_id = '' +) +``` diff --git a/docs/examples/backups/get-restoration.md b/docs/examples/backups/get-restoration.md new file mode 100644 index 00000000..5e8d004c --- /dev/null +++ b/docs/examples/backups/get-restoration.md @@ -0,0 +1,15 @@ +```python +from appwrite.client import Client +from appwrite.services.backups import Backups + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID +client.set_key('') # Your secret API key + +backups = Backups(client) + +result = backups.get_restoration( + restoration_id = '' +) +``` diff --git a/docs/examples/backups/list-archives.md b/docs/examples/backups/list-archives.md new file mode 100644 index 00000000..8ec0409b --- /dev/null +++ b/docs/examples/backups/list-archives.md @@ -0,0 +1,15 @@ +```python +from appwrite.client import Client +from appwrite.services.backups import Backups + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID +client.set_key('') # Your secret API key + +backups = Backups(client) + +result = backups.list_archives( + queries = [] # optional +) +``` diff --git a/docs/examples/backups/list-policies.md b/docs/examples/backups/list-policies.md new file mode 100644 index 00000000..33bbe8c4 --- /dev/null +++ b/docs/examples/backups/list-policies.md @@ -0,0 +1,15 @@ +```python +from appwrite.client import Client +from appwrite.services.backups import Backups + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID +client.set_key('') # Your secret API key + +backups = Backups(client) + +result = backups.list_policies( + queries = [] # optional +) +``` diff --git a/docs/examples/backups/list-restorations.md b/docs/examples/backups/list-restorations.md new file mode 100644 index 00000000..f26d8285 --- /dev/null +++ b/docs/examples/backups/list-restorations.md @@ -0,0 +1,15 @@ +```python +from appwrite.client import Client +from appwrite.services.backups import Backups + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID +client.set_key('') # Your secret API key + +backups = Backups(client) + +result = backups.list_restorations( + queries = [] # optional +) +``` diff --git a/docs/examples/backups/update-policy.md b/docs/examples/backups/update-policy.md new file mode 100644 index 00000000..99308d46 --- /dev/null +++ b/docs/examples/backups/update-policy.md @@ -0,0 +1,19 @@ +```python +from appwrite.client import Client +from appwrite.services.backups import Backups + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID +client.set_key('') # Your secret API key + +backups = Backups(client) + +result = backups.update_policy( + policy_id = '', + name = '', # optional + retention = 1, # optional + schedule = '', # optional + enabled = False # optional +) +``` diff --git a/docs/examples/databases/create-boolean-attribute.md b/docs/examples/databases/create-boolean-attribute.md index f12f446d..aff12686 100644 --- a/docs/examples/databases/create-boolean-attribute.md +++ b/docs/examples/databases/create-boolean-attribute.md @@ -1,3 +1,4 @@ +```python from appwrite.client import Client from appwrite.services.databases import Databases @@ -16,3 +17,4 @@ result = databases.create_boolean_attribute( default = False, # optional array = False # optional ) +``` diff --git a/docs/examples/databases/create-collection.md b/docs/examples/databases/create-collection.md index 196a9d55..f6244a06 100644 --- a/docs/examples/databases/create-collection.md +++ b/docs/examples/databases/create-collection.md @@ -1,3 +1,4 @@ +```python from appwrite.client import Client from appwrite.services.databases import Databases from appwrite.permission import Permission @@ -20,3 +21,4 @@ result = databases.create_collection( attributes = [], # optional indexes = [] # optional ) +``` diff --git a/docs/examples/databases/create-datetime-attribute.md b/docs/examples/databases/create-datetime-attribute.md index 8fd59e69..d4329bc2 100644 --- a/docs/examples/databases/create-datetime-attribute.md +++ b/docs/examples/databases/create-datetime-attribute.md @@ -1,3 +1,4 @@ +```python from appwrite.client import Client from appwrite.services.databases import Databases @@ -16,3 +17,4 @@ result = databases.create_datetime_attribute( default = '', # optional array = False # optional ) +``` diff --git a/docs/examples/databases/create-document.md b/docs/examples/databases/create-document.md index bd1e1c94..a08f15f8 100644 --- a/docs/examples/databases/create-document.md +++ b/docs/examples/databases/create-document.md @@ -1,3 +1,4 @@ +```python from appwrite.client import Client from appwrite.services.databases import Databases from appwrite.permission import Permission @@ -24,3 +25,4 @@ result = databases.create_document( permissions = [Permission.read(Role.any())], # optional transaction_id = '' # optional ) +``` diff --git a/docs/examples/databases/create-documents.md b/docs/examples/databases/create-documents.md index 97fa4c68..5e739d97 100644 --- a/docs/examples/databases/create-documents.md +++ b/docs/examples/databases/create-documents.md @@ -1,3 +1,4 @@ +```python from appwrite.client import Client from appwrite.services.databases import Databases @@ -14,3 +15,4 @@ result = databases.create_documents( documents = [], transaction_id = '' # optional ) +``` diff --git a/docs/examples/databases/create-email-attribute.md b/docs/examples/databases/create-email-attribute.md index 230567aa..07cf8f4a 100644 --- a/docs/examples/databases/create-email-attribute.md +++ b/docs/examples/databases/create-email-attribute.md @@ -1,3 +1,4 @@ +```python from appwrite.client import Client from appwrite.services.databases import Databases @@ -16,3 +17,4 @@ result = databases.create_email_attribute( default = 'email@example.com', # optional array = False # optional ) +``` diff --git a/docs/examples/databases/create-enum-attribute.md b/docs/examples/databases/create-enum-attribute.md index de1ceb9f..570e2a1b 100644 --- a/docs/examples/databases/create-enum-attribute.md +++ b/docs/examples/databases/create-enum-attribute.md @@ -1,3 +1,4 @@ +```python from appwrite.client import Client from appwrite.services.databases import Databases @@ -17,3 +18,4 @@ result = databases.create_enum_attribute( default = '', # optional array = False # optional ) +``` diff --git a/docs/examples/databases/create-float-attribute.md b/docs/examples/databases/create-float-attribute.md index 53305c8d..0ff954b1 100644 --- a/docs/examples/databases/create-float-attribute.md +++ b/docs/examples/databases/create-float-attribute.md @@ -1,3 +1,4 @@ +```python from appwrite.client import Client from appwrite.services.databases import Databases @@ -18,3 +19,4 @@ result = databases.create_float_attribute( default = None, # optional array = False # optional ) +``` diff --git a/docs/examples/databases/create-index.md b/docs/examples/databases/create-index.md index 8eb38c1c..8f61edee 100644 --- a/docs/examples/databases/create-index.md +++ b/docs/examples/databases/create-index.md @@ -1,3 +1,4 @@ +```python from appwrite.client import Client from appwrite.services.databases import Databases from appwrite.enums import IndexType @@ -19,3 +20,4 @@ result = databases.create_index( orders = [OrderBy.ASC], # optional lengths = [] # optional ) +``` diff --git a/docs/examples/databases/create-integer-attribute.md b/docs/examples/databases/create-integer-attribute.md index 92e8b0f8..9760b8ca 100644 --- a/docs/examples/databases/create-integer-attribute.md +++ b/docs/examples/databases/create-integer-attribute.md @@ -1,3 +1,4 @@ +```python from appwrite.client import Client from appwrite.services.databases import Databases @@ -18,3 +19,4 @@ result = databases.create_integer_attribute( default = None, # optional array = False # optional ) +``` diff --git a/docs/examples/databases/create-ip-attribute.md b/docs/examples/databases/create-ip-attribute.md index a7f424b2..24acfe05 100644 --- a/docs/examples/databases/create-ip-attribute.md +++ b/docs/examples/databases/create-ip-attribute.md @@ -1,3 +1,4 @@ +```python from appwrite.client import Client from appwrite.services.databases import Databases @@ -16,3 +17,4 @@ result = databases.create_ip_attribute( default = '', # optional array = False # optional ) +``` diff --git a/docs/examples/databases/create-line-attribute.md b/docs/examples/databases/create-line-attribute.md index c61be8fb..84dd47a3 100644 --- a/docs/examples/databases/create-line-attribute.md +++ b/docs/examples/databases/create-line-attribute.md @@ -1,3 +1,4 @@ +```python from appwrite.client import Client from appwrite.services.databases import Databases @@ -15,3 +16,4 @@ result = databases.create_line_attribute( required = False, default = [[1, 2], [3, 4], [5, 6]] # optional ) +``` diff --git a/docs/examples/databases/create-longtext-attribute.md b/docs/examples/databases/create-longtext-attribute.md index 348af9d9..f13e7235 100644 --- a/docs/examples/databases/create-longtext-attribute.md +++ b/docs/examples/databases/create-longtext-attribute.md @@ -1,3 +1,4 @@ +```python from appwrite.client import Client from appwrite.services.databases import Databases @@ -16,3 +17,4 @@ result = databases.create_longtext_attribute( default = '', # optional array = False # optional ) +``` diff --git a/docs/examples/databases/create-mediumtext-attribute.md b/docs/examples/databases/create-mediumtext-attribute.md index f7bf2a07..f053cfcb 100644 --- a/docs/examples/databases/create-mediumtext-attribute.md +++ b/docs/examples/databases/create-mediumtext-attribute.md @@ -1,3 +1,4 @@ +```python from appwrite.client import Client from appwrite.services.databases import Databases @@ -16,3 +17,4 @@ result = databases.create_mediumtext_attribute( default = '', # optional array = False # optional ) +``` diff --git a/docs/examples/databases/create-operations.md b/docs/examples/databases/create-operations.md index d8fc1fa7..9b3967dc 100644 --- a/docs/examples/databases/create-operations.md +++ b/docs/examples/databases/create-operations.md @@ -1,3 +1,4 @@ +```python from appwrite.client import Client from appwrite.services.databases import Databases @@ -22,3 +23,4 @@ result = databases.create_operations( } ] # optional ) +``` diff --git a/docs/examples/databases/create-point-attribute.md b/docs/examples/databases/create-point-attribute.md index 7acdb943..c6886a8f 100644 --- a/docs/examples/databases/create-point-attribute.md +++ b/docs/examples/databases/create-point-attribute.md @@ -1,3 +1,4 @@ +```python from appwrite.client import Client from appwrite.services.databases import Databases @@ -15,3 +16,4 @@ result = databases.create_point_attribute( required = False, default = [1, 2] # optional ) +``` diff --git a/docs/examples/databases/create-polygon-attribute.md b/docs/examples/databases/create-polygon-attribute.md index c727b719..79dd0f05 100644 --- a/docs/examples/databases/create-polygon-attribute.md +++ b/docs/examples/databases/create-polygon-attribute.md @@ -1,3 +1,4 @@ +```python from appwrite.client import Client from appwrite.services.databases import Databases @@ -15,3 +16,4 @@ result = databases.create_polygon_attribute( required = False, default = [[[1, 2], [3, 4], [5, 6], [1, 2]]] # optional ) +``` diff --git a/docs/examples/databases/create-relationship-attribute.md b/docs/examples/databases/create-relationship-attribute.md index ea859fcc..298386da 100644 --- a/docs/examples/databases/create-relationship-attribute.md +++ b/docs/examples/databases/create-relationship-attribute.md @@ -1,3 +1,4 @@ +```python from appwrite.client import Client from appwrite.services.databases import Databases from appwrite.enums import RelationshipType @@ -20,3 +21,4 @@ result = databases.create_relationship_attribute( two_way_key = '', # optional on_delete = RelationMutate.CASCADE # optional ) +``` diff --git a/docs/examples/databases/create-string-attribute.md b/docs/examples/databases/create-string-attribute.md index dc434ccc..f23aff8b 100644 --- a/docs/examples/databases/create-string-attribute.md +++ b/docs/examples/databases/create-string-attribute.md @@ -1,3 +1,4 @@ +```python from appwrite.client import Client from appwrite.services.databases import Databases @@ -18,3 +19,4 @@ result = databases.create_string_attribute( array = False, # optional encrypt = False # optional ) +``` diff --git a/docs/examples/databases/create-text-attribute.md b/docs/examples/databases/create-text-attribute.md index 3a3804ee..6365bc91 100644 --- a/docs/examples/databases/create-text-attribute.md +++ b/docs/examples/databases/create-text-attribute.md @@ -1,3 +1,4 @@ +```python from appwrite.client import Client from appwrite.services.databases import Databases @@ -16,3 +17,4 @@ result = databases.create_text_attribute( default = '', # optional array = False # optional ) +``` diff --git a/docs/examples/databases/create-transaction.md b/docs/examples/databases/create-transaction.md index a733b658..d391e27e 100644 --- a/docs/examples/databases/create-transaction.md +++ b/docs/examples/databases/create-transaction.md @@ -1,3 +1,4 @@ +```python from appwrite.client import Client from appwrite.services.databases import Databases @@ -11,3 +12,4 @@ databases = Databases(client) result = databases.create_transaction( ttl = 60 # optional ) +``` diff --git a/docs/examples/databases/create-url-attribute.md b/docs/examples/databases/create-url-attribute.md index af375733..6d7d9859 100644 --- a/docs/examples/databases/create-url-attribute.md +++ b/docs/examples/databases/create-url-attribute.md @@ -1,3 +1,4 @@ +```python from appwrite.client import Client from appwrite.services.databases import Databases @@ -16,3 +17,4 @@ result = databases.create_url_attribute( default = 'https://example.com', # optional array = False # optional ) +``` diff --git a/docs/examples/databases/create-varchar-attribute.md b/docs/examples/databases/create-varchar-attribute.md index 01823809..7ddecdf4 100644 --- a/docs/examples/databases/create-varchar-attribute.md +++ b/docs/examples/databases/create-varchar-attribute.md @@ -1,3 +1,4 @@ +```python from appwrite.client import Client from appwrite.services.databases import Databases @@ -17,3 +18,4 @@ result = databases.create_varchar_attribute( default = '', # optional array = False # optional ) +``` diff --git a/docs/examples/databases/create.md b/docs/examples/databases/create.md index 0492203e..98bff01d 100644 --- a/docs/examples/databases/create.md +++ b/docs/examples/databases/create.md @@ -1,3 +1,4 @@ +```python from appwrite.client import Client from appwrite.services.databases import Databases @@ -13,3 +14,4 @@ result = databases.create( name = '', enabled = False # optional ) +``` diff --git a/docs/examples/databases/decrement-document-attribute.md b/docs/examples/databases/decrement-document-attribute.md index 09ed9fcb..df296d01 100644 --- a/docs/examples/databases/decrement-document-attribute.md +++ b/docs/examples/databases/decrement-document-attribute.md @@ -1,3 +1,4 @@ +```python from appwrite.client import Client from appwrite.services.databases import Databases @@ -17,3 +18,4 @@ result = databases.decrement_document_attribute( min = None, # optional transaction_id = '' # optional ) +``` diff --git a/docs/examples/databases/delete-attribute.md b/docs/examples/databases/delete-attribute.md index e1c4eecd..ceda5de2 100644 --- a/docs/examples/databases/delete-attribute.md +++ b/docs/examples/databases/delete-attribute.md @@ -1,3 +1,4 @@ +```python from appwrite.client import Client from appwrite.services.databases import Databases @@ -13,3 +14,4 @@ result = databases.delete_attribute( collection_id = '', key = '' ) +``` diff --git a/docs/examples/databases/delete-collection.md b/docs/examples/databases/delete-collection.md index 02f1e1c5..ff486c58 100644 --- a/docs/examples/databases/delete-collection.md +++ b/docs/examples/databases/delete-collection.md @@ -1,3 +1,4 @@ +```python from appwrite.client import Client from appwrite.services.databases import Databases @@ -12,3 +13,4 @@ result = databases.delete_collection( database_id = '', collection_id = '' ) +``` diff --git a/docs/examples/databases/delete-document.md b/docs/examples/databases/delete-document.md index 89d85853..6a56cd2d 100644 --- a/docs/examples/databases/delete-document.md +++ b/docs/examples/databases/delete-document.md @@ -1,3 +1,4 @@ +```python from appwrite.client import Client from appwrite.services.databases import Databases @@ -14,3 +15,4 @@ result = databases.delete_document( document_id = '', transaction_id = '' # optional ) +``` diff --git a/docs/examples/databases/delete-documents.md b/docs/examples/databases/delete-documents.md index 63130fb0..b8185856 100644 --- a/docs/examples/databases/delete-documents.md +++ b/docs/examples/databases/delete-documents.md @@ -1,3 +1,4 @@ +```python from appwrite.client import Client from appwrite.services.databases import Databases @@ -14,3 +15,4 @@ result = databases.delete_documents( queries = [], # optional transaction_id = '' # optional ) +``` diff --git a/docs/examples/databases/delete-index.md b/docs/examples/databases/delete-index.md index 00600642..62fa4875 100644 --- a/docs/examples/databases/delete-index.md +++ b/docs/examples/databases/delete-index.md @@ -1,3 +1,4 @@ +```python from appwrite.client import Client from appwrite.services.databases import Databases @@ -13,3 +14,4 @@ result = databases.delete_index( collection_id = '', key = '' ) +``` diff --git a/docs/examples/databases/delete-transaction.md b/docs/examples/databases/delete-transaction.md index fab1f2a5..bbc0d975 100644 --- a/docs/examples/databases/delete-transaction.md +++ b/docs/examples/databases/delete-transaction.md @@ -1,3 +1,4 @@ +```python from appwrite.client import Client from appwrite.services.databases import Databases @@ -11,3 +12,4 @@ databases = Databases(client) result = databases.delete_transaction( transaction_id = '' ) +``` diff --git a/docs/examples/databases/delete.md b/docs/examples/databases/delete.md index be64e8c6..4bf78037 100644 --- a/docs/examples/databases/delete.md +++ b/docs/examples/databases/delete.md @@ -1,3 +1,4 @@ +```python from appwrite.client import Client from appwrite.services.databases import Databases @@ -11,3 +12,4 @@ databases = Databases(client) result = databases.delete( database_id = '' ) +``` diff --git a/docs/examples/databases/get-attribute.md b/docs/examples/databases/get-attribute.md index dcdb0a6e..0eb99c07 100644 --- a/docs/examples/databases/get-attribute.md +++ b/docs/examples/databases/get-attribute.md @@ -1,3 +1,4 @@ +```python from appwrite.client import Client from appwrite.services.databases import Databases @@ -13,3 +14,4 @@ result = databases.get_attribute( collection_id = '', key = '' ) +``` diff --git a/docs/examples/databases/get-collection.md b/docs/examples/databases/get-collection.md index 0833b4fd..f0085481 100644 --- a/docs/examples/databases/get-collection.md +++ b/docs/examples/databases/get-collection.md @@ -1,3 +1,4 @@ +```python from appwrite.client import Client from appwrite.services.databases import Databases @@ -12,3 +13,4 @@ result = databases.get_collection( database_id = '', collection_id = '' ) +``` diff --git a/docs/examples/databases/get-document.md b/docs/examples/databases/get-document.md index 6cd0bc2b..fb0ed4ac 100644 --- a/docs/examples/databases/get-document.md +++ b/docs/examples/databases/get-document.md @@ -1,3 +1,4 @@ +```python from appwrite.client import Client from appwrite.services.databases import Databases @@ -15,3 +16,4 @@ result = databases.get_document( queries = [], # optional transaction_id = '' # optional ) +``` diff --git a/docs/examples/databases/get-index.md b/docs/examples/databases/get-index.md index 69716830..7b5f67f7 100644 --- a/docs/examples/databases/get-index.md +++ b/docs/examples/databases/get-index.md @@ -1,3 +1,4 @@ +```python from appwrite.client import Client from appwrite.services.databases import Databases @@ -13,3 +14,4 @@ result = databases.get_index( collection_id = '', key = '' ) +``` diff --git a/docs/examples/databases/get-transaction.md b/docs/examples/databases/get-transaction.md index 2a89f3d8..4f9b4940 100644 --- a/docs/examples/databases/get-transaction.md +++ b/docs/examples/databases/get-transaction.md @@ -1,3 +1,4 @@ +```python from appwrite.client import Client from appwrite.services.databases import Databases @@ -11,3 +12,4 @@ databases = Databases(client) result = databases.get_transaction( transaction_id = '' ) +``` diff --git a/docs/examples/databases/get.md b/docs/examples/databases/get.md index c8191a37..c928b6b9 100644 --- a/docs/examples/databases/get.md +++ b/docs/examples/databases/get.md @@ -1,3 +1,4 @@ +```python from appwrite.client import Client from appwrite.services.databases import Databases @@ -11,3 +12,4 @@ databases = Databases(client) result = databases.get( database_id = '' ) +``` diff --git a/docs/examples/databases/increment-document-attribute.md b/docs/examples/databases/increment-document-attribute.md index 3e85656c..667e9279 100644 --- a/docs/examples/databases/increment-document-attribute.md +++ b/docs/examples/databases/increment-document-attribute.md @@ -1,3 +1,4 @@ +```python from appwrite.client import Client from appwrite.services.databases import Databases @@ -17,3 +18,4 @@ result = databases.increment_document_attribute( max = None, # optional transaction_id = '' # optional ) +``` diff --git a/docs/examples/databases/list-attributes.md b/docs/examples/databases/list-attributes.md index 85eb199b..c9cb51b7 100644 --- a/docs/examples/databases/list-attributes.md +++ b/docs/examples/databases/list-attributes.md @@ -1,3 +1,4 @@ +```python from appwrite.client import Client from appwrite.services.databases import Databases @@ -14,3 +15,4 @@ result = databases.list_attributes( queries = [], # optional total = False # optional ) +``` diff --git a/docs/examples/databases/list-collections.md b/docs/examples/databases/list-collections.md index ebb6c6e9..f14e7970 100644 --- a/docs/examples/databases/list-collections.md +++ b/docs/examples/databases/list-collections.md @@ -1,3 +1,4 @@ +```python from appwrite.client import Client from appwrite.services.databases import Databases @@ -14,3 +15,4 @@ result = databases.list_collections( search = '', # optional total = False # optional ) +``` diff --git a/docs/examples/databases/list-documents.md b/docs/examples/databases/list-documents.md index 2e633158..11ce444c 100644 --- a/docs/examples/databases/list-documents.md +++ b/docs/examples/databases/list-documents.md @@ -1,3 +1,4 @@ +```python from appwrite.client import Client from appwrite.services.databases import Databases @@ -15,3 +16,4 @@ result = databases.list_documents( transaction_id = '', # optional total = False # optional ) +``` diff --git a/docs/examples/databases/list-indexes.md b/docs/examples/databases/list-indexes.md index d1b99b85..95dd617b 100644 --- a/docs/examples/databases/list-indexes.md +++ b/docs/examples/databases/list-indexes.md @@ -1,3 +1,4 @@ +```python from appwrite.client import Client from appwrite.services.databases import Databases @@ -14,3 +15,4 @@ result = databases.list_indexes( queries = [], # optional total = False # optional ) +``` diff --git a/docs/examples/databases/list-transactions.md b/docs/examples/databases/list-transactions.md index a410c96b..f549f1ac 100644 --- a/docs/examples/databases/list-transactions.md +++ b/docs/examples/databases/list-transactions.md @@ -1,3 +1,4 @@ +```python from appwrite.client import Client from appwrite.services.databases import Databases @@ -11,3 +12,4 @@ databases = Databases(client) result = databases.list_transactions( queries = [] # optional ) +``` diff --git a/docs/examples/databases/list.md b/docs/examples/databases/list.md index 01dfd76b..b3f4de8f 100644 --- a/docs/examples/databases/list.md +++ b/docs/examples/databases/list.md @@ -1,3 +1,4 @@ +```python from appwrite.client import Client from appwrite.services.databases import Databases @@ -13,3 +14,4 @@ result = databases.list( search = '', # optional total = False # optional ) +``` diff --git a/docs/examples/databases/update-boolean-attribute.md b/docs/examples/databases/update-boolean-attribute.md index a0f72a49..b5ba3426 100644 --- a/docs/examples/databases/update-boolean-attribute.md +++ b/docs/examples/databases/update-boolean-attribute.md @@ -1,3 +1,4 @@ +```python from appwrite.client import Client from appwrite.services.databases import Databases @@ -16,3 +17,4 @@ result = databases.update_boolean_attribute( default = False, new_key = '' # optional ) +``` diff --git a/docs/examples/databases/update-collection.md b/docs/examples/databases/update-collection.md index 8fcc58cd..3f9462fb 100644 --- a/docs/examples/databases/update-collection.md +++ b/docs/examples/databases/update-collection.md @@ -1,3 +1,4 @@ +```python from appwrite.client import Client from appwrite.services.databases import Databases from appwrite.permission import Permission @@ -18,3 +19,4 @@ result = databases.update_collection( document_security = False, # optional enabled = False # optional ) +``` diff --git a/docs/examples/databases/update-datetime-attribute.md b/docs/examples/databases/update-datetime-attribute.md index 29bc6be4..da080f2a 100644 --- a/docs/examples/databases/update-datetime-attribute.md +++ b/docs/examples/databases/update-datetime-attribute.md @@ -1,3 +1,4 @@ +```python from appwrite.client import Client from appwrite.services.databases import Databases @@ -16,3 +17,4 @@ result = databases.update_datetime_attribute( default = '', new_key = '' # optional ) +``` diff --git a/docs/examples/databases/update-document.md b/docs/examples/databases/update-document.md index 91d233d0..b10cd5a5 100644 --- a/docs/examples/databases/update-document.md +++ b/docs/examples/databases/update-document.md @@ -1,3 +1,4 @@ +```python from appwrite.client import Client from appwrite.services.databases import Databases from appwrite.permission import Permission @@ -24,3 +25,4 @@ result = databases.update_document( permissions = [Permission.read(Role.any())], # optional transaction_id = '' # optional ) +``` diff --git a/docs/examples/databases/update-documents.md b/docs/examples/databases/update-documents.md index cbf6f646..6e0cd4fe 100644 --- a/docs/examples/databases/update-documents.md +++ b/docs/examples/databases/update-documents.md @@ -1,3 +1,4 @@ +```python from appwrite.client import Client from appwrite.services.databases import Databases @@ -21,3 +22,4 @@ result = databases.update_documents( queries = [], # optional transaction_id = '' # optional ) +``` diff --git a/docs/examples/databases/update-email-attribute.md b/docs/examples/databases/update-email-attribute.md index c833789a..fbafd983 100644 --- a/docs/examples/databases/update-email-attribute.md +++ b/docs/examples/databases/update-email-attribute.md @@ -1,3 +1,4 @@ +```python from appwrite.client import Client from appwrite.services.databases import Databases @@ -16,3 +17,4 @@ result = databases.update_email_attribute( default = 'email@example.com', new_key = '' # optional ) +``` diff --git a/docs/examples/databases/update-enum-attribute.md b/docs/examples/databases/update-enum-attribute.md index 6186a72a..0b9ab13b 100644 --- a/docs/examples/databases/update-enum-attribute.md +++ b/docs/examples/databases/update-enum-attribute.md @@ -1,3 +1,4 @@ +```python from appwrite.client import Client from appwrite.services.databases import Databases @@ -17,3 +18,4 @@ result = databases.update_enum_attribute( default = '', new_key = '' # optional ) +``` diff --git a/docs/examples/databases/update-float-attribute.md b/docs/examples/databases/update-float-attribute.md index 68cb7d79..13bc920b 100644 --- a/docs/examples/databases/update-float-attribute.md +++ b/docs/examples/databases/update-float-attribute.md @@ -1,3 +1,4 @@ +```python from appwrite.client import Client from appwrite.services.databases import Databases @@ -18,3 +19,4 @@ result = databases.update_float_attribute( max = None, # optional new_key = '' # optional ) +``` diff --git a/docs/examples/databases/update-integer-attribute.md b/docs/examples/databases/update-integer-attribute.md index 05c6bfe9..92ea3920 100644 --- a/docs/examples/databases/update-integer-attribute.md +++ b/docs/examples/databases/update-integer-attribute.md @@ -1,3 +1,4 @@ +```python from appwrite.client import Client from appwrite.services.databases import Databases @@ -18,3 +19,4 @@ result = databases.update_integer_attribute( max = None, # optional new_key = '' # optional ) +``` diff --git a/docs/examples/databases/update-ip-attribute.md b/docs/examples/databases/update-ip-attribute.md index 550d3af6..05e7d5fd 100644 --- a/docs/examples/databases/update-ip-attribute.md +++ b/docs/examples/databases/update-ip-attribute.md @@ -1,3 +1,4 @@ +```python from appwrite.client import Client from appwrite.services.databases import Databases @@ -16,3 +17,4 @@ result = databases.update_ip_attribute( default = '', new_key = '' # optional ) +``` diff --git a/docs/examples/databases/update-line-attribute.md b/docs/examples/databases/update-line-attribute.md index b1804f64..b29b55fa 100644 --- a/docs/examples/databases/update-line-attribute.md +++ b/docs/examples/databases/update-line-attribute.md @@ -1,3 +1,4 @@ +```python from appwrite.client import Client from appwrite.services.databases import Databases @@ -16,3 +17,4 @@ result = databases.update_line_attribute( default = [[1, 2], [3, 4], [5, 6]], # optional new_key = '' # optional ) +``` diff --git a/docs/examples/databases/update-longtext-attribute.md b/docs/examples/databases/update-longtext-attribute.md index 8f2b5deb..71649fef 100644 --- a/docs/examples/databases/update-longtext-attribute.md +++ b/docs/examples/databases/update-longtext-attribute.md @@ -1,3 +1,4 @@ +```python from appwrite.client import Client from appwrite.services.databases import Databases @@ -16,3 +17,4 @@ result = databases.update_longtext_attribute( default = '', new_key = '' # optional ) +``` diff --git a/docs/examples/databases/update-mediumtext-attribute.md b/docs/examples/databases/update-mediumtext-attribute.md index a368cf19..756c95b7 100644 --- a/docs/examples/databases/update-mediumtext-attribute.md +++ b/docs/examples/databases/update-mediumtext-attribute.md @@ -1,3 +1,4 @@ +```python from appwrite.client import Client from appwrite.services.databases import Databases @@ -16,3 +17,4 @@ result = databases.update_mediumtext_attribute( default = '', new_key = '' # optional ) +``` diff --git a/docs/examples/databases/update-point-attribute.md b/docs/examples/databases/update-point-attribute.md index 58def4b6..cd6ee176 100644 --- a/docs/examples/databases/update-point-attribute.md +++ b/docs/examples/databases/update-point-attribute.md @@ -1,3 +1,4 @@ +```python from appwrite.client import Client from appwrite.services.databases import Databases @@ -16,3 +17,4 @@ result = databases.update_point_attribute( default = [1, 2], # optional new_key = '' # optional ) +``` diff --git a/docs/examples/databases/update-polygon-attribute.md b/docs/examples/databases/update-polygon-attribute.md index c3625fe3..fa5fc680 100644 --- a/docs/examples/databases/update-polygon-attribute.md +++ b/docs/examples/databases/update-polygon-attribute.md @@ -1,3 +1,4 @@ +```python from appwrite.client import Client from appwrite.services.databases import Databases @@ -16,3 +17,4 @@ result = databases.update_polygon_attribute( default = [[[1, 2], [3, 4], [5, 6], [1, 2]]], # optional new_key = '' # optional ) +``` diff --git a/docs/examples/databases/update-relationship-attribute.md b/docs/examples/databases/update-relationship-attribute.md index 8f5b0d8e..62c8d4a6 100644 --- a/docs/examples/databases/update-relationship-attribute.md +++ b/docs/examples/databases/update-relationship-attribute.md @@ -1,3 +1,4 @@ +```python from appwrite.client import Client from appwrite.services.databases import Databases from appwrite.enums import RelationMutate @@ -16,3 +17,4 @@ result = databases.update_relationship_attribute( on_delete = RelationMutate.CASCADE, # optional new_key = '' # optional ) +``` diff --git a/docs/examples/databases/update-string-attribute.md b/docs/examples/databases/update-string-attribute.md index 5b66fb01..e97d132e 100644 --- a/docs/examples/databases/update-string-attribute.md +++ b/docs/examples/databases/update-string-attribute.md @@ -1,3 +1,4 @@ +```python from appwrite.client import Client from appwrite.services.databases import Databases @@ -17,3 +18,4 @@ result = databases.update_string_attribute( size = 1, # optional new_key = '' # optional ) +``` diff --git a/docs/examples/databases/update-text-attribute.md b/docs/examples/databases/update-text-attribute.md index cfbbd8c6..b7c553d8 100644 --- a/docs/examples/databases/update-text-attribute.md +++ b/docs/examples/databases/update-text-attribute.md @@ -1,3 +1,4 @@ +```python from appwrite.client import Client from appwrite.services.databases import Databases @@ -16,3 +17,4 @@ result = databases.update_text_attribute( default = '', new_key = '' # optional ) +``` diff --git a/docs/examples/databases/update-transaction.md b/docs/examples/databases/update-transaction.md index 571f98c7..8ccb7463 100644 --- a/docs/examples/databases/update-transaction.md +++ b/docs/examples/databases/update-transaction.md @@ -1,3 +1,4 @@ +```python from appwrite.client import Client from appwrite.services.databases import Databases @@ -13,3 +14,4 @@ result = databases.update_transaction( commit = False, # optional rollback = False # optional ) +``` diff --git a/docs/examples/databases/update-url-attribute.md b/docs/examples/databases/update-url-attribute.md index 4a620276..56e2c1c7 100644 --- a/docs/examples/databases/update-url-attribute.md +++ b/docs/examples/databases/update-url-attribute.md @@ -1,3 +1,4 @@ +```python from appwrite.client import Client from appwrite.services.databases import Databases @@ -16,3 +17,4 @@ result = databases.update_url_attribute( default = 'https://example.com', new_key = '' # optional ) +``` diff --git a/docs/examples/databases/update-varchar-attribute.md b/docs/examples/databases/update-varchar-attribute.md index 359e3071..3504e8db 100644 --- a/docs/examples/databases/update-varchar-attribute.md +++ b/docs/examples/databases/update-varchar-attribute.md @@ -1,3 +1,4 @@ +```python from appwrite.client import Client from appwrite.services.databases import Databases @@ -17,3 +18,4 @@ result = databases.update_varchar_attribute( size = 1, # optional new_key = '' # optional ) +``` diff --git a/docs/examples/databases/update.md b/docs/examples/databases/update.md index c88c389a..864a8970 100644 --- a/docs/examples/databases/update.md +++ b/docs/examples/databases/update.md @@ -1,3 +1,4 @@ +```python from appwrite.client import Client from appwrite.services.databases import Databases @@ -13,3 +14,4 @@ result = databases.update( name = '', # optional enabled = False # optional ) +``` diff --git a/docs/examples/databases/upsert-document.md b/docs/examples/databases/upsert-document.md index 0d0f1b21..bc097e98 100644 --- a/docs/examples/databases/upsert-document.md +++ b/docs/examples/databases/upsert-document.md @@ -1,3 +1,4 @@ +```python from appwrite.client import Client from appwrite.services.databases import Databases from appwrite.permission import Permission @@ -24,3 +25,4 @@ result = databases.upsert_document( permissions = [Permission.read(Role.any())], # optional transaction_id = '' # optional ) +``` diff --git a/docs/examples/databases/upsert-documents.md b/docs/examples/databases/upsert-documents.md index f0720e34..ca091c4e 100644 --- a/docs/examples/databases/upsert-documents.md +++ b/docs/examples/databases/upsert-documents.md @@ -1,3 +1,4 @@ +```python from appwrite.client import Client from appwrite.services.databases import Databases @@ -14,3 +15,4 @@ result = databases.upsert_documents( documents = [], transaction_id = '' # optional ) +``` diff --git a/docs/examples/functions/create-deployment.md b/docs/examples/functions/create-deployment.md index 07740057..a7676480 100644 --- a/docs/examples/functions/create-deployment.md +++ b/docs/examples/functions/create-deployment.md @@ -1,3 +1,4 @@ +```python from appwrite.client import Client from appwrite.services.functions import Functions from appwrite.input_file import InputFile @@ -16,3 +17,4 @@ result = functions.create_deployment( entrypoint = '', # optional commands = '' # optional ) +``` diff --git a/docs/examples/functions/create-duplicate-deployment.md b/docs/examples/functions/create-duplicate-deployment.md index 79315e4a..5005b211 100644 --- a/docs/examples/functions/create-duplicate-deployment.md +++ b/docs/examples/functions/create-duplicate-deployment.md @@ -1,3 +1,4 @@ +```python from appwrite.client import Client from appwrite.services.functions import Functions @@ -13,3 +14,4 @@ result = functions.create_duplicate_deployment( deployment_id = '', build_id = '' # optional ) +``` diff --git a/docs/examples/functions/create-execution.md b/docs/examples/functions/create-execution.md index 8361351b..c1b4b911 100644 --- a/docs/examples/functions/create-execution.md +++ b/docs/examples/functions/create-execution.md @@ -1,3 +1,4 @@ +```python from appwrite.client import Client from appwrite.services.functions import Functions from appwrite.enums import ExecutionMethod @@ -18,3 +19,4 @@ result = functions.create_execution( headers = {}, # optional scheduled_at = '' # optional ) +``` diff --git a/docs/examples/functions/create-template-deployment.md b/docs/examples/functions/create-template-deployment.md index db2058a8..6df7dd1b 100644 --- a/docs/examples/functions/create-template-deployment.md +++ b/docs/examples/functions/create-template-deployment.md @@ -1,3 +1,4 @@ +```python from appwrite.client import Client from appwrite.services.functions import Functions from appwrite.enums import TemplateReferenceType @@ -18,3 +19,4 @@ result = functions.create_template_deployment( reference = '', activate = False # optional ) +``` diff --git a/docs/examples/functions/create-variable.md b/docs/examples/functions/create-variable.md index 2089830e..046310fb 100644 --- a/docs/examples/functions/create-variable.md +++ b/docs/examples/functions/create-variable.md @@ -1,3 +1,4 @@ +```python from appwrite.client import Client from appwrite.services.functions import Functions @@ -14,3 +15,4 @@ result = functions.create_variable( value = '', secret = False # optional ) +``` diff --git a/docs/examples/functions/create-vcs-deployment.md b/docs/examples/functions/create-vcs-deployment.md index 43e198b4..1ebf5267 100644 --- a/docs/examples/functions/create-vcs-deployment.md +++ b/docs/examples/functions/create-vcs-deployment.md @@ -1,3 +1,4 @@ +```python from appwrite.client import Client from appwrite.services.functions import Functions from appwrite.enums import VCSReferenceType @@ -15,3 +16,4 @@ result = functions.create_vcs_deployment( reference = '', activate = False # optional ) +``` diff --git a/docs/examples/functions/create.md b/docs/examples/functions/create.md index 6f4acab4..21906925 100644 --- a/docs/examples/functions/create.md +++ b/docs/examples/functions/create.md @@ -1,3 +1,4 @@ +```python from appwrite.client import Client from appwrite.services.functions import Functions from appwrite.enums import Runtime @@ -30,3 +31,4 @@ result = functions.create( provider_root_directory = '', # optional specification = '' # optional ) +``` diff --git a/docs/examples/functions/delete-deployment.md b/docs/examples/functions/delete-deployment.md index f874b2d2..72abfb74 100644 --- a/docs/examples/functions/delete-deployment.md +++ b/docs/examples/functions/delete-deployment.md @@ -1,3 +1,4 @@ +```python from appwrite.client import Client from appwrite.services.functions import Functions @@ -12,3 +13,4 @@ result = functions.delete_deployment( function_id = '', deployment_id = '' ) +``` diff --git a/docs/examples/functions/delete-execution.md b/docs/examples/functions/delete-execution.md index df7ce7cb..634bfef7 100644 --- a/docs/examples/functions/delete-execution.md +++ b/docs/examples/functions/delete-execution.md @@ -1,3 +1,4 @@ +```python from appwrite.client import Client from appwrite.services.functions import Functions @@ -12,3 +13,4 @@ result = functions.delete_execution( function_id = '', execution_id = '' ) +``` diff --git a/docs/examples/functions/delete-variable.md b/docs/examples/functions/delete-variable.md index a6e3dc85..e93cd9c5 100644 --- a/docs/examples/functions/delete-variable.md +++ b/docs/examples/functions/delete-variable.md @@ -1,3 +1,4 @@ +```python from appwrite.client import Client from appwrite.services.functions import Functions @@ -12,3 +13,4 @@ result = functions.delete_variable( function_id = '', variable_id = '' ) +``` diff --git a/docs/examples/functions/delete.md b/docs/examples/functions/delete.md index ed2fef76..ebd09f47 100644 --- a/docs/examples/functions/delete.md +++ b/docs/examples/functions/delete.md @@ -1,3 +1,4 @@ +```python from appwrite.client import Client from appwrite.services.functions import Functions @@ -11,3 +12,4 @@ functions = Functions(client) result = functions.delete( function_id = '' ) +``` diff --git a/docs/examples/functions/get-deployment-download.md b/docs/examples/functions/get-deployment-download.md index c633a893..b68345a3 100644 --- a/docs/examples/functions/get-deployment-download.md +++ b/docs/examples/functions/get-deployment-download.md @@ -1,3 +1,4 @@ +```python from appwrite.client import Client from appwrite.services.functions import Functions from appwrite.enums import DeploymentDownloadType @@ -14,3 +15,4 @@ result = functions.get_deployment_download( deployment_id = '', type = DeploymentDownloadType.SOURCE # optional ) +``` diff --git a/docs/examples/functions/get-deployment.md b/docs/examples/functions/get-deployment.md index 59a1374e..03b04f64 100644 --- a/docs/examples/functions/get-deployment.md +++ b/docs/examples/functions/get-deployment.md @@ -1,3 +1,4 @@ +```python from appwrite.client import Client from appwrite.services.functions import Functions @@ -12,3 +13,4 @@ result = functions.get_deployment( function_id = '', deployment_id = '' ) +``` diff --git a/docs/examples/functions/get-execution.md b/docs/examples/functions/get-execution.md index a299f351..a2fe5668 100644 --- a/docs/examples/functions/get-execution.md +++ b/docs/examples/functions/get-execution.md @@ -1,3 +1,4 @@ +```python from appwrite.client import Client from appwrite.services.functions import Functions @@ -12,3 +13,4 @@ result = functions.get_execution( function_id = '', execution_id = '' ) +``` diff --git a/docs/examples/functions/get-variable.md b/docs/examples/functions/get-variable.md index 629948e9..0cc3807b 100644 --- a/docs/examples/functions/get-variable.md +++ b/docs/examples/functions/get-variable.md @@ -1,3 +1,4 @@ +```python from appwrite.client import Client from appwrite.services.functions import Functions @@ -12,3 +13,4 @@ result = functions.get_variable( function_id = '', variable_id = '' ) +``` diff --git a/docs/examples/functions/get.md b/docs/examples/functions/get.md index eeab5a55..7bf7ff25 100644 --- a/docs/examples/functions/get.md +++ b/docs/examples/functions/get.md @@ -1,3 +1,4 @@ +```python from appwrite.client import Client from appwrite.services.functions import Functions @@ -11,3 +12,4 @@ functions = Functions(client) result = functions.get( function_id = '' ) +``` diff --git a/docs/examples/functions/list-deployments.md b/docs/examples/functions/list-deployments.md index 26d36136..45d5412a 100644 --- a/docs/examples/functions/list-deployments.md +++ b/docs/examples/functions/list-deployments.md @@ -1,3 +1,4 @@ +```python from appwrite.client import Client from appwrite.services.functions import Functions @@ -14,3 +15,4 @@ result = functions.list_deployments( search = '', # optional total = False # optional ) +``` diff --git a/docs/examples/functions/list-executions.md b/docs/examples/functions/list-executions.md index 60fe38e6..da65054e 100644 --- a/docs/examples/functions/list-executions.md +++ b/docs/examples/functions/list-executions.md @@ -1,3 +1,4 @@ +```python from appwrite.client import Client from appwrite.services.functions import Functions @@ -13,3 +14,4 @@ result = functions.list_executions( queries = [], # optional total = False # optional ) +``` diff --git a/docs/examples/functions/list-runtimes.md b/docs/examples/functions/list-runtimes.md index 9c89a36f..3e7000ab 100644 --- a/docs/examples/functions/list-runtimes.md +++ b/docs/examples/functions/list-runtimes.md @@ -1,3 +1,4 @@ +```python from appwrite.client import Client from appwrite.services.functions import Functions @@ -9,3 +10,4 @@ client.set_key('') # Your secret API key functions = Functions(client) result = functions.list_runtimes() +``` diff --git a/docs/examples/functions/list-specifications.md b/docs/examples/functions/list-specifications.md index d7d0036d..f491a127 100644 --- a/docs/examples/functions/list-specifications.md +++ b/docs/examples/functions/list-specifications.md @@ -1,3 +1,4 @@ +```python from appwrite.client import Client from appwrite.services.functions import Functions @@ -9,3 +10,4 @@ client.set_key('') # Your secret API key functions = Functions(client) result = functions.list_specifications() +``` diff --git a/docs/examples/functions/list-variables.md b/docs/examples/functions/list-variables.md index ebc19c5b..41455037 100644 --- a/docs/examples/functions/list-variables.md +++ b/docs/examples/functions/list-variables.md @@ -1,3 +1,4 @@ +```python from appwrite.client import Client from appwrite.services.functions import Functions @@ -11,3 +12,4 @@ functions = Functions(client) result = functions.list_variables( function_id = '' ) +``` diff --git a/docs/examples/functions/list.md b/docs/examples/functions/list.md index 99a54675..3c6adec9 100644 --- a/docs/examples/functions/list.md +++ b/docs/examples/functions/list.md @@ -1,3 +1,4 @@ +```python from appwrite.client import Client from appwrite.services.functions import Functions @@ -13,3 +14,4 @@ result = functions.list( search = '', # optional total = False # optional ) +``` diff --git a/docs/examples/functions/update-deployment-status.md b/docs/examples/functions/update-deployment-status.md index 6c6a8bf1..15c2e0df 100644 --- a/docs/examples/functions/update-deployment-status.md +++ b/docs/examples/functions/update-deployment-status.md @@ -1,3 +1,4 @@ +```python from appwrite.client import Client from appwrite.services.functions import Functions @@ -12,3 +13,4 @@ result = functions.update_deployment_status( function_id = '', deployment_id = '' ) +``` diff --git a/docs/examples/functions/update-function-deployment.md b/docs/examples/functions/update-function-deployment.md index da143091..90eff8bb 100644 --- a/docs/examples/functions/update-function-deployment.md +++ b/docs/examples/functions/update-function-deployment.md @@ -1,3 +1,4 @@ +```python from appwrite.client import Client from appwrite.services.functions import Functions @@ -12,3 +13,4 @@ result = functions.update_function_deployment( function_id = '', deployment_id = '' ) +``` diff --git a/docs/examples/functions/update-variable.md b/docs/examples/functions/update-variable.md index f8bcc037..10176d0f 100644 --- a/docs/examples/functions/update-variable.md +++ b/docs/examples/functions/update-variable.md @@ -1,3 +1,4 @@ +```python from appwrite.client import Client from appwrite.services.functions import Functions @@ -15,3 +16,4 @@ result = functions.update_variable( value = '', # optional secret = False # optional ) +``` diff --git a/docs/examples/functions/update.md b/docs/examples/functions/update.md index 02fd751f..fd991515 100644 --- a/docs/examples/functions/update.md +++ b/docs/examples/functions/update.md @@ -1,3 +1,4 @@ +```python from appwrite.client import Client from appwrite.services.functions import Functions from appwrite.enums import Runtime @@ -30,3 +31,4 @@ result = functions.update( provider_root_directory = '', # optional specification = '' # optional ) +``` diff --git a/docs/examples/graphql/mutation.md b/docs/examples/graphql/mutation.md index 189892a4..26ed1cbe 100644 --- a/docs/examples/graphql/mutation.md +++ b/docs/examples/graphql/mutation.md @@ -1,3 +1,4 @@ +```python from appwrite.client import Client from appwrite.services.graphql import Graphql @@ -11,3 +12,4 @@ graphql = Graphql(client) result = graphql.mutation( query = {} ) +``` diff --git a/docs/examples/graphql/query.md b/docs/examples/graphql/query.md index 585a5029..94142f99 100644 --- a/docs/examples/graphql/query.md +++ b/docs/examples/graphql/query.md @@ -1,3 +1,4 @@ +```python from appwrite.client import Client from appwrite.services.graphql import Graphql @@ -11,3 +12,4 @@ graphql = Graphql(client) result = graphql.query( query = {} ) +``` diff --git a/docs/examples/health/get-antivirus.md b/docs/examples/health/get-antivirus.md index 2b621472..a3bd10b9 100644 --- a/docs/examples/health/get-antivirus.md +++ b/docs/examples/health/get-antivirus.md @@ -1,3 +1,4 @@ +```python from appwrite.client import Client from appwrite.services.health import Health @@ -9,3 +10,4 @@ client.set_key('') # Your secret API key health = Health(client) result = health.get_antivirus() +``` diff --git a/docs/examples/health/get-cache.md b/docs/examples/health/get-cache.md index 595c4bf0..3e0bd15c 100644 --- a/docs/examples/health/get-cache.md +++ b/docs/examples/health/get-cache.md @@ -1,3 +1,4 @@ +```python from appwrite.client import Client from appwrite.services.health import Health @@ -9,3 +10,4 @@ client.set_key('') # Your secret API key health = Health(client) result = health.get_cache() +``` diff --git a/docs/examples/health/get-certificate.md b/docs/examples/health/get-certificate.md index 5b3e2c0a..6fa8c862 100644 --- a/docs/examples/health/get-certificate.md +++ b/docs/examples/health/get-certificate.md @@ -1,3 +1,4 @@ +```python from appwrite.client import Client from appwrite.services.health import Health @@ -11,3 +12,4 @@ health = Health(client) result = health.get_certificate( domain = '' # optional ) +``` diff --git a/docs/examples/health/get-db.md b/docs/examples/health/get-db.md index 47c7bd8e..69414aae 100644 --- a/docs/examples/health/get-db.md +++ b/docs/examples/health/get-db.md @@ -1,3 +1,4 @@ +```python from appwrite.client import Client from appwrite.services.health import Health @@ -9,3 +10,4 @@ client.set_key('') # Your secret API key health = Health(client) result = health.get_db() +``` diff --git a/docs/examples/health/get-failed-jobs.md b/docs/examples/health/get-failed-jobs.md index 6db28244..2ade2a7f 100644 --- a/docs/examples/health/get-failed-jobs.md +++ b/docs/examples/health/get-failed-jobs.md @@ -1,3 +1,4 @@ +```python from appwrite.client import Client from appwrite.services.health import Health from appwrite.enums import Name @@ -13,3 +14,4 @@ result = health.get_failed_jobs( name = Name.V1_DATABASE, threshold = None # optional ) +``` diff --git a/docs/examples/health/get-pub-sub.md b/docs/examples/health/get-pub-sub.md index e5115d06..86640912 100644 --- a/docs/examples/health/get-pub-sub.md +++ b/docs/examples/health/get-pub-sub.md @@ -1,3 +1,4 @@ +```python from appwrite.client import Client from appwrite.services.health import Health @@ -9,3 +10,4 @@ client.set_key('') # Your secret API key health = Health(client) result = health.get_pub_sub() +``` diff --git a/docs/examples/health/get-queue-audits.md b/docs/examples/health/get-queue-audits.md index 7db43905..43ad82f5 100644 --- a/docs/examples/health/get-queue-audits.md +++ b/docs/examples/health/get-queue-audits.md @@ -1,3 +1,4 @@ +```python from appwrite.client import Client from appwrite.services.health import Health @@ -11,3 +12,4 @@ health = Health(client) result = health.get_queue_audits( threshold = None # optional ) +``` diff --git a/docs/examples/health/get-queue-billing-project-aggregation.md b/docs/examples/health/get-queue-billing-project-aggregation.md new file mode 100644 index 00000000..e2b983fd --- /dev/null +++ b/docs/examples/health/get-queue-billing-project-aggregation.md @@ -0,0 +1,15 @@ +```python +from appwrite.client import Client +from appwrite.services.health import Health + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID +client.set_key('') # Your secret API key + +health = Health(client) + +result = health.get_queue_billing_project_aggregation( + threshold = None # optional +) +``` diff --git a/docs/examples/health/get-queue-billing-team-aggregation.md b/docs/examples/health/get-queue-billing-team-aggregation.md new file mode 100644 index 00000000..763c1858 --- /dev/null +++ b/docs/examples/health/get-queue-billing-team-aggregation.md @@ -0,0 +1,15 @@ +```python +from appwrite.client import Client +from appwrite.services.health import Health + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID +client.set_key('') # Your secret API key + +health = Health(client) + +result = health.get_queue_billing_team_aggregation( + threshold = None # optional +) +``` diff --git a/docs/examples/health/get-queue-builds.md b/docs/examples/health/get-queue-builds.md index 18ed8e30..850a1515 100644 --- a/docs/examples/health/get-queue-builds.md +++ b/docs/examples/health/get-queue-builds.md @@ -1,3 +1,4 @@ +```python from appwrite.client import Client from appwrite.services.health import Health @@ -11,3 +12,4 @@ health = Health(client) result = health.get_queue_builds( threshold = None # optional ) +``` diff --git a/docs/examples/health/get-queue-certificates.md b/docs/examples/health/get-queue-certificates.md index b0a29e2d..4e18f767 100644 --- a/docs/examples/health/get-queue-certificates.md +++ b/docs/examples/health/get-queue-certificates.md @@ -1,3 +1,4 @@ +```python from appwrite.client import Client from appwrite.services.health import Health @@ -11,3 +12,4 @@ health = Health(client) result = health.get_queue_certificates( threshold = None # optional ) +``` diff --git a/docs/examples/health/get-queue-databases.md b/docs/examples/health/get-queue-databases.md index 491d1f7c..1df0ca1e 100644 --- a/docs/examples/health/get-queue-databases.md +++ b/docs/examples/health/get-queue-databases.md @@ -1,3 +1,4 @@ +```python from appwrite.client import Client from appwrite.services.health import Health @@ -12,3 +13,4 @@ result = health.get_queue_databases( name = '', # optional threshold = None # optional ) +``` diff --git a/docs/examples/health/get-queue-deletes.md b/docs/examples/health/get-queue-deletes.md index fa860c61..315f7bf2 100644 --- a/docs/examples/health/get-queue-deletes.md +++ b/docs/examples/health/get-queue-deletes.md @@ -1,3 +1,4 @@ +```python from appwrite.client import Client from appwrite.services.health import Health @@ -11,3 +12,4 @@ health = Health(client) result = health.get_queue_deletes( threshold = None # optional ) +``` diff --git a/docs/examples/health/get-queue-functions.md b/docs/examples/health/get-queue-functions.md index d4ca9388..3947d2db 100644 --- a/docs/examples/health/get-queue-functions.md +++ b/docs/examples/health/get-queue-functions.md @@ -1,3 +1,4 @@ +```python from appwrite.client import Client from appwrite.services.health import Health @@ -11,3 +12,4 @@ health = Health(client) result = health.get_queue_functions( threshold = None # optional ) +``` diff --git a/docs/examples/health/get-queue-logs.md b/docs/examples/health/get-queue-logs.md index 1479f036..59bd7d13 100644 --- a/docs/examples/health/get-queue-logs.md +++ b/docs/examples/health/get-queue-logs.md @@ -1,3 +1,4 @@ +```python from appwrite.client import Client from appwrite.services.health import Health @@ -11,3 +12,4 @@ health = Health(client) result = health.get_queue_logs( threshold = None # optional ) +``` diff --git a/docs/examples/health/get-queue-mails.md b/docs/examples/health/get-queue-mails.md index 6835efea..772a44f6 100644 --- a/docs/examples/health/get-queue-mails.md +++ b/docs/examples/health/get-queue-mails.md @@ -1,3 +1,4 @@ +```python from appwrite.client import Client from appwrite.services.health import Health @@ -11,3 +12,4 @@ health = Health(client) result = health.get_queue_mails( threshold = None # optional ) +``` diff --git a/docs/examples/health/get-queue-messaging.md b/docs/examples/health/get-queue-messaging.md index 34cbad2f..4f467125 100644 --- a/docs/examples/health/get-queue-messaging.md +++ b/docs/examples/health/get-queue-messaging.md @@ -1,3 +1,4 @@ +```python from appwrite.client import Client from appwrite.services.health import Health @@ -11,3 +12,4 @@ health = Health(client) result = health.get_queue_messaging( threshold = None # optional ) +``` diff --git a/docs/examples/health/get-queue-migrations.md b/docs/examples/health/get-queue-migrations.md index 019db4e8..baa7de8d 100644 --- a/docs/examples/health/get-queue-migrations.md +++ b/docs/examples/health/get-queue-migrations.md @@ -1,3 +1,4 @@ +```python from appwrite.client import Client from appwrite.services.health import Health @@ -11,3 +12,4 @@ health = Health(client) result = health.get_queue_migrations( threshold = None # optional ) +``` diff --git a/docs/examples/health/get-queue-priority-builds.md b/docs/examples/health/get-queue-priority-builds.md new file mode 100644 index 00000000..fbcdf915 --- /dev/null +++ b/docs/examples/health/get-queue-priority-builds.md @@ -0,0 +1,15 @@ +```python +from appwrite.client import Client +from appwrite.services.health import Health + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID +client.set_key('') # Your secret API key + +health = Health(client) + +result = health.get_queue_priority_builds( + threshold = None # optional +) +``` diff --git a/docs/examples/health/get-queue-region-manager.md b/docs/examples/health/get-queue-region-manager.md new file mode 100644 index 00000000..67621796 --- /dev/null +++ b/docs/examples/health/get-queue-region-manager.md @@ -0,0 +1,15 @@ +```python +from appwrite.client import Client +from appwrite.services.health import Health + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID +client.set_key('') # Your secret API key + +health = Health(client) + +result = health.get_queue_region_manager( + threshold = None # optional +) +``` diff --git a/docs/examples/health/get-queue-stats-resources.md b/docs/examples/health/get-queue-stats-resources.md index 92aebc3c..05ea239e 100644 --- a/docs/examples/health/get-queue-stats-resources.md +++ b/docs/examples/health/get-queue-stats-resources.md @@ -1,3 +1,4 @@ +```python from appwrite.client import Client from appwrite.services.health import Health @@ -11,3 +12,4 @@ health = Health(client) result = health.get_queue_stats_resources( threshold = None # optional ) +``` diff --git a/docs/examples/health/get-queue-threats.md b/docs/examples/health/get-queue-threats.md new file mode 100644 index 00000000..8294a2f7 --- /dev/null +++ b/docs/examples/health/get-queue-threats.md @@ -0,0 +1,15 @@ +```python +from appwrite.client import Client +from appwrite.services.health import Health + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID +client.set_key('') # Your secret API key + +health = Health(client) + +result = health.get_queue_threats( + threshold = None # optional +) +``` diff --git a/docs/examples/health/get-queue-usage.md b/docs/examples/health/get-queue-usage.md index 266ca828..9c86453a 100644 --- a/docs/examples/health/get-queue-usage.md +++ b/docs/examples/health/get-queue-usage.md @@ -1,3 +1,4 @@ +```python from appwrite.client import Client from appwrite.services.health import Health @@ -11,3 +12,4 @@ health = Health(client) result = health.get_queue_usage( threshold = None # optional ) +``` diff --git a/docs/examples/health/get-queue-webhooks.md b/docs/examples/health/get-queue-webhooks.md index df5e2d56..a01d44db 100644 --- a/docs/examples/health/get-queue-webhooks.md +++ b/docs/examples/health/get-queue-webhooks.md @@ -1,3 +1,4 @@ +```python from appwrite.client import Client from appwrite.services.health import Health @@ -11,3 +12,4 @@ health = Health(client) result = health.get_queue_webhooks( threshold = None # optional ) +``` diff --git a/docs/examples/health/get-storage-local.md b/docs/examples/health/get-storage-local.md index 7d2ea44f..98087672 100644 --- a/docs/examples/health/get-storage-local.md +++ b/docs/examples/health/get-storage-local.md @@ -1,3 +1,4 @@ +```python from appwrite.client import Client from appwrite.services.health import Health @@ -9,3 +10,4 @@ client.set_key('') # Your secret API key health = Health(client) result = health.get_storage_local() +``` diff --git a/docs/examples/health/get-storage.md b/docs/examples/health/get-storage.md index 821d9f39..b6bdca35 100644 --- a/docs/examples/health/get-storage.md +++ b/docs/examples/health/get-storage.md @@ -1,3 +1,4 @@ +```python from appwrite.client import Client from appwrite.services.health import Health @@ -9,3 +10,4 @@ client.set_key('') # Your secret API key health = Health(client) result = health.get_storage() +``` diff --git a/docs/examples/health/get-time.md b/docs/examples/health/get-time.md index 907e9649..9d0dd57e 100644 --- a/docs/examples/health/get-time.md +++ b/docs/examples/health/get-time.md @@ -1,3 +1,4 @@ +```python from appwrite.client import Client from appwrite.services.health import Health @@ -9,3 +10,4 @@ client.set_key('') # Your secret API key health = Health(client) result = health.get_time() +``` diff --git a/docs/examples/health/get.md b/docs/examples/health/get.md index c544fcc9..40ce32f7 100644 --- a/docs/examples/health/get.md +++ b/docs/examples/health/get.md @@ -1,3 +1,4 @@ +```python from appwrite.client import Client from appwrite.services.health import Health @@ -9,3 +10,4 @@ client.set_key('') # Your secret API key health = Health(client) result = health.get() +``` diff --git a/docs/examples/locale/get.md b/docs/examples/locale/get.md index 6f2a877b..25e16e68 100644 --- a/docs/examples/locale/get.md +++ b/docs/examples/locale/get.md @@ -1,3 +1,4 @@ +```python from appwrite.client import Client from appwrite.services.locale import Locale @@ -9,3 +10,4 @@ client.set_session('') # The user session to authenticate with locale = Locale(client) result = locale.get() +``` diff --git a/docs/examples/locale/list-codes.md b/docs/examples/locale/list-codes.md index 5f3e501f..1cc54251 100644 --- a/docs/examples/locale/list-codes.md +++ b/docs/examples/locale/list-codes.md @@ -1,3 +1,4 @@ +```python from appwrite.client import Client from appwrite.services.locale import Locale @@ -9,3 +10,4 @@ client.set_session('') # The user session to authenticate with locale = Locale(client) result = locale.list_codes() +``` diff --git a/docs/examples/locale/list-continents.md b/docs/examples/locale/list-continents.md index 0aead817..40d6c6f3 100644 --- a/docs/examples/locale/list-continents.md +++ b/docs/examples/locale/list-continents.md @@ -1,3 +1,4 @@ +```python from appwrite.client import Client from appwrite.services.locale import Locale @@ -9,3 +10,4 @@ client.set_session('') # The user session to authenticate with locale = Locale(client) result = locale.list_continents() +``` diff --git a/docs/examples/locale/list-countries-eu.md b/docs/examples/locale/list-countries-eu.md index f88e331f..2409ae3c 100644 --- a/docs/examples/locale/list-countries-eu.md +++ b/docs/examples/locale/list-countries-eu.md @@ -1,3 +1,4 @@ +```python from appwrite.client import Client from appwrite.services.locale import Locale @@ -9,3 +10,4 @@ client.set_session('') # The user session to authenticate with locale = Locale(client) result = locale.list_countries_eu() +``` diff --git a/docs/examples/locale/list-countries-phones.md b/docs/examples/locale/list-countries-phones.md index b1fdc1ae..90dc2807 100644 --- a/docs/examples/locale/list-countries-phones.md +++ b/docs/examples/locale/list-countries-phones.md @@ -1,3 +1,4 @@ +```python from appwrite.client import Client from appwrite.services.locale import Locale @@ -9,3 +10,4 @@ client.set_session('') # The user session to authenticate with locale = Locale(client) result = locale.list_countries_phones() +``` diff --git a/docs/examples/locale/list-countries.md b/docs/examples/locale/list-countries.md index 0c5b23cd..1ca58a39 100644 --- a/docs/examples/locale/list-countries.md +++ b/docs/examples/locale/list-countries.md @@ -1,3 +1,4 @@ +```python from appwrite.client import Client from appwrite.services.locale import Locale @@ -9,3 +10,4 @@ client.set_session('') # The user session to authenticate with locale = Locale(client) result = locale.list_countries() +``` diff --git a/docs/examples/locale/list-currencies.md b/docs/examples/locale/list-currencies.md index 20009d65..76e0e231 100644 --- a/docs/examples/locale/list-currencies.md +++ b/docs/examples/locale/list-currencies.md @@ -1,3 +1,4 @@ +```python from appwrite.client import Client from appwrite.services.locale import Locale @@ -9,3 +10,4 @@ client.set_session('') # The user session to authenticate with locale = Locale(client) result = locale.list_currencies() +``` diff --git a/docs/examples/locale/list-languages.md b/docs/examples/locale/list-languages.md index 1962a839..e9b028e0 100644 --- a/docs/examples/locale/list-languages.md +++ b/docs/examples/locale/list-languages.md @@ -1,3 +1,4 @@ +```python from appwrite.client import Client from appwrite.services.locale import Locale @@ -9,3 +10,4 @@ client.set_session('') # The user session to authenticate with locale = Locale(client) result = locale.list_languages() +``` diff --git a/docs/examples/messaging/create-apns-provider.md b/docs/examples/messaging/create-apns-provider.md index b57fa00f..84f6b25b 100644 --- a/docs/examples/messaging/create-apns-provider.md +++ b/docs/examples/messaging/create-apns-provider.md @@ -1,3 +1,4 @@ +```python from appwrite.client import Client from appwrite.services.messaging import Messaging @@ -18,3 +19,4 @@ result = messaging.create_apns_provider( sandbox = False, # optional enabled = False # optional ) +``` diff --git a/docs/examples/messaging/create-email.md b/docs/examples/messaging/create-email.md index 8b4c9d26..58dc6cf5 100644 --- a/docs/examples/messaging/create-email.md +++ b/docs/examples/messaging/create-email.md @@ -1,3 +1,4 @@ +```python from appwrite.client import Client from appwrite.services.messaging import Messaging @@ -22,3 +23,4 @@ result = messaging.create_email( html = False, # optional scheduled_at = '' # optional ) +``` diff --git a/docs/examples/messaging/create-fcm-provider.md b/docs/examples/messaging/create-fcm-provider.md index 9c40eb78..11e5e635 100644 --- a/docs/examples/messaging/create-fcm-provider.md +++ b/docs/examples/messaging/create-fcm-provider.md @@ -1,3 +1,4 @@ +```python from appwrite.client import Client from appwrite.services.messaging import Messaging @@ -14,3 +15,4 @@ result = messaging.create_fcm_provider( service_account_json = {}, # optional enabled = False # optional ) +``` diff --git a/docs/examples/messaging/create-mailgun-provider.md b/docs/examples/messaging/create-mailgun-provider.md index 6703f6fd..8bd974b3 100644 --- a/docs/examples/messaging/create-mailgun-provider.md +++ b/docs/examples/messaging/create-mailgun-provider.md @@ -1,3 +1,4 @@ +```python from appwrite.client import Client from appwrite.services.messaging import Messaging @@ -20,3 +21,4 @@ result = messaging.create_mailgun_provider( reply_to_email = 'email@example.com', # optional enabled = False # optional ) +``` diff --git a/docs/examples/messaging/create-msg-91-provider.md b/docs/examples/messaging/create-msg-91-provider.md index 9315dcdd..514e344c 100644 --- a/docs/examples/messaging/create-msg-91-provider.md +++ b/docs/examples/messaging/create-msg-91-provider.md @@ -1,3 +1,4 @@ +```python from appwrite.client import Client from appwrite.services.messaging import Messaging @@ -16,3 +17,4 @@ result = messaging.create_msg91_provider( auth_key = '', # optional enabled = False # optional ) +``` diff --git a/docs/examples/messaging/create-push.md b/docs/examples/messaging/create-push.md index 817c157e..2bc06bda 100644 --- a/docs/examples/messaging/create-push.md +++ b/docs/examples/messaging/create-push.md @@ -1,3 +1,4 @@ +```python from appwrite.client import Client from appwrite.services.messaging import Messaging from appwrite.enums import MessagePriority @@ -30,3 +31,4 @@ result = messaging.create_push( critical = False, # optional priority = MessagePriority.NORMAL # optional ) +``` diff --git a/docs/examples/messaging/create-resend-provider.md b/docs/examples/messaging/create-resend-provider.md index 5789f6b9..43c6372b 100644 --- a/docs/examples/messaging/create-resend-provider.md +++ b/docs/examples/messaging/create-resend-provider.md @@ -1,3 +1,4 @@ +```python from appwrite.client import Client from appwrite.services.messaging import Messaging @@ -18,3 +19,4 @@ result = messaging.create_resend_provider( reply_to_email = 'email@example.com', # optional enabled = False # optional ) +``` diff --git a/docs/examples/messaging/create-sendgrid-provider.md b/docs/examples/messaging/create-sendgrid-provider.md index 46ff54f1..9a1c8a2e 100644 --- a/docs/examples/messaging/create-sendgrid-provider.md +++ b/docs/examples/messaging/create-sendgrid-provider.md @@ -1,3 +1,4 @@ +```python from appwrite.client import Client from appwrite.services.messaging import Messaging @@ -18,3 +19,4 @@ result = messaging.create_sendgrid_provider( reply_to_email = 'email@example.com', # optional enabled = False # optional ) +``` diff --git a/docs/examples/messaging/create-sms.md b/docs/examples/messaging/create-sms.md index d1c7b495..66a76c2c 100644 --- a/docs/examples/messaging/create-sms.md +++ b/docs/examples/messaging/create-sms.md @@ -1,3 +1,4 @@ +```python from appwrite.client import Client from appwrite.services.messaging import Messaging @@ -17,3 +18,4 @@ result = messaging.create_sms( draft = False, # optional scheduled_at = '' # optional ) +``` diff --git a/docs/examples/messaging/create-smtp-provider.md b/docs/examples/messaging/create-smtp-provider.md index 6b9c345e..cd3d703e 100644 --- a/docs/examples/messaging/create-smtp-provider.md +++ b/docs/examples/messaging/create-smtp-provider.md @@ -1,3 +1,4 @@ +```python from appwrite.client import Client from appwrite.services.messaging import Messaging from appwrite.enums import SmtpEncryption @@ -25,3 +26,4 @@ result = messaging.create_smtp_provider( reply_to_email = 'email@example.com', # optional enabled = False # optional ) +``` diff --git a/docs/examples/messaging/create-subscriber.md b/docs/examples/messaging/create-subscriber.md index bc0c892b..402e35f5 100644 --- a/docs/examples/messaging/create-subscriber.md +++ b/docs/examples/messaging/create-subscriber.md @@ -1,3 +1,4 @@ +```python from appwrite.client import Client from appwrite.services.messaging import Messaging @@ -13,3 +14,4 @@ result = messaging.create_subscriber( subscriber_id = '', target_id = '' ) +``` diff --git a/docs/examples/messaging/create-telesign-provider.md b/docs/examples/messaging/create-telesign-provider.md index aff09fe8..7a2be40b 100644 --- a/docs/examples/messaging/create-telesign-provider.md +++ b/docs/examples/messaging/create-telesign-provider.md @@ -1,3 +1,4 @@ +```python from appwrite.client import Client from appwrite.services.messaging import Messaging @@ -16,3 +17,4 @@ result = messaging.create_telesign_provider( api_key = '', # optional enabled = False # optional ) +``` diff --git a/docs/examples/messaging/create-textmagic-provider.md b/docs/examples/messaging/create-textmagic-provider.md index 46ded71c..47ba6f32 100644 --- a/docs/examples/messaging/create-textmagic-provider.md +++ b/docs/examples/messaging/create-textmagic-provider.md @@ -1,3 +1,4 @@ +```python from appwrite.client import Client from appwrite.services.messaging import Messaging @@ -16,3 +17,4 @@ result = messaging.create_textmagic_provider( api_key = '', # optional enabled = False # optional ) +``` diff --git a/docs/examples/messaging/create-topic.md b/docs/examples/messaging/create-topic.md index c1cb465e..cb209659 100644 --- a/docs/examples/messaging/create-topic.md +++ b/docs/examples/messaging/create-topic.md @@ -1,3 +1,4 @@ +```python from appwrite.client import Client from appwrite.services.messaging import Messaging @@ -13,3 +14,4 @@ result = messaging.create_topic( name = '', subscribe = ["any"] # optional ) +``` diff --git a/docs/examples/messaging/create-twilio-provider.md b/docs/examples/messaging/create-twilio-provider.md index 4438563a..53f7d372 100644 --- a/docs/examples/messaging/create-twilio-provider.md +++ b/docs/examples/messaging/create-twilio-provider.md @@ -1,3 +1,4 @@ +```python from appwrite.client import Client from appwrite.services.messaging import Messaging @@ -16,3 +17,4 @@ result = messaging.create_twilio_provider( auth_token = '', # optional enabled = False # optional ) +``` diff --git a/docs/examples/messaging/create-vonage-provider.md b/docs/examples/messaging/create-vonage-provider.md index 6ffded5b..034e5399 100644 --- a/docs/examples/messaging/create-vonage-provider.md +++ b/docs/examples/messaging/create-vonage-provider.md @@ -1,3 +1,4 @@ +```python from appwrite.client import Client from appwrite.services.messaging import Messaging @@ -16,3 +17,4 @@ result = messaging.create_vonage_provider( api_secret = '', # optional enabled = False # optional ) +``` diff --git a/docs/examples/messaging/delete-provider.md b/docs/examples/messaging/delete-provider.md index 649e504c..887434c0 100644 --- a/docs/examples/messaging/delete-provider.md +++ b/docs/examples/messaging/delete-provider.md @@ -1,3 +1,4 @@ +```python from appwrite.client import Client from appwrite.services.messaging import Messaging @@ -11,3 +12,4 @@ messaging = Messaging(client) result = messaging.delete_provider( provider_id = '' ) +``` diff --git a/docs/examples/messaging/delete-subscriber.md b/docs/examples/messaging/delete-subscriber.md index c012a9ac..32eec660 100644 --- a/docs/examples/messaging/delete-subscriber.md +++ b/docs/examples/messaging/delete-subscriber.md @@ -1,3 +1,4 @@ +```python from appwrite.client import Client from appwrite.services.messaging import Messaging @@ -12,3 +13,4 @@ result = messaging.delete_subscriber( topic_id = '', subscriber_id = '' ) +``` diff --git a/docs/examples/messaging/delete-topic.md b/docs/examples/messaging/delete-topic.md index 76f9093a..f4658709 100644 --- a/docs/examples/messaging/delete-topic.md +++ b/docs/examples/messaging/delete-topic.md @@ -1,3 +1,4 @@ +```python from appwrite.client import Client from appwrite.services.messaging import Messaging @@ -11,3 +12,4 @@ messaging = Messaging(client) result = messaging.delete_topic( topic_id = '' ) +``` diff --git a/docs/examples/messaging/delete.md b/docs/examples/messaging/delete.md index 0153ac90..d3447ced 100644 --- a/docs/examples/messaging/delete.md +++ b/docs/examples/messaging/delete.md @@ -1,3 +1,4 @@ +```python from appwrite.client import Client from appwrite.services.messaging import Messaging @@ -11,3 +12,4 @@ messaging = Messaging(client) result = messaging.delete( message_id = '' ) +``` diff --git a/docs/examples/messaging/get-message.md b/docs/examples/messaging/get-message.md index 3fadcff7..a1a2ea1f 100644 --- a/docs/examples/messaging/get-message.md +++ b/docs/examples/messaging/get-message.md @@ -1,3 +1,4 @@ +```python from appwrite.client import Client from appwrite.services.messaging import Messaging @@ -11,3 +12,4 @@ messaging = Messaging(client) result = messaging.get_message( message_id = '' ) +``` diff --git a/docs/examples/messaging/get-provider.md b/docs/examples/messaging/get-provider.md index 58e62280..41f28607 100644 --- a/docs/examples/messaging/get-provider.md +++ b/docs/examples/messaging/get-provider.md @@ -1,3 +1,4 @@ +```python from appwrite.client import Client from appwrite.services.messaging import Messaging @@ -11,3 +12,4 @@ messaging = Messaging(client) result = messaging.get_provider( provider_id = '' ) +``` diff --git a/docs/examples/messaging/get-subscriber.md b/docs/examples/messaging/get-subscriber.md index ca997f21..26e76b7b 100644 --- a/docs/examples/messaging/get-subscriber.md +++ b/docs/examples/messaging/get-subscriber.md @@ -1,3 +1,4 @@ +```python from appwrite.client import Client from appwrite.services.messaging import Messaging @@ -12,3 +13,4 @@ result = messaging.get_subscriber( topic_id = '', subscriber_id = '' ) +``` diff --git a/docs/examples/messaging/get-topic.md b/docs/examples/messaging/get-topic.md index c238a98a..4917f0a6 100644 --- a/docs/examples/messaging/get-topic.md +++ b/docs/examples/messaging/get-topic.md @@ -1,3 +1,4 @@ +```python from appwrite.client import Client from appwrite.services.messaging import Messaging @@ -11,3 +12,4 @@ messaging = Messaging(client) result = messaging.get_topic( topic_id = '' ) +``` diff --git a/docs/examples/messaging/list-message-logs.md b/docs/examples/messaging/list-message-logs.md index a689ae96..9ae02f63 100644 --- a/docs/examples/messaging/list-message-logs.md +++ b/docs/examples/messaging/list-message-logs.md @@ -1,3 +1,4 @@ +```python from appwrite.client import Client from appwrite.services.messaging import Messaging @@ -13,3 +14,4 @@ result = messaging.list_message_logs( queries = [], # optional total = False # optional ) +``` diff --git a/docs/examples/messaging/list-messages.md b/docs/examples/messaging/list-messages.md index 9a476131..a8b1254c 100644 --- a/docs/examples/messaging/list-messages.md +++ b/docs/examples/messaging/list-messages.md @@ -1,3 +1,4 @@ +```python from appwrite.client import Client from appwrite.services.messaging import Messaging @@ -13,3 +14,4 @@ result = messaging.list_messages( search = '', # optional total = False # optional ) +``` diff --git a/docs/examples/messaging/list-provider-logs.md b/docs/examples/messaging/list-provider-logs.md index 7e4dc96a..9bdd1e43 100644 --- a/docs/examples/messaging/list-provider-logs.md +++ b/docs/examples/messaging/list-provider-logs.md @@ -1,3 +1,4 @@ +```python from appwrite.client import Client from appwrite.services.messaging import Messaging @@ -13,3 +14,4 @@ result = messaging.list_provider_logs( queries = [], # optional total = False # optional ) +``` diff --git a/docs/examples/messaging/list-providers.md b/docs/examples/messaging/list-providers.md index db2d2b8c..cb272aa0 100644 --- a/docs/examples/messaging/list-providers.md +++ b/docs/examples/messaging/list-providers.md @@ -1,3 +1,4 @@ +```python from appwrite.client import Client from appwrite.services.messaging import Messaging @@ -13,3 +14,4 @@ result = messaging.list_providers( search = '', # optional total = False # optional ) +``` diff --git a/docs/examples/messaging/list-subscriber-logs.md b/docs/examples/messaging/list-subscriber-logs.md index 41bb5b4a..cb5e1a88 100644 --- a/docs/examples/messaging/list-subscriber-logs.md +++ b/docs/examples/messaging/list-subscriber-logs.md @@ -1,3 +1,4 @@ +```python from appwrite.client import Client from appwrite.services.messaging import Messaging @@ -13,3 +14,4 @@ result = messaging.list_subscriber_logs( queries = [], # optional total = False # optional ) +``` diff --git a/docs/examples/messaging/list-subscribers.md b/docs/examples/messaging/list-subscribers.md index 6666830c..33818ac3 100644 --- a/docs/examples/messaging/list-subscribers.md +++ b/docs/examples/messaging/list-subscribers.md @@ -1,3 +1,4 @@ +```python from appwrite.client import Client from appwrite.services.messaging import Messaging @@ -14,3 +15,4 @@ result = messaging.list_subscribers( search = '', # optional total = False # optional ) +``` diff --git a/docs/examples/messaging/list-targets.md b/docs/examples/messaging/list-targets.md index b4f619f6..4b5b59c2 100644 --- a/docs/examples/messaging/list-targets.md +++ b/docs/examples/messaging/list-targets.md @@ -1,3 +1,4 @@ +```python from appwrite.client import Client from appwrite.services.messaging import Messaging @@ -13,3 +14,4 @@ result = messaging.list_targets( queries = [], # optional total = False # optional ) +``` diff --git a/docs/examples/messaging/list-topic-logs.md b/docs/examples/messaging/list-topic-logs.md index 33fcff0e..1e6e15f8 100644 --- a/docs/examples/messaging/list-topic-logs.md +++ b/docs/examples/messaging/list-topic-logs.md @@ -1,3 +1,4 @@ +```python from appwrite.client import Client from appwrite.services.messaging import Messaging @@ -13,3 +14,4 @@ result = messaging.list_topic_logs( queries = [], # optional total = False # optional ) +``` diff --git a/docs/examples/messaging/list-topics.md b/docs/examples/messaging/list-topics.md index ad071462..cf50c0f1 100644 --- a/docs/examples/messaging/list-topics.md +++ b/docs/examples/messaging/list-topics.md @@ -1,3 +1,4 @@ +```python from appwrite.client import Client from appwrite.services.messaging import Messaging @@ -13,3 +14,4 @@ result = messaging.list_topics( search = '', # optional total = False # optional ) +``` diff --git a/docs/examples/messaging/update-apns-provider.md b/docs/examples/messaging/update-apns-provider.md index f695b61b..1108a378 100644 --- a/docs/examples/messaging/update-apns-provider.md +++ b/docs/examples/messaging/update-apns-provider.md @@ -1,3 +1,4 @@ +```python from appwrite.client import Client from appwrite.services.messaging import Messaging @@ -18,3 +19,4 @@ result = messaging.update_apns_provider( bundle_id = '', # optional sandbox = False # optional ) +``` diff --git a/docs/examples/messaging/update-email.md b/docs/examples/messaging/update-email.md index 5731d5f2..e63fd35a 100644 --- a/docs/examples/messaging/update-email.md +++ b/docs/examples/messaging/update-email.md @@ -1,3 +1,4 @@ +```python from appwrite.client import Client from appwrite.services.messaging import Messaging @@ -22,3 +23,4 @@ result = messaging.update_email( scheduled_at = '', # optional attachments = [] # optional ) +``` diff --git a/docs/examples/messaging/update-fcm-provider.md b/docs/examples/messaging/update-fcm-provider.md index 0119d71b..94f73008 100644 --- a/docs/examples/messaging/update-fcm-provider.md +++ b/docs/examples/messaging/update-fcm-provider.md @@ -1,3 +1,4 @@ +```python from appwrite.client import Client from appwrite.services.messaging import Messaging @@ -14,3 +15,4 @@ result = messaging.update_fcm_provider( enabled = False, # optional service_account_json = {} # optional ) +``` diff --git a/docs/examples/messaging/update-mailgun-provider.md b/docs/examples/messaging/update-mailgun-provider.md index 039475ff..a774d01f 100644 --- a/docs/examples/messaging/update-mailgun-provider.md +++ b/docs/examples/messaging/update-mailgun-provider.md @@ -1,3 +1,4 @@ +```python from appwrite.client import Client from appwrite.services.messaging import Messaging @@ -20,3 +21,4 @@ result = messaging.update_mailgun_provider( reply_to_name = '', # optional reply_to_email = '' # optional ) +``` diff --git a/docs/examples/messaging/update-msg-91-provider.md b/docs/examples/messaging/update-msg-91-provider.md index c5bd0579..984e3e4c 100644 --- a/docs/examples/messaging/update-msg-91-provider.md +++ b/docs/examples/messaging/update-msg-91-provider.md @@ -1,3 +1,4 @@ +```python from appwrite.client import Client from appwrite.services.messaging import Messaging @@ -16,3 +17,4 @@ result = messaging.update_msg91_provider( sender_id = '', # optional auth_key = '' # optional ) +``` diff --git a/docs/examples/messaging/update-push.md b/docs/examples/messaging/update-push.md index f9901329..de428449 100644 --- a/docs/examples/messaging/update-push.md +++ b/docs/examples/messaging/update-push.md @@ -1,3 +1,4 @@ +```python from appwrite.client import Client from appwrite.services.messaging import Messaging from appwrite.enums import MessagePriority @@ -30,3 +31,4 @@ result = messaging.update_push( critical = False, # optional priority = MessagePriority.NORMAL # optional ) +``` diff --git a/docs/examples/messaging/update-resend-provider.md b/docs/examples/messaging/update-resend-provider.md index a8ad8595..ecd21ee4 100644 --- a/docs/examples/messaging/update-resend-provider.md +++ b/docs/examples/messaging/update-resend-provider.md @@ -1,3 +1,4 @@ +```python from appwrite.client import Client from appwrite.services.messaging import Messaging @@ -18,3 +19,4 @@ result = messaging.update_resend_provider( reply_to_name = '', # optional reply_to_email = '' # optional ) +``` diff --git a/docs/examples/messaging/update-sendgrid-provider.md b/docs/examples/messaging/update-sendgrid-provider.md index fc0a44d6..e7f9a363 100644 --- a/docs/examples/messaging/update-sendgrid-provider.md +++ b/docs/examples/messaging/update-sendgrid-provider.md @@ -1,3 +1,4 @@ +```python from appwrite.client import Client from appwrite.services.messaging import Messaging @@ -18,3 +19,4 @@ result = messaging.update_sendgrid_provider( reply_to_name = '', # optional reply_to_email = '' # optional ) +``` diff --git a/docs/examples/messaging/update-sms.md b/docs/examples/messaging/update-sms.md index 2eec4e21..0973a100 100644 --- a/docs/examples/messaging/update-sms.md +++ b/docs/examples/messaging/update-sms.md @@ -1,3 +1,4 @@ +```python from appwrite.client import Client from appwrite.services.messaging import Messaging @@ -17,3 +18,4 @@ result = messaging.update_sms( draft = False, # optional scheduled_at = '' # optional ) +``` diff --git a/docs/examples/messaging/update-smtp-provider.md b/docs/examples/messaging/update-smtp-provider.md index 51f54a3d..7824c628 100644 --- a/docs/examples/messaging/update-smtp-provider.md +++ b/docs/examples/messaging/update-smtp-provider.md @@ -1,3 +1,4 @@ +```python from appwrite.client import Client from appwrite.services.messaging import Messaging from appwrite.enums import SmtpEncryption @@ -25,3 +26,4 @@ result = messaging.update_smtp_provider( reply_to_email = '', # optional enabled = False # optional ) +``` diff --git a/docs/examples/messaging/update-telesign-provider.md b/docs/examples/messaging/update-telesign-provider.md index 193a26f8..dc1d3f18 100644 --- a/docs/examples/messaging/update-telesign-provider.md +++ b/docs/examples/messaging/update-telesign-provider.md @@ -1,3 +1,4 @@ +```python from appwrite.client import Client from appwrite.services.messaging import Messaging @@ -16,3 +17,4 @@ result = messaging.update_telesign_provider( api_key = '', # optional from = '' # optional ) +``` diff --git a/docs/examples/messaging/update-textmagic-provider.md b/docs/examples/messaging/update-textmagic-provider.md index 159f9549..0165999d 100644 --- a/docs/examples/messaging/update-textmagic-provider.md +++ b/docs/examples/messaging/update-textmagic-provider.md @@ -1,3 +1,4 @@ +```python from appwrite.client import Client from appwrite.services.messaging import Messaging @@ -16,3 +17,4 @@ result = messaging.update_textmagic_provider( api_key = '', # optional from = '' # optional ) +``` diff --git a/docs/examples/messaging/update-topic.md b/docs/examples/messaging/update-topic.md index 721f1606..5b20cc67 100644 --- a/docs/examples/messaging/update-topic.md +++ b/docs/examples/messaging/update-topic.md @@ -1,3 +1,4 @@ +```python from appwrite.client import Client from appwrite.services.messaging import Messaging @@ -13,3 +14,4 @@ result = messaging.update_topic( name = '', # optional subscribe = ["any"] # optional ) +``` diff --git a/docs/examples/messaging/update-twilio-provider.md b/docs/examples/messaging/update-twilio-provider.md index b80c55b3..1db09b24 100644 --- a/docs/examples/messaging/update-twilio-provider.md +++ b/docs/examples/messaging/update-twilio-provider.md @@ -1,3 +1,4 @@ +```python from appwrite.client import Client from appwrite.services.messaging import Messaging @@ -16,3 +17,4 @@ result = messaging.update_twilio_provider( auth_token = '', # optional from = '' # optional ) +``` diff --git a/docs/examples/messaging/update-vonage-provider.md b/docs/examples/messaging/update-vonage-provider.md index b25f416c..e8a2712d 100644 --- a/docs/examples/messaging/update-vonage-provider.md +++ b/docs/examples/messaging/update-vonage-provider.md @@ -1,3 +1,4 @@ +```python from appwrite.client import Client from appwrite.services.messaging import Messaging @@ -16,3 +17,4 @@ result = messaging.update_vonage_provider( api_secret = '', # optional from = '' # optional ) +``` diff --git a/docs/examples/organizations/delete.md b/docs/examples/organizations/delete.md new file mode 100644 index 00000000..61d9ce52 --- /dev/null +++ b/docs/examples/organizations/delete.md @@ -0,0 +1,15 @@ +```python +from appwrite.client import Client +from appwrite.services.organizations import Organizations + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID +client.set_session('') # The user session to authenticate with + +organizations = Organizations(client) + +result = organizations.delete( + organization_id = '' +) +``` diff --git a/docs/examples/organizations/estimation-delete-organization.md b/docs/examples/organizations/estimation-delete-organization.md new file mode 100644 index 00000000..00db9bf4 --- /dev/null +++ b/docs/examples/organizations/estimation-delete-organization.md @@ -0,0 +1,15 @@ +```python +from appwrite.client import Client +from appwrite.services.organizations import Organizations + +client = Client() +client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint +client.set_project('') # Your project ID +client.set_session('') # The user session to authenticate with + +organizations = Organizations(client) + +result = organizations.estimation_delete_organization( + organization_id = '' +) +``` diff --git a/docs/examples/sites/create-deployment.md b/docs/examples/sites/create-deployment.md index de6472c4..dc411f05 100644 --- a/docs/examples/sites/create-deployment.md +++ b/docs/examples/sites/create-deployment.md @@ -1,3 +1,4 @@ +```python from appwrite.client import Client from appwrite.services.sites import Sites from appwrite.input_file import InputFile @@ -17,3 +18,4 @@ result = sites.create_deployment( build_command = '', # optional output_directory = '' # optional ) +``` diff --git a/docs/examples/sites/create-duplicate-deployment.md b/docs/examples/sites/create-duplicate-deployment.md index d79ab9d3..63cd2b99 100644 --- a/docs/examples/sites/create-duplicate-deployment.md +++ b/docs/examples/sites/create-duplicate-deployment.md @@ -1,3 +1,4 @@ +```python from appwrite.client import Client from appwrite.services.sites import Sites @@ -12,3 +13,4 @@ result = sites.create_duplicate_deployment( site_id = '', deployment_id = '' ) +``` diff --git a/docs/examples/sites/create-template-deployment.md b/docs/examples/sites/create-template-deployment.md index 700ca44d..17aa6a11 100644 --- a/docs/examples/sites/create-template-deployment.md +++ b/docs/examples/sites/create-template-deployment.md @@ -1,3 +1,4 @@ +```python from appwrite.client import Client from appwrite.services.sites import Sites from appwrite.enums import TemplateReferenceType @@ -18,3 +19,4 @@ result = sites.create_template_deployment( reference = '', activate = False # optional ) +``` diff --git a/docs/examples/sites/create-variable.md b/docs/examples/sites/create-variable.md index 739beff6..e8971fd9 100644 --- a/docs/examples/sites/create-variable.md +++ b/docs/examples/sites/create-variable.md @@ -1,3 +1,4 @@ +```python from appwrite.client import Client from appwrite.services.sites import Sites @@ -14,3 +15,4 @@ result = sites.create_variable( value = '', secret = False # optional ) +``` diff --git a/docs/examples/sites/create-vcs-deployment.md b/docs/examples/sites/create-vcs-deployment.md index ec02f31c..116f4e95 100644 --- a/docs/examples/sites/create-vcs-deployment.md +++ b/docs/examples/sites/create-vcs-deployment.md @@ -1,3 +1,4 @@ +```python from appwrite.client import Client from appwrite.services.sites import Sites from appwrite.enums import VCSReferenceType @@ -15,3 +16,4 @@ result = sites.create_vcs_deployment( reference = '', activate = False # optional ) +``` diff --git a/docs/examples/sites/create.md b/docs/examples/sites/create.md index 436e56ab..248a2346 100644 --- a/docs/examples/sites/create.md +++ b/docs/examples/sites/create.md @@ -1,3 +1,4 @@ +```python from appwrite.client import Client from appwrite.services.sites import Sites from appwrite.enums import Framework @@ -31,3 +32,4 @@ result = sites.create( provider_root_directory = '', # optional specification = '' # optional ) +``` diff --git a/docs/examples/sites/delete-deployment.md b/docs/examples/sites/delete-deployment.md index 029730ae..ee2f1491 100644 --- a/docs/examples/sites/delete-deployment.md +++ b/docs/examples/sites/delete-deployment.md @@ -1,3 +1,4 @@ +```python from appwrite.client import Client from appwrite.services.sites import Sites @@ -12,3 +13,4 @@ result = sites.delete_deployment( site_id = '', deployment_id = '' ) +``` diff --git a/docs/examples/sites/delete-log.md b/docs/examples/sites/delete-log.md index 0b516e68..26c63124 100644 --- a/docs/examples/sites/delete-log.md +++ b/docs/examples/sites/delete-log.md @@ -1,3 +1,4 @@ +```python from appwrite.client import Client from appwrite.services.sites import Sites @@ -12,3 +13,4 @@ result = sites.delete_log( site_id = '', log_id = '' ) +``` diff --git a/docs/examples/sites/delete-variable.md b/docs/examples/sites/delete-variable.md index c078813b..97e77cd6 100644 --- a/docs/examples/sites/delete-variable.md +++ b/docs/examples/sites/delete-variable.md @@ -1,3 +1,4 @@ +```python from appwrite.client import Client from appwrite.services.sites import Sites @@ -12,3 +13,4 @@ result = sites.delete_variable( site_id = '', variable_id = '' ) +``` diff --git a/docs/examples/sites/delete.md b/docs/examples/sites/delete.md index 60670e63..41e3eafb 100644 --- a/docs/examples/sites/delete.md +++ b/docs/examples/sites/delete.md @@ -1,3 +1,4 @@ +```python from appwrite.client import Client from appwrite.services.sites import Sites @@ -11,3 +12,4 @@ sites = Sites(client) result = sites.delete( site_id = '' ) +``` diff --git a/docs/examples/sites/get-deployment-download.md b/docs/examples/sites/get-deployment-download.md index 7eaa105a..fae83719 100644 --- a/docs/examples/sites/get-deployment-download.md +++ b/docs/examples/sites/get-deployment-download.md @@ -1,3 +1,4 @@ +```python from appwrite.client import Client from appwrite.services.sites import Sites from appwrite.enums import DeploymentDownloadType @@ -14,3 +15,4 @@ result = sites.get_deployment_download( deployment_id = '', type = DeploymentDownloadType.SOURCE # optional ) +``` diff --git a/docs/examples/sites/get-deployment.md b/docs/examples/sites/get-deployment.md index c4ee1de9..c4ed80cf 100644 --- a/docs/examples/sites/get-deployment.md +++ b/docs/examples/sites/get-deployment.md @@ -1,3 +1,4 @@ +```python from appwrite.client import Client from appwrite.services.sites import Sites @@ -12,3 +13,4 @@ result = sites.get_deployment( site_id = '', deployment_id = '' ) +``` diff --git a/docs/examples/sites/get-log.md b/docs/examples/sites/get-log.md index ae5d8ac2..6b70fe26 100644 --- a/docs/examples/sites/get-log.md +++ b/docs/examples/sites/get-log.md @@ -1,3 +1,4 @@ +```python from appwrite.client import Client from appwrite.services.sites import Sites @@ -12,3 +13,4 @@ result = sites.get_log( site_id = '', log_id = '' ) +``` diff --git a/docs/examples/sites/get-variable.md b/docs/examples/sites/get-variable.md index 7f5f0f64..5251fc4e 100644 --- a/docs/examples/sites/get-variable.md +++ b/docs/examples/sites/get-variable.md @@ -1,3 +1,4 @@ +```python from appwrite.client import Client from appwrite.services.sites import Sites @@ -12,3 +13,4 @@ result = sites.get_variable( site_id = '', variable_id = '' ) +``` diff --git a/docs/examples/sites/get.md b/docs/examples/sites/get.md index f9532a0e..129248cc 100644 --- a/docs/examples/sites/get.md +++ b/docs/examples/sites/get.md @@ -1,3 +1,4 @@ +```python from appwrite.client import Client from appwrite.services.sites import Sites @@ -11,3 +12,4 @@ sites = Sites(client) result = sites.get( site_id = '' ) +``` diff --git a/docs/examples/sites/list-deployments.md b/docs/examples/sites/list-deployments.md index 4739de96..3e9c7380 100644 --- a/docs/examples/sites/list-deployments.md +++ b/docs/examples/sites/list-deployments.md @@ -1,3 +1,4 @@ +```python from appwrite.client import Client from appwrite.services.sites import Sites @@ -14,3 +15,4 @@ result = sites.list_deployments( search = '', # optional total = False # optional ) +``` diff --git a/docs/examples/sites/list-frameworks.md b/docs/examples/sites/list-frameworks.md index 6e376469..6e2edae8 100644 --- a/docs/examples/sites/list-frameworks.md +++ b/docs/examples/sites/list-frameworks.md @@ -1,3 +1,4 @@ +```python from appwrite.client import Client from appwrite.services.sites import Sites @@ -9,3 +10,4 @@ client.set_key('') # Your secret API key sites = Sites(client) result = sites.list_frameworks() +``` diff --git a/docs/examples/sites/list-logs.md b/docs/examples/sites/list-logs.md index 4dbbf7a2..35dd7fe5 100644 --- a/docs/examples/sites/list-logs.md +++ b/docs/examples/sites/list-logs.md @@ -1,3 +1,4 @@ +```python from appwrite.client import Client from appwrite.services.sites import Sites @@ -13,3 +14,4 @@ result = sites.list_logs( queries = [], # optional total = False # optional ) +``` diff --git a/docs/examples/sites/list-specifications.md b/docs/examples/sites/list-specifications.md index 93b713c4..a82616b4 100644 --- a/docs/examples/sites/list-specifications.md +++ b/docs/examples/sites/list-specifications.md @@ -1,3 +1,4 @@ +```python from appwrite.client import Client from appwrite.services.sites import Sites @@ -9,3 +10,4 @@ client.set_key('') # Your secret API key sites = Sites(client) result = sites.list_specifications() +``` diff --git a/docs/examples/sites/list-variables.md b/docs/examples/sites/list-variables.md index 5ff78e6a..35b5265a 100644 --- a/docs/examples/sites/list-variables.md +++ b/docs/examples/sites/list-variables.md @@ -1,3 +1,4 @@ +```python from appwrite.client import Client from appwrite.services.sites import Sites @@ -11,3 +12,4 @@ sites = Sites(client) result = sites.list_variables( site_id = '' ) +``` diff --git a/docs/examples/sites/list.md b/docs/examples/sites/list.md index 9c8c67bf..2d87535e 100644 --- a/docs/examples/sites/list.md +++ b/docs/examples/sites/list.md @@ -1,3 +1,4 @@ +```python from appwrite.client import Client from appwrite.services.sites import Sites @@ -13,3 +14,4 @@ result = sites.list( search = '', # optional total = False # optional ) +``` diff --git a/docs/examples/sites/update-deployment-status.md b/docs/examples/sites/update-deployment-status.md index 492ee4f7..68f24fa2 100644 --- a/docs/examples/sites/update-deployment-status.md +++ b/docs/examples/sites/update-deployment-status.md @@ -1,3 +1,4 @@ +```python from appwrite.client import Client from appwrite.services.sites import Sites @@ -12,3 +13,4 @@ result = sites.update_deployment_status( site_id = '', deployment_id = '' ) +``` diff --git a/docs/examples/sites/update-site-deployment.md b/docs/examples/sites/update-site-deployment.md index 69014bbb..53f0b8b9 100644 --- a/docs/examples/sites/update-site-deployment.md +++ b/docs/examples/sites/update-site-deployment.md @@ -1,3 +1,4 @@ +```python from appwrite.client import Client from appwrite.services.sites import Sites @@ -12,3 +13,4 @@ result = sites.update_site_deployment( site_id = '', deployment_id = '' ) +``` diff --git a/docs/examples/sites/update-variable.md b/docs/examples/sites/update-variable.md index 973f7f2e..57ace3ee 100644 --- a/docs/examples/sites/update-variable.md +++ b/docs/examples/sites/update-variable.md @@ -1,3 +1,4 @@ +```python from appwrite.client import Client from appwrite.services.sites import Sites @@ -15,3 +16,4 @@ result = sites.update_variable( value = '', # optional secret = False # optional ) +``` diff --git a/docs/examples/sites/update.md b/docs/examples/sites/update.md index 56b796c2..f4e6a6d2 100644 --- a/docs/examples/sites/update.md +++ b/docs/examples/sites/update.md @@ -1,3 +1,4 @@ +```python from appwrite.client import Client from appwrite.services.sites import Sites from appwrite.enums import Framework @@ -31,3 +32,4 @@ result = sites.update( provider_root_directory = '', # optional specification = '' # optional ) +``` diff --git a/docs/examples/storage/create-bucket.md b/docs/examples/storage/create-bucket.md index 10310aea..58caa706 100644 --- a/docs/examples/storage/create-bucket.md +++ b/docs/examples/storage/create-bucket.md @@ -1,3 +1,4 @@ +```python from appwrite.client import Client from appwrite.services.storage import Storage from appwrite.enums import Compression @@ -24,3 +25,4 @@ result = storage.create_bucket( antivirus = False, # optional transformations = False # optional ) +``` diff --git a/docs/examples/storage/create-file.md b/docs/examples/storage/create-file.md index e37a5921..4e347b2d 100644 --- a/docs/examples/storage/create-file.md +++ b/docs/examples/storage/create-file.md @@ -1,3 +1,4 @@ +```python from appwrite.client import Client from appwrite.services.storage import Storage from appwrite.input_file import InputFile @@ -17,3 +18,4 @@ result = storage.create_file( file = InputFile.from_path('file.png'), permissions = [Permission.read(Role.any())] # optional ) +``` diff --git a/docs/examples/storage/delete-bucket.md b/docs/examples/storage/delete-bucket.md index dd8e8ebc..ae71a793 100644 --- a/docs/examples/storage/delete-bucket.md +++ b/docs/examples/storage/delete-bucket.md @@ -1,3 +1,4 @@ +```python from appwrite.client import Client from appwrite.services.storage import Storage @@ -11,3 +12,4 @@ storage = Storage(client) result = storage.delete_bucket( bucket_id = '' ) +``` diff --git a/docs/examples/storage/delete-file.md b/docs/examples/storage/delete-file.md index 17bc251e..ce1d2604 100644 --- a/docs/examples/storage/delete-file.md +++ b/docs/examples/storage/delete-file.md @@ -1,3 +1,4 @@ +```python from appwrite.client import Client from appwrite.services.storage import Storage @@ -12,3 +13,4 @@ result = storage.delete_file( bucket_id = '', file_id = '' ) +``` diff --git a/docs/examples/storage/get-bucket.md b/docs/examples/storage/get-bucket.md index e5eeb4c0..a12e7204 100644 --- a/docs/examples/storage/get-bucket.md +++ b/docs/examples/storage/get-bucket.md @@ -1,3 +1,4 @@ +```python from appwrite.client import Client from appwrite.services.storage import Storage @@ -11,3 +12,4 @@ storage = Storage(client) result = storage.get_bucket( bucket_id = '' ) +``` diff --git a/docs/examples/storage/get-file-download.md b/docs/examples/storage/get-file-download.md index 411abf8c..790bd726 100644 --- a/docs/examples/storage/get-file-download.md +++ b/docs/examples/storage/get-file-download.md @@ -1,3 +1,4 @@ +```python from appwrite.client import Client from appwrite.services.storage import Storage @@ -13,3 +14,4 @@ result = storage.get_file_download( file_id = '', token = '' # optional ) +``` diff --git a/docs/examples/storage/get-file-preview.md b/docs/examples/storage/get-file-preview.md index f962edc0..b14a6464 100644 --- a/docs/examples/storage/get-file-preview.md +++ b/docs/examples/storage/get-file-preview.md @@ -1,3 +1,4 @@ +```python from appwrite.client import Client from appwrite.services.storage import Storage from appwrite.enums import ImageGravity @@ -26,3 +27,4 @@ result = storage.get_file_preview( output = ImageFormat.JPG, # optional token = '' # optional ) +``` diff --git a/docs/examples/storage/get-file-view.md b/docs/examples/storage/get-file-view.md index 85cbad79..f78822d2 100644 --- a/docs/examples/storage/get-file-view.md +++ b/docs/examples/storage/get-file-view.md @@ -1,3 +1,4 @@ +```python from appwrite.client import Client from appwrite.services.storage import Storage @@ -13,3 +14,4 @@ result = storage.get_file_view( file_id = '', token = '' # optional ) +``` diff --git a/docs/examples/storage/get-file.md b/docs/examples/storage/get-file.md index 461543e3..8c79a68c 100644 --- a/docs/examples/storage/get-file.md +++ b/docs/examples/storage/get-file.md @@ -1,3 +1,4 @@ +```python from appwrite.client import Client from appwrite.services.storage import Storage @@ -12,3 +13,4 @@ result = storage.get_file( bucket_id = '', file_id = '' ) +``` diff --git a/docs/examples/storage/list-buckets.md b/docs/examples/storage/list-buckets.md index 7a2e9de7..5c280cd7 100644 --- a/docs/examples/storage/list-buckets.md +++ b/docs/examples/storage/list-buckets.md @@ -1,3 +1,4 @@ +```python from appwrite.client import Client from appwrite.services.storage import Storage @@ -13,3 +14,4 @@ result = storage.list_buckets( search = '', # optional total = False # optional ) +``` diff --git a/docs/examples/storage/list-files.md b/docs/examples/storage/list-files.md index 88e948cd..5a0e2f2b 100644 --- a/docs/examples/storage/list-files.md +++ b/docs/examples/storage/list-files.md @@ -1,3 +1,4 @@ +```python from appwrite.client import Client from appwrite.services.storage import Storage @@ -14,3 +15,4 @@ result = storage.list_files( search = '', # optional total = False # optional ) +``` diff --git a/docs/examples/storage/update-bucket.md b/docs/examples/storage/update-bucket.md index b0726386..669d9abb 100644 --- a/docs/examples/storage/update-bucket.md +++ b/docs/examples/storage/update-bucket.md @@ -1,3 +1,4 @@ +```python from appwrite.client import Client from appwrite.services.storage import Storage from appwrite.enums import Compression @@ -24,3 +25,4 @@ result = storage.update_bucket( antivirus = False, # optional transformations = False # optional ) +``` diff --git a/docs/examples/storage/update-file.md b/docs/examples/storage/update-file.md index 25acbef8..4e14348f 100644 --- a/docs/examples/storage/update-file.md +++ b/docs/examples/storage/update-file.md @@ -1,3 +1,4 @@ +```python from appwrite.client import Client from appwrite.services.storage import Storage from appwrite.permission import Permission @@ -16,3 +17,4 @@ result = storage.update_file( name = '', # optional permissions = [Permission.read(Role.any())] # optional ) +``` diff --git a/docs/examples/tablesdb/create-boolean-column.md b/docs/examples/tablesdb/create-boolean-column.md index 84702b4c..29b6e432 100644 --- a/docs/examples/tablesdb/create-boolean-column.md +++ b/docs/examples/tablesdb/create-boolean-column.md @@ -1,3 +1,4 @@ +```python from appwrite.client import Client from appwrite.services.tables_db import TablesDB @@ -16,3 +17,4 @@ result = tables_db.create_boolean_column( default = False, # optional array = False # optional ) +``` diff --git a/docs/examples/tablesdb/create-datetime-column.md b/docs/examples/tablesdb/create-datetime-column.md index d5d15905..3f31d638 100644 --- a/docs/examples/tablesdb/create-datetime-column.md +++ b/docs/examples/tablesdb/create-datetime-column.md @@ -1,3 +1,4 @@ +```python from appwrite.client import Client from appwrite.services.tables_db import TablesDB @@ -16,3 +17,4 @@ result = tables_db.create_datetime_column( default = '', # optional array = False # optional ) +``` diff --git a/docs/examples/tablesdb/create-email-column.md b/docs/examples/tablesdb/create-email-column.md index 0e2ccb47..263af1c1 100644 --- a/docs/examples/tablesdb/create-email-column.md +++ b/docs/examples/tablesdb/create-email-column.md @@ -1,3 +1,4 @@ +```python from appwrite.client import Client from appwrite.services.tables_db import TablesDB @@ -16,3 +17,4 @@ result = tables_db.create_email_column( default = 'email@example.com', # optional array = False # optional ) +``` diff --git a/docs/examples/tablesdb/create-enum-column.md b/docs/examples/tablesdb/create-enum-column.md index c2268cb2..6f77c50f 100644 --- a/docs/examples/tablesdb/create-enum-column.md +++ b/docs/examples/tablesdb/create-enum-column.md @@ -1,3 +1,4 @@ +```python from appwrite.client import Client from appwrite.services.tables_db import TablesDB @@ -17,3 +18,4 @@ result = tables_db.create_enum_column( default = '', # optional array = False # optional ) +``` diff --git a/docs/examples/tablesdb/create-float-column.md b/docs/examples/tablesdb/create-float-column.md index 9e35e838..05b1d966 100644 --- a/docs/examples/tablesdb/create-float-column.md +++ b/docs/examples/tablesdb/create-float-column.md @@ -1,3 +1,4 @@ +```python from appwrite.client import Client from appwrite.services.tables_db import TablesDB @@ -18,3 +19,4 @@ result = tables_db.create_float_column( default = None, # optional array = False # optional ) +``` diff --git a/docs/examples/tablesdb/create-index.md b/docs/examples/tablesdb/create-index.md index 9b5959d4..ddf400dd 100644 --- a/docs/examples/tablesdb/create-index.md +++ b/docs/examples/tablesdb/create-index.md @@ -1,3 +1,4 @@ +```python from appwrite.client import Client from appwrite.services.tables_db import TablesDB from appwrite.enums import IndexType @@ -19,3 +20,4 @@ result = tables_db.create_index( orders = [OrderBy.ASC], # optional lengths = [] # optional ) +``` diff --git a/docs/examples/tablesdb/create-integer-column.md b/docs/examples/tablesdb/create-integer-column.md index 0cc20fcf..89e0162c 100644 --- a/docs/examples/tablesdb/create-integer-column.md +++ b/docs/examples/tablesdb/create-integer-column.md @@ -1,3 +1,4 @@ +```python from appwrite.client import Client from appwrite.services.tables_db import TablesDB @@ -18,3 +19,4 @@ result = tables_db.create_integer_column( default = None, # optional array = False # optional ) +``` diff --git a/docs/examples/tablesdb/create-ip-column.md b/docs/examples/tablesdb/create-ip-column.md index 50aa0283..0528b577 100644 --- a/docs/examples/tablesdb/create-ip-column.md +++ b/docs/examples/tablesdb/create-ip-column.md @@ -1,3 +1,4 @@ +```python from appwrite.client import Client from appwrite.services.tables_db import TablesDB @@ -16,3 +17,4 @@ result = tables_db.create_ip_column( default = '', # optional array = False # optional ) +``` diff --git a/docs/examples/tablesdb/create-line-column.md b/docs/examples/tablesdb/create-line-column.md index 11591236..3d99152a 100644 --- a/docs/examples/tablesdb/create-line-column.md +++ b/docs/examples/tablesdb/create-line-column.md @@ -1,3 +1,4 @@ +```python from appwrite.client import Client from appwrite.services.tables_db import TablesDB @@ -15,3 +16,4 @@ result = tables_db.create_line_column( required = False, default = [[1, 2], [3, 4], [5, 6]] # optional ) +``` diff --git a/docs/examples/tablesdb/create-longtext-column.md b/docs/examples/tablesdb/create-longtext-column.md index e0606425..76d798cb 100644 --- a/docs/examples/tablesdb/create-longtext-column.md +++ b/docs/examples/tablesdb/create-longtext-column.md @@ -1,3 +1,4 @@ +```python from appwrite.client import Client from appwrite.services.tables_db import TablesDB @@ -16,3 +17,4 @@ result = tables_db.create_longtext_column( default = '', # optional array = False # optional ) +``` diff --git a/docs/examples/tablesdb/create-mediumtext-column.md b/docs/examples/tablesdb/create-mediumtext-column.md index 25826494..249c660d 100644 --- a/docs/examples/tablesdb/create-mediumtext-column.md +++ b/docs/examples/tablesdb/create-mediumtext-column.md @@ -1,3 +1,4 @@ +```python from appwrite.client import Client from appwrite.services.tables_db import TablesDB @@ -16,3 +17,4 @@ result = tables_db.create_mediumtext_column( default = '', # optional array = False # optional ) +``` diff --git a/docs/examples/tablesdb/create-operations.md b/docs/examples/tablesdb/create-operations.md index a4881a9e..780f0889 100644 --- a/docs/examples/tablesdb/create-operations.md +++ b/docs/examples/tablesdb/create-operations.md @@ -1,3 +1,4 @@ +```python from appwrite.client import Client from appwrite.services.tables_db import TablesDB @@ -22,3 +23,4 @@ result = tables_db.create_operations( } ] # optional ) +``` diff --git a/docs/examples/tablesdb/create-point-column.md b/docs/examples/tablesdb/create-point-column.md index 8f51e95c..311bea4c 100644 --- a/docs/examples/tablesdb/create-point-column.md +++ b/docs/examples/tablesdb/create-point-column.md @@ -1,3 +1,4 @@ +```python from appwrite.client import Client from appwrite.services.tables_db import TablesDB @@ -15,3 +16,4 @@ result = tables_db.create_point_column( required = False, default = [1, 2] # optional ) +``` diff --git a/docs/examples/tablesdb/create-polygon-column.md b/docs/examples/tablesdb/create-polygon-column.md index cf4540e0..9e72cdf6 100644 --- a/docs/examples/tablesdb/create-polygon-column.md +++ b/docs/examples/tablesdb/create-polygon-column.md @@ -1,3 +1,4 @@ +```python from appwrite.client import Client from appwrite.services.tables_db import TablesDB @@ -15,3 +16,4 @@ result = tables_db.create_polygon_column( required = False, default = [[[1, 2], [3, 4], [5, 6], [1, 2]]] # optional ) +``` diff --git a/docs/examples/tablesdb/create-relationship-column.md b/docs/examples/tablesdb/create-relationship-column.md index d72fbfda..3248f0dd 100644 --- a/docs/examples/tablesdb/create-relationship-column.md +++ b/docs/examples/tablesdb/create-relationship-column.md @@ -1,3 +1,4 @@ +```python from appwrite.client import Client from appwrite.services.tables_db import TablesDB from appwrite.enums import RelationshipType @@ -20,3 +21,4 @@ result = tables_db.create_relationship_column( two_way_key = '', # optional on_delete = RelationMutate.CASCADE # optional ) +``` diff --git a/docs/examples/tablesdb/create-row.md b/docs/examples/tablesdb/create-row.md index d2448029..bba8b95d 100644 --- a/docs/examples/tablesdb/create-row.md +++ b/docs/examples/tablesdb/create-row.md @@ -1,3 +1,4 @@ +```python from appwrite.client import Client from appwrite.services.tables_db import TablesDB from appwrite.permission import Permission @@ -24,3 +25,4 @@ result = tables_db.create_row( permissions = [Permission.read(Role.any())], # optional transaction_id = '' # optional ) +``` diff --git a/docs/examples/tablesdb/create-rows.md b/docs/examples/tablesdb/create-rows.md index 1527e0b3..40276d0c 100644 --- a/docs/examples/tablesdb/create-rows.md +++ b/docs/examples/tablesdb/create-rows.md @@ -1,3 +1,4 @@ +```python from appwrite.client import Client from appwrite.services.tables_db import TablesDB @@ -14,3 +15,4 @@ result = tables_db.create_rows( rows = [], transaction_id = '' # optional ) +``` diff --git a/docs/examples/tablesdb/create-string-column.md b/docs/examples/tablesdb/create-string-column.md index 778a0b4e..584944d2 100644 --- a/docs/examples/tablesdb/create-string-column.md +++ b/docs/examples/tablesdb/create-string-column.md @@ -1,3 +1,4 @@ +```python from appwrite.client import Client from appwrite.services.tables_db import TablesDB @@ -18,3 +19,4 @@ result = tables_db.create_string_column( array = False, # optional encrypt = False # optional ) +``` diff --git a/docs/examples/tablesdb/create-table.md b/docs/examples/tablesdb/create-table.md index 649a4e8a..d6b9c5f3 100644 --- a/docs/examples/tablesdb/create-table.md +++ b/docs/examples/tablesdb/create-table.md @@ -1,3 +1,4 @@ +```python from appwrite.client import Client from appwrite.services.tables_db import TablesDB from appwrite.permission import Permission @@ -20,3 +21,4 @@ result = tables_db.create_table( columns = [], # optional indexes = [] # optional ) +``` diff --git a/docs/examples/tablesdb/create-text-column.md b/docs/examples/tablesdb/create-text-column.md index d4b23646..313e81c1 100644 --- a/docs/examples/tablesdb/create-text-column.md +++ b/docs/examples/tablesdb/create-text-column.md @@ -1,3 +1,4 @@ +```python from appwrite.client import Client from appwrite.services.tables_db import TablesDB @@ -16,3 +17,4 @@ result = tables_db.create_text_column( default = '', # optional array = False # optional ) +``` diff --git a/docs/examples/tablesdb/create-transaction.md b/docs/examples/tablesdb/create-transaction.md index 05cc80ea..9fb96a08 100644 --- a/docs/examples/tablesdb/create-transaction.md +++ b/docs/examples/tablesdb/create-transaction.md @@ -1,3 +1,4 @@ +```python from appwrite.client import Client from appwrite.services.tables_db import TablesDB @@ -11,3 +12,4 @@ tables_db = TablesDB(client) result = tables_db.create_transaction( ttl = 60 # optional ) +``` diff --git a/docs/examples/tablesdb/create-url-column.md b/docs/examples/tablesdb/create-url-column.md index b235cdfc..7daa52b5 100644 --- a/docs/examples/tablesdb/create-url-column.md +++ b/docs/examples/tablesdb/create-url-column.md @@ -1,3 +1,4 @@ +```python from appwrite.client import Client from appwrite.services.tables_db import TablesDB @@ -16,3 +17,4 @@ result = tables_db.create_url_column( default = 'https://example.com', # optional array = False # optional ) +``` diff --git a/docs/examples/tablesdb/create-varchar-column.md b/docs/examples/tablesdb/create-varchar-column.md index 385c7776..85848b42 100644 --- a/docs/examples/tablesdb/create-varchar-column.md +++ b/docs/examples/tablesdb/create-varchar-column.md @@ -1,3 +1,4 @@ +```python from appwrite.client import Client from appwrite.services.tables_db import TablesDB @@ -17,3 +18,4 @@ result = tables_db.create_varchar_column( default = '', # optional array = False # optional ) +``` diff --git a/docs/examples/tablesdb/create.md b/docs/examples/tablesdb/create.md index 9d64e9ab..7505f52a 100644 --- a/docs/examples/tablesdb/create.md +++ b/docs/examples/tablesdb/create.md @@ -1,3 +1,4 @@ +```python from appwrite.client import Client from appwrite.services.tables_db import TablesDB @@ -13,3 +14,4 @@ result = tables_db.create( name = '', enabled = False # optional ) +``` diff --git a/docs/examples/tablesdb/decrement-row-column.md b/docs/examples/tablesdb/decrement-row-column.md index d207bb1b..56cbb2d8 100644 --- a/docs/examples/tablesdb/decrement-row-column.md +++ b/docs/examples/tablesdb/decrement-row-column.md @@ -1,3 +1,4 @@ +```python from appwrite.client import Client from appwrite.services.tables_db import TablesDB @@ -17,3 +18,4 @@ result = tables_db.decrement_row_column( min = None, # optional transaction_id = '' # optional ) +``` diff --git a/docs/examples/tablesdb/delete-column.md b/docs/examples/tablesdb/delete-column.md index 9014ccc9..e28b91b1 100644 --- a/docs/examples/tablesdb/delete-column.md +++ b/docs/examples/tablesdb/delete-column.md @@ -1,3 +1,4 @@ +```python from appwrite.client import Client from appwrite.services.tables_db import TablesDB @@ -13,3 +14,4 @@ result = tables_db.delete_column( table_id = '', key = '' ) +``` diff --git a/docs/examples/tablesdb/delete-index.md b/docs/examples/tablesdb/delete-index.md index e19de0eb..46379313 100644 --- a/docs/examples/tablesdb/delete-index.md +++ b/docs/examples/tablesdb/delete-index.md @@ -1,3 +1,4 @@ +```python from appwrite.client import Client from appwrite.services.tables_db import TablesDB @@ -13,3 +14,4 @@ result = tables_db.delete_index( table_id = '', key = '' ) +``` diff --git a/docs/examples/tablesdb/delete-row.md b/docs/examples/tablesdb/delete-row.md index 3943ab27..7615459e 100644 --- a/docs/examples/tablesdb/delete-row.md +++ b/docs/examples/tablesdb/delete-row.md @@ -1,3 +1,4 @@ +```python from appwrite.client import Client from appwrite.services.tables_db import TablesDB @@ -14,3 +15,4 @@ result = tables_db.delete_row( row_id = '', transaction_id = '' # optional ) +``` diff --git a/docs/examples/tablesdb/delete-rows.md b/docs/examples/tablesdb/delete-rows.md index 290d6d34..5164fc14 100644 --- a/docs/examples/tablesdb/delete-rows.md +++ b/docs/examples/tablesdb/delete-rows.md @@ -1,3 +1,4 @@ +```python from appwrite.client import Client from appwrite.services.tables_db import TablesDB @@ -14,3 +15,4 @@ result = tables_db.delete_rows( queries = [], # optional transaction_id = '' # optional ) +``` diff --git a/docs/examples/tablesdb/delete-table.md b/docs/examples/tablesdb/delete-table.md index a91b7bfb..59975370 100644 --- a/docs/examples/tablesdb/delete-table.md +++ b/docs/examples/tablesdb/delete-table.md @@ -1,3 +1,4 @@ +```python from appwrite.client import Client from appwrite.services.tables_db import TablesDB @@ -12,3 +13,4 @@ result = tables_db.delete_table( database_id = '', table_id = '' ) +``` diff --git a/docs/examples/tablesdb/delete-transaction.md b/docs/examples/tablesdb/delete-transaction.md index 6d2957f3..cbbbc5d9 100644 --- a/docs/examples/tablesdb/delete-transaction.md +++ b/docs/examples/tablesdb/delete-transaction.md @@ -1,3 +1,4 @@ +```python from appwrite.client import Client from appwrite.services.tables_db import TablesDB @@ -11,3 +12,4 @@ tables_db = TablesDB(client) result = tables_db.delete_transaction( transaction_id = '' ) +``` diff --git a/docs/examples/tablesdb/delete.md b/docs/examples/tablesdb/delete.md index 5bdc7152..9859c1e9 100644 --- a/docs/examples/tablesdb/delete.md +++ b/docs/examples/tablesdb/delete.md @@ -1,3 +1,4 @@ +```python from appwrite.client import Client from appwrite.services.tables_db import TablesDB @@ -11,3 +12,4 @@ tables_db = TablesDB(client) result = tables_db.delete( database_id = '' ) +``` diff --git a/docs/examples/tablesdb/get-column.md b/docs/examples/tablesdb/get-column.md index 57be1dfa..1d52922d 100644 --- a/docs/examples/tablesdb/get-column.md +++ b/docs/examples/tablesdb/get-column.md @@ -1,3 +1,4 @@ +```python from appwrite.client import Client from appwrite.services.tables_db import TablesDB @@ -13,3 +14,4 @@ result = tables_db.get_column( table_id = '', key = '' ) +``` diff --git a/docs/examples/tablesdb/get-index.md b/docs/examples/tablesdb/get-index.md index 400bf718..006da010 100644 --- a/docs/examples/tablesdb/get-index.md +++ b/docs/examples/tablesdb/get-index.md @@ -1,3 +1,4 @@ +```python from appwrite.client import Client from appwrite.services.tables_db import TablesDB @@ -13,3 +14,4 @@ result = tables_db.get_index( table_id = '', key = '' ) +``` diff --git a/docs/examples/tablesdb/get-row.md b/docs/examples/tablesdb/get-row.md index 4398c9a4..6b10f3e2 100644 --- a/docs/examples/tablesdb/get-row.md +++ b/docs/examples/tablesdb/get-row.md @@ -1,3 +1,4 @@ +```python from appwrite.client import Client from appwrite.services.tables_db import TablesDB @@ -15,3 +16,4 @@ result = tables_db.get_row( queries = [], # optional transaction_id = '' # optional ) +``` diff --git a/docs/examples/tablesdb/get-table.md b/docs/examples/tablesdb/get-table.md index b28cd3d4..6cd8f061 100644 --- a/docs/examples/tablesdb/get-table.md +++ b/docs/examples/tablesdb/get-table.md @@ -1,3 +1,4 @@ +```python from appwrite.client import Client from appwrite.services.tables_db import TablesDB @@ -12,3 +13,4 @@ result = tables_db.get_table( database_id = '', table_id = '' ) +``` diff --git a/docs/examples/tablesdb/get-transaction.md b/docs/examples/tablesdb/get-transaction.md index e50c63af..d2f4b7df 100644 --- a/docs/examples/tablesdb/get-transaction.md +++ b/docs/examples/tablesdb/get-transaction.md @@ -1,3 +1,4 @@ +```python from appwrite.client import Client from appwrite.services.tables_db import TablesDB @@ -11,3 +12,4 @@ tables_db = TablesDB(client) result = tables_db.get_transaction( transaction_id = '' ) +``` diff --git a/docs/examples/tablesdb/get.md b/docs/examples/tablesdb/get.md index 66343500..a3c0c216 100644 --- a/docs/examples/tablesdb/get.md +++ b/docs/examples/tablesdb/get.md @@ -1,3 +1,4 @@ +```python from appwrite.client import Client from appwrite.services.tables_db import TablesDB @@ -11,3 +12,4 @@ tables_db = TablesDB(client) result = tables_db.get( database_id = '' ) +``` diff --git a/docs/examples/tablesdb/increment-row-column.md b/docs/examples/tablesdb/increment-row-column.md index 8e121f65..75a9003b 100644 --- a/docs/examples/tablesdb/increment-row-column.md +++ b/docs/examples/tablesdb/increment-row-column.md @@ -1,3 +1,4 @@ +```python from appwrite.client import Client from appwrite.services.tables_db import TablesDB @@ -17,3 +18,4 @@ result = tables_db.increment_row_column( max = None, # optional transaction_id = '' # optional ) +``` diff --git a/docs/examples/tablesdb/list-columns.md b/docs/examples/tablesdb/list-columns.md index 944e53af..36434877 100644 --- a/docs/examples/tablesdb/list-columns.md +++ b/docs/examples/tablesdb/list-columns.md @@ -1,3 +1,4 @@ +```python from appwrite.client import Client from appwrite.services.tables_db import TablesDB @@ -14,3 +15,4 @@ result = tables_db.list_columns( queries = [], # optional total = False # optional ) +``` diff --git a/docs/examples/tablesdb/list-indexes.md b/docs/examples/tablesdb/list-indexes.md index cc6f4d25..2263fc90 100644 --- a/docs/examples/tablesdb/list-indexes.md +++ b/docs/examples/tablesdb/list-indexes.md @@ -1,3 +1,4 @@ +```python from appwrite.client import Client from appwrite.services.tables_db import TablesDB @@ -14,3 +15,4 @@ result = tables_db.list_indexes( queries = [], # optional total = False # optional ) +``` diff --git a/docs/examples/tablesdb/list-rows.md b/docs/examples/tablesdb/list-rows.md index 179ec90e..150ff6d5 100644 --- a/docs/examples/tablesdb/list-rows.md +++ b/docs/examples/tablesdb/list-rows.md @@ -1,3 +1,4 @@ +```python from appwrite.client import Client from appwrite.services.tables_db import TablesDB @@ -15,3 +16,4 @@ result = tables_db.list_rows( transaction_id = '', # optional total = False # optional ) +``` diff --git a/docs/examples/tablesdb/list-tables.md b/docs/examples/tablesdb/list-tables.md index 3bb484af..48937e8c 100644 --- a/docs/examples/tablesdb/list-tables.md +++ b/docs/examples/tablesdb/list-tables.md @@ -1,3 +1,4 @@ +```python from appwrite.client import Client from appwrite.services.tables_db import TablesDB @@ -14,3 +15,4 @@ result = tables_db.list_tables( search = '', # optional total = False # optional ) +``` diff --git a/docs/examples/tablesdb/list-transactions.md b/docs/examples/tablesdb/list-transactions.md index e597c2d6..6f861992 100644 --- a/docs/examples/tablesdb/list-transactions.md +++ b/docs/examples/tablesdb/list-transactions.md @@ -1,3 +1,4 @@ +```python from appwrite.client import Client from appwrite.services.tables_db import TablesDB @@ -11,3 +12,4 @@ tables_db = TablesDB(client) result = tables_db.list_transactions( queries = [] # optional ) +``` diff --git a/docs/examples/tablesdb/list.md b/docs/examples/tablesdb/list.md index 594e8cb2..d687a42f 100644 --- a/docs/examples/tablesdb/list.md +++ b/docs/examples/tablesdb/list.md @@ -1,3 +1,4 @@ +```python from appwrite.client import Client from appwrite.services.tables_db import TablesDB @@ -13,3 +14,4 @@ result = tables_db.list( search = '', # optional total = False # optional ) +``` diff --git a/docs/examples/tablesdb/update-boolean-column.md b/docs/examples/tablesdb/update-boolean-column.md index abe6b97b..d140cc11 100644 --- a/docs/examples/tablesdb/update-boolean-column.md +++ b/docs/examples/tablesdb/update-boolean-column.md @@ -1,3 +1,4 @@ +```python from appwrite.client import Client from appwrite.services.tables_db import TablesDB @@ -16,3 +17,4 @@ result = tables_db.update_boolean_column( default = False, new_key = '' # optional ) +``` diff --git a/docs/examples/tablesdb/update-datetime-column.md b/docs/examples/tablesdb/update-datetime-column.md index 1c150b50..3e0955c9 100644 --- a/docs/examples/tablesdb/update-datetime-column.md +++ b/docs/examples/tablesdb/update-datetime-column.md @@ -1,3 +1,4 @@ +```python from appwrite.client import Client from appwrite.services.tables_db import TablesDB @@ -16,3 +17,4 @@ result = tables_db.update_datetime_column( default = '', new_key = '' # optional ) +``` diff --git a/docs/examples/tablesdb/update-email-column.md b/docs/examples/tablesdb/update-email-column.md index 96a56ec7..cd5a84be 100644 --- a/docs/examples/tablesdb/update-email-column.md +++ b/docs/examples/tablesdb/update-email-column.md @@ -1,3 +1,4 @@ +```python from appwrite.client import Client from appwrite.services.tables_db import TablesDB @@ -16,3 +17,4 @@ result = tables_db.update_email_column( default = 'email@example.com', new_key = '' # optional ) +``` diff --git a/docs/examples/tablesdb/update-enum-column.md b/docs/examples/tablesdb/update-enum-column.md index f07b6286..612bdc82 100644 --- a/docs/examples/tablesdb/update-enum-column.md +++ b/docs/examples/tablesdb/update-enum-column.md @@ -1,3 +1,4 @@ +```python from appwrite.client import Client from appwrite.services.tables_db import TablesDB @@ -17,3 +18,4 @@ result = tables_db.update_enum_column( default = '', new_key = '' # optional ) +``` diff --git a/docs/examples/tablesdb/update-float-column.md b/docs/examples/tablesdb/update-float-column.md index 1dfcccde..a622f8b4 100644 --- a/docs/examples/tablesdb/update-float-column.md +++ b/docs/examples/tablesdb/update-float-column.md @@ -1,3 +1,4 @@ +```python from appwrite.client import Client from appwrite.services.tables_db import TablesDB @@ -18,3 +19,4 @@ result = tables_db.update_float_column( max = None, # optional new_key = '' # optional ) +``` diff --git a/docs/examples/tablesdb/update-integer-column.md b/docs/examples/tablesdb/update-integer-column.md index a38c4dad..060d38d6 100644 --- a/docs/examples/tablesdb/update-integer-column.md +++ b/docs/examples/tablesdb/update-integer-column.md @@ -1,3 +1,4 @@ +```python from appwrite.client import Client from appwrite.services.tables_db import TablesDB @@ -18,3 +19,4 @@ result = tables_db.update_integer_column( max = None, # optional new_key = '' # optional ) +``` diff --git a/docs/examples/tablesdb/update-ip-column.md b/docs/examples/tablesdb/update-ip-column.md index 780a2b02..636ec3ca 100644 --- a/docs/examples/tablesdb/update-ip-column.md +++ b/docs/examples/tablesdb/update-ip-column.md @@ -1,3 +1,4 @@ +```python from appwrite.client import Client from appwrite.services.tables_db import TablesDB @@ -16,3 +17,4 @@ result = tables_db.update_ip_column( default = '', new_key = '' # optional ) +``` diff --git a/docs/examples/tablesdb/update-line-column.md b/docs/examples/tablesdb/update-line-column.md index 2f02b61e..d7b77395 100644 --- a/docs/examples/tablesdb/update-line-column.md +++ b/docs/examples/tablesdb/update-line-column.md @@ -1,3 +1,4 @@ +```python from appwrite.client import Client from appwrite.services.tables_db import TablesDB @@ -16,3 +17,4 @@ result = tables_db.update_line_column( default = [[1, 2], [3, 4], [5, 6]], # optional new_key = '' # optional ) +``` diff --git a/docs/examples/tablesdb/update-longtext-column.md b/docs/examples/tablesdb/update-longtext-column.md index d4abf30c..16deaeb9 100644 --- a/docs/examples/tablesdb/update-longtext-column.md +++ b/docs/examples/tablesdb/update-longtext-column.md @@ -1,3 +1,4 @@ +```python from appwrite.client import Client from appwrite.services.tables_db import TablesDB @@ -16,3 +17,4 @@ result = tables_db.update_longtext_column( default = '', new_key = '' # optional ) +``` diff --git a/docs/examples/tablesdb/update-mediumtext-column.md b/docs/examples/tablesdb/update-mediumtext-column.md index a7aa045b..18ac7ced 100644 --- a/docs/examples/tablesdb/update-mediumtext-column.md +++ b/docs/examples/tablesdb/update-mediumtext-column.md @@ -1,3 +1,4 @@ +```python from appwrite.client import Client from appwrite.services.tables_db import TablesDB @@ -16,3 +17,4 @@ result = tables_db.update_mediumtext_column( default = '', new_key = '' # optional ) +``` diff --git a/docs/examples/tablesdb/update-point-column.md b/docs/examples/tablesdb/update-point-column.md index 63fb3083..a75546ca 100644 --- a/docs/examples/tablesdb/update-point-column.md +++ b/docs/examples/tablesdb/update-point-column.md @@ -1,3 +1,4 @@ +```python from appwrite.client import Client from appwrite.services.tables_db import TablesDB @@ -16,3 +17,4 @@ result = tables_db.update_point_column( default = [1, 2], # optional new_key = '' # optional ) +``` diff --git a/docs/examples/tablesdb/update-polygon-column.md b/docs/examples/tablesdb/update-polygon-column.md index 07118b1c..33d3b2ac 100644 --- a/docs/examples/tablesdb/update-polygon-column.md +++ b/docs/examples/tablesdb/update-polygon-column.md @@ -1,3 +1,4 @@ +```python from appwrite.client import Client from appwrite.services.tables_db import TablesDB @@ -16,3 +17,4 @@ result = tables_db.update_polygon_column( default = [[[1, 2], [3, 4], [5, 6], [1, 2]]], # optional new_key = '' # optional ) +``` diff --git a/docs/examples/tablesdb/update-relationship-column.md b/docs/examples/tablesdb/update-relationship-column.md index 560590ec..a10395d7 100644 --- a/docs/examples/tablesdb/update-relationship-column.md +++ b/docs/examples/tablesdb/update-relationship-column.md @@ -1,3 +1,4 @@ +```python from appwrite.client import Client from appwrite.services.tables_db import TablesDB from appwrite.enums import RelationMutate @@ -16,3 +17,4 @@ result = tables_db.update_relationship_column( on_delete = RelationMutate.CASCADE, # optional new_key = '' # optional ) +``` diff --git a/docs/examples/tablesdb/update-row.md b/docs/examples/tablesdb/update-row.md index d6a55c64..1cabdbee 100644 --- a/docs/examples/tablesdb/update-row.md +++ b/docs/examples/tablesdb/update-row.md @@ -1,3 +1,4 @@ +```python from appwrite.client import Client from appwrite.services.tables_db import TablesDB from appwrite.permission import Permission @@ -24,3 +25,4 @@ result = tables_db.update_row( permissions = [Permission.read(Role.any())], # optional transaction_id = '' # optional ) +``` diff --git a/docs/examples/tablesdb/update-rows.md b/docs/examples/tablesdb/update-rows.md index 77360af4..0a702919 100644 --- a/docs/examples/tablesdb/update-rows.md +++ b/docs/examples/tablesdb/update-rows.md @@ -1,3 +1,4 @@ +```python from appwrite.client import Client from appwrite.services.tables_db import TablesDB @@ -21,3 +22,4 @@ result = tables_db.update_rows( queries = [], # optional transaction_id = '' # optional ) +``` diff --git a/docs/examples/tablesdb/update-string-column.md b/docs/examples/tablesdb/update-string-column.md index f5106ae7..cbc8655b 100644 --- a/docs/examples/tablesdb/update-string-column.md +++ b/docs/examples/tablesdb/update-string-column.md @@ -1,3 +1,4 @@ +```python from appwrite.client import Client from appwrite.services.tables_db import TablesDB @@ -17,3 +18,4 @@ result = tables_db.update_string_column( size = 1, # optional new_key = '' # optional ) +``` diff --git a/docs/examples/tablesdb/update-table.md b/docs/examples/tablesdb/update-table.md index 4d1a5724..d45df51a 100644 --- a/docs/examples/tablesdb/update-table.md +++ b/docs/examples/tablesdb/update-table.md @@ -1,3 +1,4 @@ +```python from appwrite.client import Client from appwrite.services.tables_db import TablesDB from appwrite.permission import Permission @@ -18,3 +19,4 @@ result = tables_db.update_table( row_security = False, # optional enabled = False # optional ) +``` diff --git a/docs/examples/tablesdb/update-text-column.md b/docs/examples/tablesdb/update-text-column.md index 5dd4b4a0..47cce30b 100644 --- a/docs/examples/tablesdb/update-text-column.md +++ b/docs/examples/tablesdb/update-text-column.md @@ -1,3 +1,4 @@ +```python from appwrite.client import Client from appwrite.services.tables_db import TablesDB @@ -16,3 +17,4 @@ result = tables_db.update_text_column( default = '', new_key = '' # optional ) +``` diff --git a/docs/examples/tablesdb/update-transaction.md b/docs/examples/tablesdb/update-transaction.md index 97b518dc..c55340d7 100644 --- a/docs/examples/tablesdb/update-transaction.md +++ b/docs/examples/tablesdb/update-transaction.md @@ -1,3 +1,4 @@ +```python from appwrite.client import Client from appwrite.services.tables_db import TablesDB @@ -13,3 +14,4 @@ result = tables_db.update_transaction( commit = False, # optional rollback = False # optional ) +``` diff --git a/docs/examples/tablesdb/update-url-column.md b/docs/examples/tablesdb/update-url-column.md index 6e6c722b..1af172ce 100644 --- a/docs/examples/tablesdb/update-url-column.md +++ b/docs/examples/tablesdb/update-url-column.md @@ -1,3 +1,4 @@ +```python from appwrite.client import Client from appwrite.services.tables_db import TablesDB @@ -16,3 +17,4 @@ result = tables_db.update_url_column( default = 'https://example.com', new_key = '' # optional ) +``` diff --git a/docs/examples/tablesdb/update-varchar-column.md b/docs/examples/tablesdb/update-varchar-column.md index 5e16a2e0..b1dc732d 100644 --- a/docs/examples/tablesdb/update-varchar-column.md +++ b/docs/examples/tablesdb/update-varchar-column.md @@ -1,3 +1,4 @@ +```python from appwrite.client import Client from appwrite.services.tables_db import TablesDB @@ -17,3 +18,4 @@ result = tables_db.update_varchar_column( size = 1, # optional new_key = '' # optional ) +``` diff --git a/docs/examples/tablesdb/update.md b/docs/examples/tablesdb/update.md index b86d0883..85b5c963 100644 --- a/docs/examples/tablesdb/update.md +++ b/docs/examples/tablesdb/update.md @@ -1,3 +1,4 @@ +```python from appwrite.client import Client from appwrite.services.tables_db import TablesDB @@ -13,3 +14,4 @@ result = tables_db.update( name = '', # optional enabled = False # optional ) +``` diff --git a/docs/examples/tablesdb/upsert-row.md b/docs/examples/tablesdb/upsert-row.md index d0520b38..f985e84f 100644 --- a/docs/examples/tablesdb/upsert-row.md +++ b/docs/examples/tablesdb/upsert-row.md @@ -1,3 +1,4 @@ +```python from appwrite.client import Client from appwrite.services.tables_db import TablesDB from appwrite.permission import Permission @@ -24,3 +25,4 @@ result = tables_db.upsert_row( permissions = [Permission.read(Role.any())], # optional transaction_id = '' # optional ) +``` diff --git a/docs/examples/tablesdb/upsert-rows.md b/docs/examples/tablesdb/upsert-rows.md index d42e259f..d3397134 100644 --- a/docs/examples/tablesdb/upsert-rows.md +++ b/docs/examples/tablesdb/upsert-rows.md @@ -1,3 +1,4 @@ +```python from appwrite.client import Client from appwrite.services.tables_db import TablesDB @@ -14,3 +15,4 @@ result = tables_db.upsert_rows( rows = [], transaction_id = '' # optional ) +``` diff --git a/docs/examples/teams/create-membership.md b/docs/examples/teams/create-membership.md index aa811be5..71442d4f 100644 --- a/docs/examples/teams/create-membership.md +++ b/docs/examples/teams/create-membership.md @@ -1,6 +1,6 @@ +```python from appwrite.client import Client from appwrite.services.teams import Teams -from appwrite.enums import Roles client = Client() client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint @@ -11,10 +11,11 @@ teams = Teams(client) result = teams.create_membership( team_id = '', - roles = [Roles.ADMIN], + roles = [], email = 'email@example.com', # optional user_id = '', # optional phone = '+12065550100', # optional url = 'https://example.com', # optional name = '' # optional ) +``` diff --git a/docs/examples/teams/create.md b/docs/examples/teams/create.md index f623151b..d366d056 100644 --- a/docs/examples/teams/create.md +++ b/docs/examples/teams/create.md @@ -1,3 +1,4 @@ +```python from appwrite.client import Client from appwrite.services.teams import Teams @@ -13,3 +14,4 @@ result = teams.create( name = '', roles = [] # optional ) +``` diff --git a/docs/examples/teams/delete-membership.md b/docs/examples/teams/delete-membership.md index 6fb21826..2ed97d15 100644 --- a/docs/examples/teams/delete-membership.md +++ b/docs/examples/teams/delete-membership.md @@ -1,3 +1,4 @@ +```python from appwrite.client import Client from appwrite.services.teams import Teams @@ -12,3 +13,4 @@ result = teams.delete_membership( team_id = '', membership_id = '' ) +``` diff --git a/docs/examples/teams/delete.md b/docs/examples/teams/delete.md index 056114bf..c9a65b37 100644 --- a/docs/examples/teams/delete.md +++ b/docs/examples/teams/delete.md @@ -1,3 +1,4 @@ +```python from appwrite.client import Client from appwrite.services.teams import Teams @@ -11,3 +12,4 @@ teams = Teams(client) result = teams.delete( team_id = '' ) +``` diff --git a/docs/examples/teams/get-membership.md b/docs/examples/teams/get-membership.md index 3c028a5c..91c5b2a6 100644 --- a/docs/examples/teams/get-membership.md +++ b/docs/examples/teams/get-membership.md @@ -1,3 +1,4 @@ +```python from appwrite.client import Client from appwrite.services.teams import Teams @@ -12,3 +13,4 @@ result = teams.get_membership( team_id = '', membership_id = '' ) +``` diff --git a/docs/examples/teams/get-prefs.md b/docs/examples/teams/get-prefs.md index 8d645897..8f41f631 100644 --- a/docs/examples/teams/get-prefs.md +++ b/docs/examples/teams/get-prefs.md @@ -1,3 +1,4 @@ +```python from appwrite.client import Client from appwrite.services.teams import Teams @@ -11,3 +12,4 @@ teams = Teams(client) result = teams.get_prefs( team_id = '' ) +``` diff --git a/docs/examples/teams/get.md b/docs/examples/teams/get.md index 55f172ea..0f6d8809 100644 --- a/docs/examples/teams/get.md +++ b/docs/examples/teams/get.md @@ -1,3 +1,4 @@ +```python from appwrite.client import Client from appwrite.services.teams import Teams @@ -11,3 +12,4 @@ teams = Teams(client) result = teams.get( team_id = '' ) +``` diff --git a/docs/examples/teams/list-memberships.md b/docs/examples/teams/list-memberships.md index f0e9d315..3e105ad2 100644 --- a/docs/examples/teams/list-memberships.md +++ b/docs/examples/teams/list-memberships.md @@ -1,3 +1,4 @@ +```python from appwrite.client import Client from appwrite.services.teams import Teams @@ -14,3 +15,4 @@ result = teams.list_memberships( search = '', # optional total = False # optional ) +``` diff --git a/docs/examples/teams/list.md b/docs/examples/teams/list.md index 293ed242..9c43f9ed 100644 --- a/docs/examples/teams/list.md +++ b/docs/examples/teams/list.md @@ -1,3 +1,4 @@ +```python from appwrite.client import Client from appwrite.services.teams import Teams @@ -13,3 +14,4 @@ result = teams.list( search = '', # optional total = False # optional ) +``` diff --git a/docs/examples/teams/update-membership-status.md b/docs/examples/teams/update-membership-status.md index 9c084215..2d9d1f38 100644 --- a/docs/examples/teams/update-membership-status.md +++ b/docs/examples/teams/update-membership-status.md @@ -1,3 +1,4 @@ +```python from appwrite.client import Client from appwrite.services.teams import Teams @@ -14,3 +15,4 @@ result = teams.update_membership_status( user_id = '', secret = '' ) +``` diff --git a/docs/examples/teams/update-membership.md b/docs/examples/teams/update-membership.md index dc6be189..bb10886f 100644 --- a/docs/examples/teams/update-membership.md +++ b/docs/examples/teams/update-membership.md @@ -1,6 +1,6 @@ +```python from appwrite.client import Client from appwrite.services.teams import Teams -from appwrite.enums import Roles client = Client() client.set_endpoint('https://.cloud.appwrite.io/v1') # Your API Endpoint @@ -12,5 +12,6 @@ teams = Teams(client) result = teams.update_membership( team_id = '', membership_id = '', - roles = [Roles.ADMIN] + roles = [] ) +``` diff --git a/docs/examples/teams/update-name.md b/docs/examples/teams/update-name.md index 160b4969..893e3ed2 100644 --- a/docs/examples/teams/update-name.md +++ b/docs/examples/teams/update-name.md @@ -1,3 +1,4 @@ +```python from appwrite.client import Client from appwrite.services.teams import Teams @@ -12,3 +13,4 @@ result = teams.update_name( team_id = '', name = '' ) +``` diff --git a/docs/examples/teams/update-prefs.md b/docs/examples/teams/update-prefs.md index e82da1b6..e4fb8228 100644 --- a/docs/examples/teams/update-prefs.md +++ b/docs/examples/teams/update-prefs.md @@ -1,3 +1,4 @@ +```python from appwrite.client import Client from appwrite.services.teams import Teams @@ -12,3 +13,4 @@ result = teams.update_prefs( team_id = '', prefs = {} ) +``` diff --git a/docs/examples/tokens/create-file-token.md b/docs/examples/tokens/create-file-token.md index f835a0ea..fe05a652 100644 --- a/docs/examples/tokens/create-file-token.md +++ b/docs/examples/tokens/create-file-token.md @@ -1,3 +1,4 @@ +```python from appwrite.client import Client from appwrite.services.tokens import Tokens @@ -13,3 +14,4 @@ result = tokens.create_file_token( file_id = '', expire = '' # optional ) +``` diff --git a/docs/examples/tokens/delete.md b/docs/examples/tokens/delete.md index 47619321..80777fd0 100644 --- a/docs/examples/tokens/delete.md +++ b/docs/examples/tokens/delete.md @@ -1,3 +1,4 @@ +```python from appwrite.client import Client from appwrite.services.tokens import Tokens @@ -11,3 +12,4 @@ tokens = Tokens(client) result = tokens.delete( token_id = '' ) +``` diff --git a/docs/examples/tokens/get.md b/docs/examples/tokens/get.md index 0d6abb81..aee3a97d 100644 --- a/docs/examples/tokens/get.md +++ b/docs/examples/tokens/get.md @@ -1,3 +1,4 @@ +```python from appwrite.client import Client from appwrite.services.tokens import Tokens @@ -11,3 +12,4 @@ tokens = Tokens(client) result = tokens.get( token_id = '' ) +``` diff --git a/docs/examples/tokens/list.md b/docs/examples/tokens/list.md index 53092033..9464504c 100644 --- a/docs/examples/tokens/list.md +++ b/docs/examples/tokens/list.md @@ -1,3 +1,4 @@ +```python from appwrite.client import Client from appwrite.services.tokens import Tokens @@ -14,3 +15,4 @@ result = tokens.list( queries = [], # optional total = False # optional ) +``` diff --git a/docs/examples/tokens/update.md b/docs/examples/tokens/update.md index 18b04445..abf544b3 100644 --- a/docs/examples/tokens/update.md +++ b/docs/examples/tokens/update.md @@ -1,3 +1,4 @@ +```python from appwrite.client import Client from appwrite.services.tokens import Tokens @@ -12,3 +13,4 @@ result = tokens.update( token_id = '', expire = '' # optional ) +``` diff --git a/docs/examples/users/create-argon-2-user.md b/docs/examples/users/create-argon-2-user.md index 5e95cc26..a54b2c02 100644 --- a/docs/examples/users/create-argon-2-user.md +++ b/docs/examples/users/create-argon-2-user.md @@ -1,3 +1,4 @@ +```python from appwrite.client import Client from appwrite.services.users import Users @@ -14,3 +15,4 @@ result = users.create_argon2_user( password = 'password', name = '' # optional ) +``` diff --git a/docs/examples/users/create-bcrypt-user.md b/docs/examples/users/create-bcrypt-user.md index d3d9e215..804181bd 100644 --- a/docs/examples/users/create-bcrypt-user.md +++ b/docs/examples/users/create-bcrypt-user.md @@ -1,3 +1,4 @@ +```python from appwrite.client import Client from appwrite.services.users import Users @@ -14,3 +15,4 @@ result = users.create_bcrypt_user( password = 'password', name = '' # optional ) +``` diff --git a/docs/examples/users/create-jwt.md b/docs/examples/users/create-jwt.md index bed6c483..1ccf4737 100644 --- a/docs/examples/users/create-jwt.md +++ b/docs/examples/users/create-jwt.md @@ -1,3 +1,4 @@ +```python from appwrite.client import Client from appwrite.services.users import Users @@ -13,3 +14,4 @@ result = users.create_jwt( session_id = '', # optional duration = 0 # optional ) +``` diff --git a/docs/examples/users/create-md-5-user.md b/docs/examples/users/create-md-5-user.md index b1cbb53f..f8699179 100644 --- a/docs/examples/users/create-md-5-user.md +++ b/docs/examples/users/create-md-5-user.md @@ -1,3 +1,4 @@ +```python from appwrite.client import Client from appwrite.services.users import Users @@ -14,3 +15,4 @@ result = users.create_md5_user( password = 'password', name = '' # optional ) +``` diff --git a/docs/examples/users/create-mfa-recovery-codes.md b/docs/examples/users/create-mfa-recovery-codes.md index 64a87c05..d6da65ba 100644 --- a/docs/examples/users/create-mfa-recovery-codes.md +++ b/docs/examples/users/create-mfa-recovery-codes.md @@ -1,3 +1,4 @@ +```python from appwrite.client import Client from appwrite.services.users import Users @@ -11,3 +12,4 @@ users = Users(client) result = users.create_mfa_recovery_codes( user_id = '' ) +``` diff --git a/docs/examples/users/create-ph-pass-user.md b/docs/examples/users/create-ph-pass-user.md index 33f65f44..c762b982 100644 --- a/docs/examples/users/create-ph-pass-user.md +++ b/docs/examples/users/create-ph-pass-user.md @@ -1,3 +1,4 @@ +```python from appwrite.client import Client from appwrite.services.users import Users @@ -14,3 +15,4 @@ result = users.create_ph_pass_user( password = 'password', name = '' # optional ) +``` diff --git a/docs/examples/users/create-scrypt-modified-user.md b/docs/examples/users/create-scrypt-modified-user.md index 9d644ce4..9a87d143 100644 --- a/docs/examples/users/create-scrypt-modified-user.md +++ b/docs/examples/users/create-scrypt-modified-user.md @@ -1,3 +1,4 @@ +```python from appwrite.client import Client from appwrite.services.users import Users @@ -17,3 +18,4 @@ result = users.create_scrypt_modified_user( password_signer_key = '', name = '' # optional ) +``` diff --git a/docs/examples/users/create-scrypt-user.md b/docs/examples/users/create-scrypt-user.md index f442ab9d..d83d951c 100644 --- a/docs/examples/users/create-scrypt-user.md +++ b/docs/examples/users/create-scrypt-user.md @@ -1,3 +1,4 @@ +```python from appwrite.client import Client from appwrite.services.users import Users @@ -19,3 +20,4 @@ result = users.create_scrypt_user( password_length = None, name = '' # optional ) +``` diff --git a/docs/examples/users/create-session.md b/docs/examples/users/create-session.md index 7e4c49fc..0ab75f0a 100644 --- a/docs/examples/users/create-session.md +++ b/docs/examples/users/create-session.md @@ -1,3 +1,4 @@ +```python from appwrite.client import Client from appwrite.services.users import Users @@ -11,3 +12,4 @@ users = Users(client) result = users.create_session( user_id = '' ) +``` diff --git a/docs/examples/users/create-sha-user.md b/docs/examples/users/create-sha-user.md index 7722c62f..674a4c2b 100644 --- a/docs/examples/users/create-sha-user.md +++ b/docs/examples/users/create-sha-user.md @@ -1,3 +1,4 @@ +```python from appwrite.client import Client from appwrite.services.users import Users from appwrite.enums import PasswordHash @@ -16,3 +17,4 @@ result = users.create_sha_user( password_version = PasswordHash.SHA1, # optional name = '' # optional ) +``` diff --git a/docs/examples/users/create-target.md b/docs/examples/users/create-target.md index dfa64ac7..03089942 100644 --- a/docs/examples/users/create-target.md +++ b/docs/examples/users/create-target.md @@ -1,3 +1,4 @@ +```python from appwrite.client import Client from appwrite.services.users import Users from appwrite.enums import MessagingProviderType @@ -17,3 +18,4 @@ result = users.create_target( provider_id = '', # optional name = '' # optional ) +``` diff --git a/docs/examples/users/create-token.md b/docs/examples/users/create-token.md index b40658c3..e4ac48a4 100644 --- a/docs/examples/users/create-token.md +++ b/docs/examples/users/create-token.md @@ -1,3 +1,4 @@ +```python from appwrite.client import Client from appwrite.services.users import Users @@ -13,3 +14,4 @@ result = users.create_token( length = 4, # optional expire = 60 # optional ) +``` diff --git a/docs/examples/users/create.md b/docs/examples/users/create.md index 4c51a3ff..4ce1c219 100644 --- a/docs/examples/users/create.md +++ b/docs/examples/users/create.md @@ -1,3 +1,4 @@ +```python from appwrite.client import Client from appwrite.services.users import Users @@ -15,3 +16,4 @@ result = users.create( password = '', # optional name = '' # optional ) +``` diff --git a/docs/examples/users/delete-identity.md b/docs/examples/users/delete-identity.md index 412fbd39..06af6681 100644 --- a/docs/examples/users/delete-identity.md +++ b/docs/examples/users/delete-identity.md @@ -1,3 +1,4 @@ +```python from appwrite.client import Client from appwrite.services.users import Users @@ -11,3 +12,4 @@ users = Users(client) result = users.delete_identity( identity_id = '' ) +``` diff --git a/docs/examples/users/delete-mfa-authenticator.md b/docs/examples/users/delete-mfa-authenticator.md index 64724983..67ab6b78 100644 --- a/docs/examples/users/delete-mfa-authenticator.md +++ b/docs/examples/users/delete-mfa-authenticator.md @@ -1,3 +1,4 @@ +```python from appwrite.client import Client from appwrite.services.users import Users from appwrite.enums import AuthenticatorType @@ -13,3 +14,4 @@ result = users.delete_mfa_authenticator( user_id = '', type = AuthenticatorType.TOTP ) +``` diff --git a/docs/examples/users/delete-session.md b/docs/examples/users/delete-session.md index 815a96ed..31ac5246 100644 --- a/docs/examples/users/delete-session.md +++ b/docs/examples/users/delete-session.md @@ -1,3 +1,4 @@ +```python from appwrite.client import Client from appwrite.services.users import Users @@ -12,3 +13,4 @@ result = users.delete_session( user_id = '', session_id = '' ) +``` diff --git a/docs/examples/users/delete-sessions.md b/docs/examples/users/delete-sessions.md index 2dde88f4..c600d4c3 100644 --- a/docs/examples/users/delete-sessions.md +++ b/docs/examples/users/delete-sessions.md @@ -1,3 +1,4 @@ +```python from appwrite.client import Client from appwrite.services.users import Users @@ -11,3 +12,4 @@ users = Users(client) result = users.delete_sessions( user_id = '' ) +``` diff --git a/docs/examples/users/delete-target.md b/docs/examples/users/delete-target.md index 287f5a26..6dfbc7e5 100644 --- a/docs/examples/users/delete-target.md +++ b/docs/examples/users/delete-target.md @@ -1,3 +1,4 @@ +```python from appwrite.client import Client from appwrite.services.users import Users @@ -12,3 +13,4 @@ result = users.delete_target( user_id = '', target_id = '' ) +``` diff --git a/docs/examples/users/delete.md b/docs/examples/users/delete.md index 7032b0f8..8d236b4f 100644 --- a/docs/examples/users/delete.md +++ b/docs/examples/users/delete.md @@ -1,3 +1,4 @@ +```python from appwrite.client import Client from appwrite.services.users import Users @@ -11,3 +12,4 @@ users = Users(client) result = users.delete( user_id = '' ) +``` diff --git a/docs/examples/users/get-mfa-recovery-codes.md b/docs/examples/users/get-mfa-recovery-codes.md index bca43b08..cf0d67cd 100644 --- a/docs/examples/users/get-mfa-recovery-codes.md +++ b/docs/examples/users/get-mfa-recovery-codes.md @@ -1,3 +1,4 @@ +```python from appwrite.client import Client from appwrite.services.users import Users @@ -11,3 +12,4 @@ users = Users(client) result = users.get_mfa_recovery_codes( user_id = '' ) +``` diff --git a/docs/examples/users/get-prefs.md b/docs/examples/users/get-prefs.md index ec9d363f..f95cc59d 100644 --- a/docs/examples/users/get-prefs.md +++ b/docs/examples/users/get-prefs.md @@ -1,3 +1,4 @@ +```python from appwrite.client import Client from appwrite.services.users import Users @@ -11,3 +12,4 @@ users = Users(client) result = users.get_prefs( user_id = '' ) +``` diff --git a/docs/examples/users/get-target.md b/docs/examples/users/get-target.md index 3b80b1ff..8fe84df7 100644 --- a/docs/examples/users/get-target.md +++ b/docs/examples/users/get-target.md @@ -1,3 +1,4 @@ +```python from appwrite.client import Client from appwrite.services.users import Users @@ -12,3 +13,4 @@ result = users.get_target( user_id = '', target_id = '' ) +``` diff --git a/docs/examples/users/get.md b/docs/examples/users/get.md index 267086a3..0cc21b64 100644 --- a/docs/examples/users/get.md +++ b/docs/examples/users/get.md @@ -1,3 +1,4 @@ +```python from appwrite.client import Client from appwrite.services.users import Users @@ -11,3 +12,4 @@ users = Users(client) result = users.get( user_id = '' ) +``` diff --git a/docs/examples/users/list-identities.md b/docs/examples/users/list-identities.md index 664d32ea..2b19132c 100644 --- a/docs/examples/users/list-identities.md +++ b/docs/examples/users/list-identities.md @@ -1,3 +1,4 @@ +```python from appwrite.client import Client from appwrite.services.users import Users @@ -13,3 +14,4 @@ result = users.list_identities( search = '', # optional total = False # optional ) +``` diff --git a/docs/examples/users/list-logs.md b/docs/examples/users/list-logs.md index 6b2393fd..5604d4c1 100644 --- a/docs/examples/users/list-logs.md +++ b/docs/examples/users/list-logs.md @@ -1,3 +1,4 @@ +```python from appwrite.client import Client from appwrite.services.users import Users @@ -13,3 +14,4 @@ result = users.list_logs( queries = [], # optional total = False # optional ) +``` diff --git a/docs/examples/users/list-memberships.md b/docs/examples/users/list-memberships.md index 907df809..7f01abff 100644 --- a/docs/examples/users/list-memberships.md +++ b/docs/examples/users/list-memberships.md @@ -1,3 +1,4 @@ +```python from appwrite.client import Client from appwrite.services.users import Users @@ -14,3 +15,4 @@ result = users.list_memberships( search = '', # optional total = False # optional ) +``` diff --git a/docs/examples/users/list-mfa-factors.md b/docs/examples/users/list-mfa-factors.md index a2b59895..c5d285fa 100644 --- a/docs/examples/users/list-mfa-factors.md +++ b/docs/examples/users/list-mfa-factors.md @@ -1,3 +1,4 @@ +```python from appwrite.client import Client from appwrite.services.users import Users @@ -11,3 +12,4 @@ users = Users(client) result = users.list_mfa_factors( user_id = '' ) +``` diff --git a/docs/examples/users/list-sessions.md b/docs/examples/users/list-sessions.md index b84fbbf7..2b2970db 100644 --- a/docs/examples/users/list-sessions.md +++ b/docs/examples/users/list-sessions.md @@ -1,3 +1,4 @@ +```python from appwrite.client import Client from appwrite.services.users import Users @@ -12,3 +13,4 @@ result = users.list_sessions( user_id = '', total = False # optional ) +``` diff --git a/docs/examples/users/list-targets.md b/docs/examples/users/list-targets.md index a8e68ded..39425831 100644 --- a/docs/examples/users/list-targets.md +++ b/docs/examples/users/list-targets.md @@ -1,3 +1,4 @@ +```python from appwrite.client import Client from appwrite.services.users import Users @@ -13,3 +14,4 @@ result = users.list_targets( queries = [], # optional total = False # optional ) +``` diff --git a/docs/examples/users/list.md b/docs/examples/users/list.md index 7ff8602c..f16566dc 100644 --- a/docs/examples/users/list.md +++ b/docs/examples/users/list.md @@ -1,3 +1,4 @@ +```python from appwrite.client import Client from appwrite.services.users import Users @@ -13,3 +14,4 @@ result = users.list( search = '', # optional total = False # optional ) +``` diff --git a/docs/examples/users/update-email-verification.md b/docs/examples/users/update-email-verification.md index 26058614..e494f643 100644 --- a/docs/examples/users/update-email-verification.md +++ b/docs/examples/users/update-email-verification.md @@ -1,3 +1,4 @@ +```python from appwrite.client import Client from appwrite.services.users import Users @@ -12,3 +13,4 @@ result = users.update_email_verification( user_id = '', email_verification = False ) +``` diff --git a/docs/examples/users/update-email.md b/docs/examples/users/update-email.md index c4a468e2..4434b6e4 100644 --- a/docs/examples/users/update-email.md +++ b/docs/examples/users/update-email.md @@ -1,3 +1,4 @@ +```python from appwrite.client import Client from appwrite.services.users import Users @@ -12,3 +13,4 @@ result = users.update_email( user_id = '', email = 'email@example.com' ) +``` diff --git a/docs/examples/users/update-labels.md b/docs/examples/users/update-labels.md index b9af53a5..23d9f6f2 100644 --- a/docs/examples/users/update-labels.md +++ b/docs/examples/users/update-labels.md @@ -1,3 +1,4 @@ +```python from appwrite.client import Client from appwrite.services.users import Users @@ -12,3 +13,4 @@ result = users.update_labels( user_id = '', labels = [] ) +``` diff --git a/docs/examples/users/update-mfa-recovery-codes.md b/docs/examples/users/update-mfa-recovery-codes.md index c0990e1e..39e84420 100644 --- a/docs/examples/users/update-mfa-recovery-codes.md +++ b/docs/examples/users/update-mfa-recovery-codes.md @@ -1,3 +1,4 @@ +```python from appwrite.client import Client from appwrite.services.users import Users @@ -11,3 +12,4 @@ users = Users(client) result = users.update_mfa_recovery_codes( user_id = '' ) +``` diff --git a/docs/examples/users/update-mfa.md b/docs/examples/users/update-mfa.md index 9b357011..0f92c2e9 100644 --- a/docs/examples/users/update-mfa.md +++ b/docs/examples/users/update-mfa.md @@ -1,3 +1,4 @@ +```python from appwrite.client import Client from appwrite.services.users import Users @@ -12,3 +13,4 @@ result = users.update_mfa( user_id = '', mfa = False ) +``` diff --git a/docs/examples/users/update-name.md b/docs/examples/users/update-name.md index 1e328b4c..5e9fc002 100644 --- a/docs/examples/users/update-name.md +++ b/docs/examples/users/update-name.md @@ -1,3 +1,4 @@ +```python from appwrite.client import Client from appwrite.services.users import Users @@ -12,3 +13,4 @@ result = users.update_name( user_id = '', name = '' ) +``` diff --git a/docs/examples/users/update-password.md b/docs/examples/users/update-password.md index d104184c..5d6bdc82 100644 --- a/docs/examples/users/update-password.md +++ b/docs/examples/users/update-password.md @@ -1,3 +1,4 @@ +```python from appwrite.client import Client from appwrite.services.users import Users @@ -12,3 +13,4 @@ result = users.update_password( user_id = '', password = '' ) +``` diff --git a/docs/examples/users/update-phone-verification.md b/docs/examples/users/update-phone-verification.md index 1d2656c3..4ee7d00f 100644 --- a/docs/examples/users/update-phone-verification.md +++ b/docs/examples/users/update-phone-verification.md @@ -1,3 +1,4 @@ +```python from appwrite.client import Client from appwrite.services.users import Users @@ -12,3 +13,4 @@ result = users.update_phone_verification( user_id = '', phone_verification = False ) +``` diff --git a/docs/examples/users/update-phone.md b/docs/examples/users/update-phone.md index 14826bb5..1f963894 100644 --- a/docs/examples/users/update-phone.md +++ b/docs/examples/users/update-phone.md @@ -1,3 +1,4 @@ +```python from appwrite.client import Client from appwrite.services.users import Users @@ -12,3 +13,4 @@ result = users.update_phone( user_id = '', number = '+12065550100' ) +``` diff --git a/docs/examples/users/update-prefs.md b/docs/examples/users/update-prefs.md index 76903b76..ec2f0a40 100644 --- a/docs/examples/users/update-prefs.md +++ b/docs/examples/users/update-prefs.md @@ -1,3 +1,4 @@ +```python from appwrite.client import Client from appwrite.services.users import Users @@ -12,3 +13,4 @@ result = users.update_prefs( user_id = '', prefs = {} ) +``` diff --git a/docs/examples/users/update-status.md b/docs/examples/users/update-status.md index 49c0516e..28918bab 100644 --- a/docs/examples/users/update-status.md +++ b/docs/examples/users/update-status.md @@ -1,3 +1,4 @@ +```python from appwrite.client import Client from appwrite.services.users import Users @@ -12,3 +13,4 @@ result = users.update_status( user_id = '', status = False ) +``` diff --git a/docs/examples/users/update-target.md b/docs/examples/users/update-target.md index 119c5fab..c1c30ed7 100644 --- a/docs/examples/users/update-target.md +++ b/docs/examples/users/update-target.md @@ -1,3 +1,4 @@ +```python from appwrite.client import Client from appwrite.services.users import Users @@ -15,3 +16,4 @@ result = users.update_target( provider_id = '', # optional name = '' # optional ) +``` diff --git a/setup.py b/setup.py index 44040000..8552fbf0 100644 --- a/setup.py +++ b/setup.py @@ -8,7 +8,7 @@ setuptools.setup( name = 'appwrite', packages = setuptools.find_packages(), - version = '15.0.0', + version = '15.0.1', license='BSD-3-Clause', description = 'Appwrite is an open-source self-hosted backend server that abstracts and simplifies complex and repetitive development tasks behind a very simple REST API', long_description = long_description, @@ -18,7 +18,7 @@ maintainer = 'Appwrite Team', maintainer_email = 'team@appwrite.io', url = 'https://appwrite.io/support', - download_url='https://github.com/appwrite/sdk-for-python/archive/15.0.0.tar.gz', + download_url='https://github.com/appwrite/sdk-for-python/archive/15.0.1.tar.gz', install_requires=[ 'requests', ], From e70f46649f09dc94f386e6feee88fbf7c87bf3b5 Mon Sep 17 00:00:00 2001 From: Darshan Date: Tue, 10 Feb 2026 06:03:34 +0000 Subject: [PATCH 2/2] resync-with-docs --- CHANGELOG.md | 7 +++++++ README.md | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 31396fa3..2658d4be 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,12 @@ # Change Log +## 15.0.1 + +* Update SDK as per latest server specs, these include - + * Introduces Backups module for managing Database backups + * Introduces Organization module + * Introduce Account level keys, Backup Service & Models + ## 13.6.1 * Fix passing of `None` to nullable parameters diff --git a/README.md b/README.md index fa3f8d46..4693d74b 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,7 @@ [![Twitter Account](https://img.shields.io/twitter/follow/appwrite?color=00acee&label=twitter&style=flat-square)](https://twitter.com/appwrite) [![Discord](https://img.shields.io/discord/564160730845151244?label=discord&style=flat-square)](https://appwrite.io/discord) -**This SDK is compatible with Appwrite server version latest. For older versions, please check [previous releases](https://github.com/appwrite/sdk-for-python/releases).** +**This SDK is compatible with Appwrite server version 1.8.x. For older versions, please check [previous releases](https://github.com/appwrite/sdk-for-python/releases).** 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 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)