appwrite / appwrite/sdk-for-python

🚀 Feature: Python SDK does not validate row data against table schema before insertion

未关闭
#134 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看
主要语言
Python
星标
268
派生
67
平均合并
11 小时 59 分钟
30 天内合并 PR
2

描述

### 🔖 Feature description

The Python SDK allows defining table schemas (required fields, data types, defaults), but create_row does not perform any client-side validation against this schema.

As a result, issues like missing required fields or incorrect data types are only caught server-side after the API request, leading to delayed and less clear errors.

### 🎤 Pitch

The Python SDK already has full knowledge of the table schema at creation time (required fields, data types, defaults), but this information is not used when inserting rows. This leads to avoidable runtime errors that are only discovered after a network request.

* Adding optional client-side validation would:

* Catch simple mistakes (missing required fields, wrong data types) immediately

* Provide clearer, Python-native error messages

* Reduce unnecessary API calls and debugging time

* Improve onboarding and overall developer experience

This does not replace server-side validation, but complements it by shifting basic checks closer to the developer.

### 👀 Have you spent some time to check if this issue has been raised before?

- [x] I checked and didn't find similar issue

### 🏢 Have you read the Code of Conduct?

- [x] I have read the [Code of Conduct](https://github.com/appwrite/appwrite/blob/master/CODE_OF_CONDUCT.md)

贡献指南

打开贡献指南

调研方向

首先定位 Python SDK 的 create_row 入口点及其使用的表模式定义。确定必填字段、数据类型和默认值是如何表示的,然后定义针对无效行的验证行为和 Python 原生错误,同时保留服务器端验证。

由索引模型根据 Issue 内容生成。

评估

技术栈
python
领域
databases
Issue 类型
功能
难度
4/5
预计耗时
3-5 天
活跃度
停滞
描述清晰度
基本清楚
新手友好度
35/100

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。