Skip to content

Commit 679e812

Browse files
authored
Merge pull request #132 from appwrite/dev
feat: Python SDK update for version 15.1.0
2 parents de4ea57 + 8760db5 commit 679e812

File tree

427 files changed

+1692
-33
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

427 files changed

+1692
-33
lines changed

CHANGELOG.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
# Change Log
22

3+
## 15.1.0
4+
5+
* Add `dart-3.10` and `flutter-3.38` to `BuildRuntime` and `Runtime` enums
6+
* Fix `Roles` enum removed from Teams service; `roles` parameter now accepts `list[str]`
7+
* Add support for the new `Backups` service
8+
39
## 15.0.0
410

511
* Add array-based enum parameters (e.g., `permissions: list[BrowserPermission]`).
@@ -69,4 +75,4 @@
6975

7076
## 9.0.3
7177

72-
* Update sdk to use Numpy-style docstrings
78+
* Update sdk to use Numpy-style docstrings

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
[![Twitter Account](https://img.shields.io/twitter/follow/appwrite?color=00acee&label=twitter&style=flat-square)](https://twitter.com/appwrite)
77
[![Discord](https://img.shields.io/discord/564160730845151244?label=discord&style=flat-square)](https://appwrite.io/discord)
88

9-
**This SDK is compatible with Appwrite server version 1.8.x. For older versions, please check [previous releases](https://github.com/appwrite/sdk-for-python/releases).**
9+
**This SDK is compatible with Appwrite server version latest. For older versions, please check [previous releases](https://github.com/appwrite/sdk-for-python/releases).**
1010

1111
Appwrite is an open-source backend as a service server that abstracts and simplifies complex and repetitive development tasks behind a very simple to use REST API. Appwrite aims to help you develop your apps faster and in a more secure way. Use the Python SDK to integrate your app with the Appwrite server to easily start interacting with all of Appwrite backend APIs and tools. For full API documentation and tutorials go to [https://appwrite.io/docs](https://appwrite.io/docs)
1212

appwrite/client.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,11 @@ def __init__(self):
1515
self._endpoint = 'https://cloud.appwrite.io/v1'
1616
self._global_headers = {
1717
'content-type': '',
18-
'user-agent' : f'AppwritePythonSDK/15.0.0 ({platform.uname().system}; {platform.uname().version}; {platform.uname().machine})',
18+
'user-agent' : f'AppwritePythonSDK/15.1.0 ({platform.uname().system}; {platform.uname().version}; {platform.uname().machine})',
1919
'x-sdk-name': 'Python',
2020
'x-sdk-platform': 'server',
2121
'x-sdk-language': 'python',
22-
'x-sdk-version': '15.0.0',
22+
'x-sdk-version': '15.1.0',
2323
'X-Appwrite-Response-Format' : '1.8.0',
2424
}
2525

appwrite/encoders/value_class_encoder.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
from ..enums.timezone import Timezone
1010
from ..enums.browser_permission import BrowserPermission
1111
from ..enums.image_format import ImageFormat
12+
from ..enums.backup_services import BackupServices
1213
from ..enums.relationship_type import RelationshipType
1314
from ..enums.relation_mutate import RelationMutate
1415
from ..enums.index_type import IndexType
@@ -27,7 +28,6 @@
2728
from ..enums.adapter import Adapter
2829
from ..enums.compression import Compression
2930
from ..enums.image_gravity import ImageGravity
30-
from ..enums.roles import Roles
3131
from ..enums.password_hash import PasswordHash
3232
from ..enums.messaging_provider_type import MessagingProviderType
3333
from ..enums.database_type import DatabaseType
@@ -73,6 +73,9 @@ def default(self, o):
7373
if isinstance(o, ImageFormat):
7474
return o.value
7575

76+
if isinstance(o, BackupServices):
77+
return o.value
78+
7679
if isinstance(o, RelationshipType):
7780
return o.value
7881

@@ -127,9 +130,6 @@ def default(self, o):
127130
if isinstance(o, ImageGravity):
128131
return o.value
129132

130-
if isinstance(o, Roles):
131-
return o.value
132-
133133
if isinstance(o, PasswordHash):
134134
return o.value
135135

appwrite/enums/backup_services.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
from enum import Enum
2+
3+
class BackupServices(Enum):
4+
DATABASES = "databases"
5+
FUNCTIONS = "functions"
6+
STORAGE = "storage"

appwrite/enums/build_runtime.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,6 @@ class BuildRuntime(Enum):
2323
PYTHON_3_12 = "python-3.12"
2424
PYTHON_ML_3_11 = "python-ml-3.11"
2525
PYTHON_ML_3_12 = "python-ml-3.12"
26-
DENO_1_21 = "deno-1.21"
27-
DENO_1_24 = "deno-1.24"
28-
DENO_1_35 = "deno-1.35"
2926
DENO_1_40 = "deno-1.40"
3027
DENO_1_46 = "deno-1.46"
3128
DENO_2_0 = "deno-2.0"
@@ -40,6 +37,7 @@ class BuildRuntime(Enum):
4037
DART_3_5 = "dart-3.5"
4138
DART_3_8 = "dart-3.8"
4239
DART_3_9 = "dart-3.9"
40+
DART_3_10 = "dart-3.10"
4341
DOTNET_6_0 = "dotnet-6.0"
4442
DOTNET_7_0 = "dotnet-7.0"
4543
DOTNET_8_0 = "dotnet-8.0"
@@ -68,3 +66,4 @@ class BuildRuntime(Enum):
6866
FLUTTER_3_29 = "flutter-3.29"
6967
FLUTTER_3_32 = "flutter-3.32"
7068
FLUTTER_3_35 = "flutter-3.35"
69+
FLUTTER_3_38 = "flutter-3.38"

appwrite/enums/roles.py

Lines changed: 0 additions & 6 deletions
This file was deleted.

appwrite/enums/runtime.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,6 @@ class Runtime(Enum):
2323
PYTHON_3_12 = "python-3.12"
2424
PYTHON_ML_3_11 = "python-ml-3.11"
2525
PYTHON_ML_3_12 = "python-ml-3.12"
26-
DENO_1_21 = "deno-1.21"
27-
DENO_1_24 = "deno-1.24"
28-
DENO_1_35 = "deno-1.35"
2926
DENO_1_40 = "deno-1.40"
3027
DENO_1_46 = "deno-1.46"
3128
DENO_2_0 = "deno-2.0"
@@ -40,6 +37,7 @@ class Runtime(Enum):
4037
DART_3_5 = "dart-3.5"
4138
DART_3_8 = "dart-3.8"
4239
DART_3_9 = "dart-3.9"
40+
DART_3_10 = "dart-3.10"
4341
DOTNET_6_0 = "dotnet-6.0"
4442
DOTNET_7_0 = "dotnet-7.0"
4543
DOTNET_8_0 = "dotnet-8.0"
@@ -68,3 +66,4 @@ class Runtime(Enum):
6866
FLUTTER_3_29 = "flutter-3.29"
6967
FLUTTER_3_32 = "flutter-3.32"
7068
FLUTTER_3_35 = "flutter-3.35"
69+
FLUTTER_3_38 = "flutter-3.38"

appwrite/enums/scopes.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,3 +56,11 @@ class Scopes(Enum):
5656
ASSISTANT_READ = "assistant.read"
5757
TOKENS_READ = "tokens.read"
5858
TOKENS_WRITE = "tokens.write"
59+
POLICIES_WRITE = "policies.write"
60+
POLICIES_READ = "policies.read"
61+
ARCHIVES_READ = "archives.read"
62+
ARCHIVES_WRITE = "archives.write"
63+
RESTORATIONS_READ = "restorations.read"
64+
RESTORATIONS_WRITE = "restorations.write"
65+
DOMAINS_READ = "domains.read"
66+
DOMAINS_WRITE = "domains.write"

0 commit comments

Comments
 (0)