Skip to content

feat: Python SDK update for version 25.0.0 - #164

Merged
ChiragAgg5k merged 8 commits into
mainfrom
dev
Oct 15, 2026
Merged

ChiragAgg5k merged 8 commits into
mainfrom
dev

Conversation

@ChiragAgg5k

@ChiragAgg5k ChiragAgg5k commented Oct 14, 2026 •

Copy link
Copy Markdown
Member

This PR contains updates to the SDK for version 25.0.0.

What's Changed

  • Breaking: requests send X-Appwrite-Response-Format: 2.5.0; responses follow the 2.5 shapes
  • Breaking: removed account.list_logs, users.list_logs and the Log/LogList models
  • Breaking: removed organization.create_key, get_key, list_keys, update_key and delete_key, and OrganizationKeyScopes; use organization.list_project_keys, get_project_key, update_project_key and delete_project_key instead
  • Breaking: removed Client.set_dev_key, the DevKey model and Project.dev_keys
  • Breaking: removed BillingPlanGroup.STARTER; use BillingPlanGroup.FREE
  • Breaking: list_specifications returns each specification's prices and overage rates on the row itself. Removed the list-level pricing field and the DedicatedDatabaseSpecificationPricing model
  • Breaking: removed Block fields reason, project_name, region, organization_name, organization_id and billing_plan
  • Breaking: OAuth2 resource params now take List[str]
  • Breaking: project.update_o_auth2_kakao takes enabled before prompt
  • Breaking: BackupRestoration.options is now a dict
  • Breaking: some response fields became Optional, such as BillingPlan.usage and DedicatedDatabase.engine
  • Added: Topic helper to build MQTT topics for push messages
  • Added: mongo, mysql and postgresql promote_restoration, restore_mode, target_name and auto_promote on create_restoration, and DedicatedDatabaseRestoration.restore_mode
  • Added: proxy.create_smtp_rule, the ProxyRuleProtocol enum and ProxyRule.protocol
  • Added: email_enabled on functions.update and Function, and ExecutionTrigger.EMAIL
  • Added: Query aggregates (count, count_distinct, sum, avg, min, max and more), group_by, having, distinct, joins, relationship, covers, spatial_equals and page
  • Added: Query.builder() to chain queries; build() returns the query list
  • Updated: missing response fields fall back to their documented defaults
  • Fixed: map fields missing from a response default to {} instead of []

@ChiragAgg5k ChiragAgg5k changed the title feat: Python SDK update for version 25.0.0 feat: SDK update for version 25.0.0 Oct 14, 2026
@hansi-codes

hansi-codes Bot commented Oct 14, 2026 •

Copy link
Copy Markdown

🔵 Tier A · Mergeable after minor fixes

One minor response-parsing gap remains for omitted preference maps.

This update brings the Python SDK to 25.0.0, targets Appwrite response format 2.5.0, and adds new query, topic, restoration, proxy, and function capabilities. It also updates response models and removes APIs and models that were retired for this server version.

385 of 475 changed files were too large to include in full.

Verdict New comments Fixed Still open
💬 Commented 1 0 1

Note

Not approving while a bug finding is open: Default missing preference maps to an empty map

Finding Where
🟡 Default missing preference maps to an empty map appwrite/models/account.py:129
Fix with agent prompt
### Issue 1
appwrite/models/account.py:129
**Default missing preference maps to an empty map**

When a response omits `prefs`, this validator still leaves the required field unset, so `Account.model_validate()` raises instead of applying the `{}` default described for missing map fields. `User` and `Organization` have the same gap, so those responses still cannot benefit from the new missing-field fallback.

### Issue 2
test/services/test_proxy.py:204-206
**SMTP rule test does not verify an SMTP request**

This mock accepts every method and URL, and the fixture above reports `protocol: http`, so the test still passes if `create_smtp_rule` calls the wrong route or returns a non-SMTP rule. Register the expected POST endpoint and assert the SMTP protocol (and request fields) so this test covers the new contract.

---

For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.
📂 Walkthrough · 6
File Change
CHANGELOG.md, README.md, pyproject.toml, setup.py Document the 25.0.0 SDK release and supported Appwrite API version.
appwrite/client.py Update request headers and add query flattening, multipart handling, and upload response support.
appwrite/query.py, appwrite/topic.py Add query operations and builder chaining, plus the MQTT topic helper.
appwrite/models/** Update response shapes, defaults, optional fields, and removed model exports.
appwrite/services/**, appwrite/enums/** Add and update service methods, response fields, and enum values.
test/**, docs/examples/** Update SDK tests and usage examples for the new API surface.
⏳ Still open from earlier reviews · 1

Reviewed 38a3d37 · 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

Comment thread appwrite/models/backup_restoration.py Outdated
@ChiragAgg5k ChiragAgg5k changed the title feat: SDK update for version 25.0.0 feat: Python SDK update for version 25.0.0 Oct 14, 2026

@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 · Looks good to merge. Summary

Comment on lines +204 to +206
m.request(
requests_mock.ANY,
requests_mock.ANY,

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

SMTP rule test does not verify an SMTP request

This mock accepts every method and URL, and the fixture above reports protocol: http, so the test still passes if create_smtp_rule calls the wrong route or returns a non-SMTP rule. Register the expected POST endpoint and assert the SMTP protocol (and request fields) so this test covers the new contract.

Prompt To Fix With AI
This is a comment left during a code review.
Path: test/services/test_proxy.py
Line: 204-206

Comment:
**SMTP rule test does not verify an SMTP request**

This mock accepts every method and URL, and the fixture above reports `protocol: http`, so the test still passes if `create_smtp_rule` calls the wrong route or returns a non-SMTP rule. Register the expected POST endpoint and assert the SMTP protocol (and request fields) so this test covers the new contract.

---

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

🟡 Minor · testing · Reply if this doesn't apply.

@ChiragAgg5k

Copy link
Copy Markdown
Member Author

@hansi-codes review

@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

@ChiragAgg5k

Copy link
Copy Markdown
Member Author

@hansi-codes review

@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

data['targets'] = []
if 'accessedAt' not in data and 'accessedat' not in data:
data['accessedAt'] = ''
return data

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Default missing preference maps to an empty map

When a response omits prefs, this validator still leaves the required field unset, so Account.model_validate() raises instead of applying the {} default described for missing map fields. User and Organization have the same gap, so those responses still cannot benefit from the new missing-field fallback.

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

Comment:
**Default missing preference maps to an empty map**

When a response omits `prefs`, this validator still leaves the required field unset, so `Account.model_validate()` raises instead of applying the `{}` default described for missing map fields. `User` and `Organization` have the same gap, so those responses still cannot benefit from the new missing-field fallback.

---

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
ChiragAgg5k merged commit 91e28b0 into main Oct 15, 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.

1 participant