Skip to content

feat: Python SDK update for version 22.0.0#150

Merged
ChiragAgg5k merged 2 commits into
mainfrom
dev
Jul 13, 2026
Merged

feat: Python SDK update for version 22.0.0#150
ChiragAgg5k merged 2 commits into
mainfrom
dev

Conversation

@ChiragAgg5k

@ChiragAgg5k ChiragAgg5k commented Jul 13, 2026

Copy link
Copy Markdown
Member

This PR contains updates to the SDK for version 22.0.0.

What's Changed

  • Breaking: removed Health service and all health models and enums
  • Breaking: removed Usage service and UsageMetric, UsageDataPoint, UsageEventList, UsageGaugeList models
  • Breaking: removed messaging list_message_logs, list_provider_logs, list_subscriber_logs, list_topic_logs methods
  • Breaking: renamed tables_db.create parameter dedicated_database_id to specification
  • Breaking: removed countryCode and countryName from ActivityEvent model
  • Added: Client.set_bearer for OAuth access token authentication
  • Added: organization service get, update, delete and membership CRUD methods
  • Added: oauth2 service create_par, list_organizations, list_projects methods
  • Added: resource, audience, request_uri OAuth2 parameters; scope on approve
  • Added: appwrite OAuth provider, OAuth2Appwrite model, update_o_auth2_appwrite method
  • Added: Query.vector_dot, Query.vector_cosine, Query.vector_euclidean methods
  • Added: apps.update_labels method and labels field on App model
  • Added: new_specification parameter to backups.create_restoration
  • Added: type parameter to functions and sites list_specifications
  • Added: token parameter to functions.get_deployment_download
  • Added: prompt and max_age parameters to update_o_auth2_oidc; default_scopes to update_o_auth2_server
  • Added: BillingPlan, Organization, Program, Oauth2PAR, DatabaseStatus, BillingPlanGroup models and enums
  • Added: status on Database, mode on Block, onboarding on Project, geolocation fields on Locale
  • Added: organization, project.oauth2, and stages key scope enum values
  • Fixed: booleans now serialized as true/false in flattened query parameters
  • Fixed: model_dump on Document, Row, Preferences now includes dynamic data

@greptile-apps

greptile-apps Bot commented Jul 13, 2026

Copy link
Copy Markdown

Greptile Summary

This PR updates the Python SDK to version 22.0.0, a major version bump that adds several new capabilities and removes deprecated ones. All breaking changes are documented in the CHANGELOG.

  • Removed: The entire Health and Usage services (with their models/enums), and four messaging log-listing methods; these are properly cleaned up from imports, the ValueClassEncoder, and models/__init__.py.
  • Added: OAuth2 PAR, list_organizations, and list_projects endpoints; vector query methods (vectorDot, vectorCosine, vectorEuclidean); Organization service CRUD and membership methods; set_bearer for OAuth token auth; and multiple new billing/OAuth2 models.
  • Fixed: Booleans in flattened query/form parameters are now correctly serialized as lowercase "true"/"false" instead of Python's "True"/"False"; many previously unconditional optional-parameter sends are now guarded with if x is not None.

Confidence Score: 5/5

This PR is safe to merge — all breaking changes are intentional, documented in the CHANGELOG, and internally consistent across services, models, encoder, and tests.

The changes are a well-structured auto-generated SDK update. Removed services (Health, Usage) are cleaned up consistently across models, enums, and the ValueClassEncoder. New OAuth2 flows, Organization CRUD, and vector query methods follow established patterns. Optional-parameter guards are applied correctly, and the boolean serialization fix is sound.

No files require special attention.

Important Files Changed

Filename Overview
appwrite/client.py Version bump to 22.0.0, added set_bearer() with correct "Bearer " prefix, and fixed boolean serialization in flatten() to always emit lowercase "true"/"false"
appwrite/services/oauth2.py Added create_par, list_organizations, list_projects; authorize params made optional for PAR flow; all optional params properly guarded; max_age fix from previous review is present
appwrite/services/databases.py Optional params (min, max, default, newKey, permissions) now guarded; update_* methods correctly still send default unconditionally since it is a required nullable parameter for clearing defaults
appwrite/encoders/value_class_encoder.py Removed HealthQueueName/HealthAntivirusStatus/HealthCheckStatus entries (matching deleted enums); added DatabaseStatus, OAuth2OidcPrompt, ProjectOAuth2OidcPrompt, BillingPlanGroup
appwrite/models/init.py Removed deleted health/usage models from imports and all; added new OAuth2, billing, organization, and program models consistently
appwrite/services/organization.py Added get, update, delete and membership CRUD methods; uses Generic[T] Organization model with with_data factory correctly
appwrite/models/organization.py New Generic[T] Organization model with comprehensive billing fields; uses with_data factory pattern consistent with other generic models
appwrite/query.py Added three vector similarity query methods (vectorDot, vectorCosine, vectorEuclidean) following existing pattern
appwrite/services/tables_db.py Renamed dedicated_database_id to specification in create; optional param guards applied consistently across column create/update methods
setup.py Version bumped to 22.0.0 and download_url updated; matches pyproject.toml version

Reviews (2): Last reviewed commit: "chore: update Python SDK to 22.0.0" | Re-trigger Greptile

Comment thread appwrite/services/oauth2.py Outdated
Comment thread appwrite/client.py
@ChiragAgg5k
ChiragAgg5k merged commit 45d1499 into main Jul 13, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants