You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+13-3Lines changed: 13 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -49,10 +49,16 @@ client = Client()
49
49
### Make Your First Request
50
50
Once your SDK object is set, create any of the Appwrite service objects and choose any request to send. Full documentation for any service method you would like to use can be found in your SDK documentation or in the [API References](https://appwrite.io/docs) section.
51
51
52
+
All service methods return typed Pydantic models, so you can access response fields as attributes:
53
+
52
54
```python
53
55
users = Users(client)
54
56
55
-
result = users.create(ID.unique(), email="email@example.com", phone="+123456789", password="password", name="Walter O'Brien")
57
+
user = users.create(ID.unique(), email="email@example.com", phone="+123456789", password="password", name="Walter O'Brien")
58
+
59
+
print(user.name) # "Walter O'Brien"
60
+
print(user.email) # "email@example.com"
61
+
print(user.id) # The generated user ID
56
62
```
57
63
58
64
### Full Example
@@ -72,7 +78,10 @@ client = Client()
72
78
73
79
users = Users(client)
74
80
75
-
result = users.create(ID.unique(), email="email@example.com", phone="+123456789", password="password", name="Walter O'Brien")
81
+
user = users.create(ID.unique(), email="email@example.com", phone="+123456789", password="password", name="Walter O'Brien")
82
+
83
+
print(user.name) # Access fields as attributes
84
+
print(user.to_dict()) # Convert to dictionary if needed
76
85
```
77
86
78
87
### Error Handling
@@ -81,7 +90,8 @@ The Appwrite Python SDK raises `AppwriteException` object with `message`, `code`
81
90
```python
82
91
users = Users(client)
83
92
try:
84
-
result = users.create(ID.unique(), email="email@example.com", phone="+123456789", password="password", name="Walter O'Brien")
93
+
user = users.create(ID.unique(), email="email@example.com", phone="+123456789", password="password", name="Walter O'Brien")
description = "Appwrite is an open-source self-hosted backend server that abstracts and simplifies complex and repetitive development tasks behind a very simple REST API"
Copy file name to clipboardExpand all lines: setup.py
+2-2Lines changed: 2 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -8,7 +8,7 @@
8
8
setuptools.setup(
9
9
name='appwrite',
10
10
packages=setuptools.find_packages(),
11
-
version='15.3.0',
11
+
version='16.0.0',
12
12
license='BSD-3-Clause',
13
13
description='Appwrite is an open-source self-hosted backend server that abstracts and simplifies complex and repetitive development tasks behind a very simple REST API',
0 commit comments