Skip to content

feat: SDK update for version 24.0.0 - #156

Merged
loks0n merged 1 commit into
mainfrom
dev
Sep 2, 2026
Merged

feat: SDK update for version 24.0.0#156
loks0n merged 1 commit into
mainfrom
dev

Conversation

@ChiragAgg5k

@ChiragAgg5k ChiragAgg5k commented Sep 2, 2026

Copy link
Copy Markdown
Member

This PR contains updates to the SDK for version 24.0.0.

What's Changed

  • Stable release of the dedicated database APIs: mysql, postgresql, mongo, documentsDB, and vectorsDB services, previously released as release candidates
  • Breaking: tablesDB.cutoverMigration is renamed to tablesDB.createCutover
  • Breaking: Execution.functionId is replaced by resourceId and resourceType, covering function and site executions
  • Added: Cloudflare, Resend, and Hugging Face OAuth providers
  • Added: usageAggregateOnlyMetrics on the BillingPlan model
  • Fixed: transactionId is accepted again by documentsDB and vectorsDB createDocument and createDocuments
  • Updated: X-Appwrite-Response-Format is now 2.0.0
  • Updated: FrameworkAdapter.fallbackFile is now optional

@ChiragAgg5k ChiragAgg5k changed the title feat: Python SDK update for version 24.0.0 feat: SDK update for version 24.0.0 Sep 2, 2026
@greptile-apps

greptile-apps Bot commented Sep 2, 2026

Copy link
Copy Markdown

Greptile Summary

This release promotes the dedicated-database APIs to 24.0.0, adds Cloudflare and Resend OAuth support, updates generated models and response-format metadata, restores transaction IDs for document creation, and changes credential rotation to return asynchronous operations.

  • Adds new OAuth provider enums, models, project methods, examples, and list-response handling.
  • Updates DocumentsDB and VectorsDB transaction parameters and renames the TablesDB cutover operation.
  • Updates dedicated-database response models and credential-rotation return types across MongoDB, MySQL, and PostgreSQL.
  • Aligns package metadata and SDK headers on version 24.0.0.

Confidence Score: 2/5

The PR should not merge until positional model compatibility, nullable credential-generation responses, and OAuth provider-list typing are corrected.

Existing positional document-creation calls can fail before transport, valid dedicated-database responses can fail model validation, and newly supported OAuth providers can decode into the wrong generated model.

Files Needing Attention: appwrite/services/documents_db.py, appwrite/services/vectors_db.py, appwrite/models/dedicated_database.py, appwrite/models/o_auth2_provider_list.py

Important Files Changed

Filename Overview
appwrite/services/documents_db.py Restores transaction IDs for document creation but shifts the existing positional model_type argument.
appwrite/services/vectors_db.py Mirrors the DocumentsDB transaction change and its positional compatibility regression.
appwrite/models/dedicated_database.py Adds credentialGeneration with nullability inconsistent with its documented API state.
appwrite/models/o_auth2_provider_list.py Extends an ambiguous untagged provider union with two structurally identical models.
appwrite/services/project.py Adds Cloudflare and Resend configuration endpoints and direct provider-response dispatch.
appwrite/services/mongo.py Correctly updates credential rotation to parse an asynchronous database operation.
appwrite/services/mysql.py Correctly updates credential rotation to parse an asynchronous database operation.
appwrite/services/postgresql.py Correctly updates credential rotation to parse an asynchronous database operation.
appwrite/services/tables_db.py Renames the cutover method and updates its endpoint to the new plural resource path.
appwrite/client.py Updates SDK identity and response-format headers for the stable release.
pyproject.toml Updates the package version consistently to 24.0.0.
setup.py Keeps legacy package and download metadata aligned with version 24.0.0.

Fix all with Greploop Fix All in Claude Code Fix All in Codex

Prompt To Fix All With AI
### Issue 1
appwrite/services/documents_db.py:952-953
**Positional model type is misbound**

When an existing caller passes `model_type` positionally, the new parameter order binds that class to `transaction_id`; the class is then placed in the JSON payload, causing serialization to raise `TypeError` before the request is sent. The same incompatible ordering was added to both creation methods in DocumentsDB and VectorsDB.

### Issue 2
appwrite/models/dedicated_database.py:127
**Nullable generation rejects valid responses**

When the API returns `credentialGeneration` as null before the rotation contract is initialized, this required `float` fails Pydantic validation, causing the SDK to raise `AppwriteException` for an otherwise successful database response.

