Conversation
Greptile SummaryThis PR updates the Python SDK to version 20.1.0, adding new API surface and a cross-cutting architectural change that moves the project-ID header from a global client header to a per-request header injected in every service method.
Confidence Score: 4/5The SDK update is internally consistent and all 23 service files were updated together, but the change to project-ID header propagation deserves a second look before merging. The
Important Files Changed
Reviews (1): Last reviewed commit: "chore: update Python SDK to 20.1.0" | Re-trigger Greptile |
| @@ -1,4 +1,5 @@ | |||
| from ..service import Service | |||
| from urllib.parse import quote | |||
There was a problem hiding this comment.
Unused import across all 23 service files
from urllib.parse import quote is added to every updated service file but quote( is never called anywhere in the codebase. Running a global search across all service files yields zero usages. This adds dead code to every service module. The pattern appears in account.py, activities.py, advisor.py, and 20 other services.
Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!
| self._global_headers['x-appwrite-key'] = value | ||
| self._config['key'] = value | ||
| return self | ||
|
|
||
| def set_jwt(self, value): |
There was a problem hiding this comment.
set_project no longer writes to global headers
set_project previously called self._global_headers['x-appwrite-project'] = value, so the project ID was automatically included in every request via the {**self._global_headers, **headers} merge in call(). After this change it only stores the value in self._config. Any call made through client.call() directly — bypassing a service class — will now silently omit the X-Appwrite-Project header even after set_project was called. All generated service methods were updated to inject the header explicitly, so the normal SDK path works correctly, but existing code that calls client.call() directly will regress.
This PR contains updates to the Python SDK for version 20.1.0.
What's Changed
createSesProviderandupdateSesProvidertomessagingupdateOAuth2Servertoprojectfor OAuth2 server settingsupdatePasswordStrengthPolicyandPolicyPasswordStrengthtoprojectgetAuditsDBhealth check tohealthpassword-strengthtoProjectPolicyIdapps.readandapps.writetoProjectKeyScopes