Skip to content

feat: Python SDK update for version 25.0.0 - #159

Closed
ChiragAgg5k wants to merge 2 commits into
mainfrom
dev
Closed

ChiragAgg5k wants to merge 2 commits into
mainfrom
dev

Conversation

@ChiragAgg5k

Copy link
Copy Markdown
Member

This PR contains updates to the Python SDK for version 25.0.0.

@hansi-codes

hansi-codes Bot commented Oct 12, 2026

Copy link
Copy Markdown

馃數 Tier A 路 Mergeable after minor fixes

The remaining issue is limited to missing-field fallbacks for mapping-valued model fields, which can raise validation errors in less common responses.

Updates the Python SDK to target Appwrite 2.4, adding domains, WAF, passkey, OAuth2, and policy APIs alongside new models and enums. It also updates request handling for multipart uploads and text responses, and revises the changelog and examples for version 25.0.0.

527 of 626 changed files were too large to include in full.

Verdict New comments Fixed Still open
馃挰 Commented 1 0 0

Note

Not approving while a bug finding is open: Use mapping defaults for dict-valued fields

Finding Where
馃煛 Use mapping defaults for dict-valued fields appwrite/models/backup_restoration.py:71
Fix with agent prompt
### Issue 1
appwrite/models/backup_restoration.py:71
**Use mapping defaults for dict-valued fields**

When `options` is missing, this validator inserts `[]` even though the field is now `Dict[str, Any]`, so Pydantic raises a validation error instead of filling the missing field. The same list default is used for dict-valued fields such as `Message.data`, `Provider.credentials`, `Project.onboarding`, `PasskeyChallenge.publicKey`, `InsightCTA.params`, and WAF rule `config`.

---

For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.
馃搨 Walkthrough 路 7
File Change
appwrite/client.py Updates SDK headers and adds multipart fallback handling, text responses, and upload method options.
appwrite/encoders/value_class_encoder.py Adds serialization support for the new enums.
appwrite/enums/* Adds version 25 enum values and removes superseded enum values.
appwrite/models/* Adds new API models and updates existing response schemas and missing-field defaults.
appwrite/services/* Adds and updates service methods for the 25.0 API.
docs/examples/*, test/* Refreshes API examples and service tests for the new SDK surface.
CHANGELOG.md, README.md, setup.py, pyproject.toml Documents the 25.0.0 release and updates package metadata and target API version.

Reviewed 14eca58 路 Details 路 Comment @hansi-codes review to re-run, or mention @hansi-codes with a question.

@hansi-codes hansi-codes Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

馃數 Tier A 路 See the inline comments. Summary

if 'migrationId' not in data and 'migrationid' not in data:
data['migrationId'] = ''
if 'options' not in data:
data['options'] = []

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use mapping defaults for dict-valued fields

When options is missing, this validator inserts [] even though the field is now Dict[str, Any], so Pydantic raises a validation error instead of filling the missing field. The same list default is used for dict-valued fields such as Message.data, Provider.credentials, Project.onboarding, PasskeyChallenge.publicKey, InsightCTA.params, and WAF rule config.

Prompt To Fix With AI
This is a comment left during a code review.
Path: appwrite/models/backup_restoration.py
Line: 71

Comment:
**Use mapping defaults for dict-valued fields**

When `options` is missing, this validator inserts `[]` even though the field is now `Dict[str, Any]`, so Pydantic raises a validation error instead of filling the missing field. The same list default is used for dict-valued fields such as `Message.data`, `Provider.credentials`, `Project.onboarding`, `PasskeyChallenge.publicKey`, `InsightCTA.params`, and WAF rule `config`.

---

For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.

馃煛 Minor 路 bug 路 Reply if this doesn't apply.

@ChiragAgg5k

Copy link
Copy Markdown
Member Author

Superseded: replaced by a passkeys-only minor release.

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.

1 participant