```suggestion
    credentialgeneration: Optional[float] = Field(default=None, alias='credentialGeneration')
```

### Issue 3
appwrite/models/o_auth2_provider_list.py:108-109
**Provider union loses nominal type**

When `list_o_auth2_providers` parses a Resend or Cloudflare response with the common provider fields, an earlier structurally identical member of this untagged union wins validation, causing callers to receive the wrong provider model and breaking `isinstance`-based dispatch.

---

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

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

Comment on lines +952 to 953
transaction_id: Optional[str] = None,
model_type: Type[T] = dict,

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Positional model type is misbound

When an existing caller passes model_type positionally, the new parameter order binds that class to transaction_id; the class is then placed in the JSON payload, causing serialization to raise TypeError before the request is sent. The same incompatible ordering was added to both creation methods in DocumentsDB and VectorsDB.

Knowledge Base Used:

Prompt To Fix With AI
This is a comment left during a code review.
Path: appwrite/services/documents_db.py
Line: 952-953

Comment:
**Positional model type is misbound**

When an existing caller passes `model_type` positionally, the new parameter order binds that class to `transaction_id`; the class is then placed in the JSON payload, causing serialization to raise `TypeError` before the request is sent. The same incompatible ordering was added to both creation methods in DocumentsDB and VectorsDB.

**Knowledge Base Used:**
- [Document and vector database services](https://app.greptile.com/appwrite/-/custom-context/knowledge-base/appwrite/sdk-for-python/-/docs/document-and-vector-database-services.md)
- [API data contracts](https://app.greptile.com/appwrite/-/custom-context/knowledge-base/appwrite/sdk-for-python/-/docs/api-data-contracts.md)

---

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

Fix in Claude Code Fix in Codex

connectionport: float = Field(..., alias='connectionPort')
connectionuser: str = Field(..., alias='connectionUser')
connectionpassword: str = Field(..., alias='connectionPassword')
credentialgeneration: float = Field(..., alias='credentialGeneration')

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Nullable generation rejects valid responses

When the API returns credentialGeneration as null before the rotation contract is initialized, this required float fails Pydantic validation, causing the SDK to raise AppwriteException for an otherwise successful database response.

Suggested change
credentialgeneration: float = Field(..., alias='credentialGeneration')
credentialgeneration: Optional[float] = Field(default=None, alias='credentialGeneration')

Knowledge Base Used:

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

Comment:
**Nullable generation rejects valid responses**

When the API returns `credentialGeneration` as null before the rotation contract is initialized, this required `float` fails Pydantic validation, causing the SDK to raise `AppwriteException` for an otherwise successful database response.

```suggestion
    credentialgeneration: Optional[float] = Field(default=None, alias='credentialGeneration')
```

**Knowledge Base Used:**
- [API data contracts](https://app.greptile.com/appwrite/-/custom-context/knowledge-base/appwrite/sdk-for-python/-/docs/api-data-contracts.md)
- [Request transport and error handling](https://app.greptile.com/appwrite/-/custom-context/knowledge-base/appwrite/sdk-for-python/-/docs/request-transport-and-errors.md)

---

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

Fix in Claude Code Fix in Codex

Comment on lines +108 to +109
OAuth2Resend,
OAuth2Cloudflare,

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Provider union loses nominal type

When list_o_auth2_providers parses a Resend or Cloudflare response with the common provider fields, an earlier structurally identical member of this untagged union wins validation, causing callers to receive the wrong provider model and breaking isinstance-based dispatch.

Knowledge Base Used:

Prompt To Fix With AI
This is a comment left during a code review.
Path: appwrite/models/o_auth2_provider_list.py
Line: 108-109

Comment:
**Provider union loses nominal type**

When `list_o_auth2_providers` parses a Resend or Cloudflare response with the common provider fields, an earlier structurally identical member of this untagged union wins validation, causing callers to receive the wrong provider model and breaking `isinstance`-based dispatch.

**Knowledge Base Used:**
- [API data contracts](https://app.greptile.com/appwrite/-/custom-context/knowledge-base/appwrite/sdk-for-python/-/docs/api-data-contracts.md)
- [Project and platform services](https://app.greptile.com/appwrite/-/custom-context/knowledge-base/appwrite/sdk-for-python/-/docs/project-and-platform-services.md)

---

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

Fix in Claude Code Fix in Codex

@loks0n loks0n left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Release PR reviewed.

@loks0n
loks0n merged commit 61ab7a0 into main Sep 2, 2026
2 checks 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