You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This PR updates the Python SDK to version 18.0.0, adding key/platform management endpoints, new BillingLimits, Block, AuthProvider, and platform subtype models, renaming webhook fields (security→tls, httpUser→authUsername, httpPass→authPassword), and replacing the union_models approach in _parse_response with explicit type-dispatching in get_attribute, get_column, and get_platform — the three dispatchers from previous review rounds are now correctly implemented.
Several previously flagged nullability bugs remain open: Key.expire, DevKey.expire, Webhook.secret, and Project.billinglimits are all required non-nullable fields on models where the server can legally return null, and webhooks.create still unconditionally sends secret: null in the request body when the caller omits the argument.
Confidence Score: 3/5
Not safe to merge — several previously-flagged P1 nullability bugs in Key, DevKey, Webhook, and Project models remain unaddressed and will cause ValidationError at runtime in common scenarios.
The three critical dispatch regressions from the last round (get_platform, get_attribute, get_column) are now correctly fixed, which is meaningful progress. However, at least four P1 issues remain open: (1) Key.expire and DevKey.expire are non-Optional str fields but the server returns null for unlimited-expiry keys; (2) Webhook.secret is required but only returned on creation/rotation; (3) Project.billinglimits is required but may be null for non-billed projects; (4) webhooks.create unconditionally sends "secret": null instead of omitting the key.
Removed union_models parameter from _parse_response, simplifying dispatch to single-model; _normalize_value correctly handles Enum values via .value
appwrite/services/project.py
Large new service with key/platform CRUD, protocol/service status toggling; get_platform correctly dispatches by type string, but relies on Project and Key models that have previously-flagged nullability bugs
appwrite/services/databases.py
get_attribute now dispatches correctly by type/format; adds purge param to update_collection; note that type == 'datetime' dispatch differs from how email/enum/url/ip use format — valid if server uses a first-class datetime type
appwrite/services/tables_db.py
get_column correctly dispatches by type/format mirroring the databases fix; adds purge param to update_table; same datetime dispatch note as databases.py
appwrite/services/webhooks.py
Renames security→tls, httpUser→authUsername, httpPass→authPassword, adds secret param; secret is still unconditionally added to api_params in both create and update_secret (previously flagged, not fixed)
appwrite/models/project.py
New 258-line model; billinglimits, Key.expire/DevKey.expire within nested lists, and Webhook.secret within nested webhooks list are all non-Optional required fields that break parsing in common scenarios (previously flagged, not fixed)
appwrite/models/webhook.py
Field renames security→tls, httpUser→authUsername, httpPass→authPassword, adds secret: str = Field(...) required; secret is not Optional though it is only returned on creation/rotation (previously flagged, not fixed)
appwrite/models/key.py
New model; expire: str = Field(...) must be Optional[str] since unlimited-expiry keys return expire: null — parsing any such key will raise ValidationError (previously flagged, not fixed)
appwrite/models/dev_key.py
New model; same expire: str = Field(...) non-Optional issue as key.py (previously flagged, not fixed)
appwrite/models/platform_list.py
New model; Union[PlatformWeb, PlatformApple, ...] without a discriminator (previously flagged, not fixed); each platform subtype has a unique required field so parsing works but is O(n) with silent fallback risk
appwrite/client.py
Version bump 17→18, response format 1.9.0→1.9.1, adds get_headers() returning a shallow copy of _global_headers
appwrite/enums/platform_type.py
New enum with five platform types (windows, apple, android, linux, web); correctly registered in ValueClassEncoder
appwrite/models/block.py
New model with correct Optional fields for reason and expiredat
appwrite/models/billing_limits.py
New model with all required float fields; correct structure — nullability concern lives in Project where it is embedded
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR contains updates to the Python SDK for version 18.0.0.
What's Changed
security→tls,httpUser→authUsername,httpPass→authPassword,signatureKey→secretsecurity→tls,httpUser→authUsername,httpPass→authPasswordWebhooks.update_signature()toWebhooks.update_secret()with new optionalsecretparameterClient.get_headers()method to retrieve request headerssecretparameter to Webhook create and update methodsxOAuth provider toOAuthProviderenumuserTypefield toLogmodelpurgeparameter toupdate_collectionandupdate_tablefor cache invalidationKey,KeyList,Project,DevKey,MockNumber,AuthProvider,PlatformAndroid,PlatformApple,PlatformLinux,PlatformList,PlatformWeb,PlatformWindows,BillingLimits,BlockPlatformType,ProtocolId,ServiceIdBuildRuntime,Runtimeenums withdart-3.11andflutter-3.41Scopesenum withkeys_read,keys_write,platforms_read,platforms_writeX-Appwrite-Response-Formatheader to1.9.1_parse_response()by removingunion_modelsparameter