Skip to content

Commit 503de4b

Browse files
authored
Merge pull request #109 from appwrite/dev
Dev
2 parents 2415efa + 580d8c2 commit 503de4b

File tree

317 files changed

+2611
-366
lines changed

Some content is hidden

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

317 files changed

+2611
-366
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
# Appwrite Python SDK
22

33
![License](https://img.shields.io/github/license/appwrite/sdk-for-python.svg?style=flat-square)
4-
![Version](https://img.shields.io/badge/api%20version-1.6.2-blue.svg?style=flat-square)
4+
![Version](https://img.shields.io/badge/api%20version-1.7.0-blue.svg?style=flat-square)
55
[![Build Status](https://img.shields.io/travis/com/appwrite/sdk-generator?style=flat-square)](https://travis-ci.com/appwrite/sdk-generator)
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.6.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 1.7.x. 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 abstract and simplify 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: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,12 @@ def __init__(self):
1414
self._endpoint = 'https://cloud.appwrite.io/v1'
1515
self._global_headers = {
1616
'content-type': '',
17-
'user-agent' : f'AppwritePythonSDK/10.0.0 ({platform.uname().system}; {platform.uname().version}; {platform.uname().machine})',
17+
'user-agent' : f'AppwritePythonSDK/11.0.0 ({platform.uname().system}; {platform.uname().version}; {platform.uname().machine})',
1818
'x-sdk-name': 'Python',
1919
'x-sdk-platform': 'server',
2020
'x-sdk-language': 'python',
21-
'x-sdk-version': '10.0.0',
22-
'X-Appwrite-Response-Format' : '1.6.0',
21+
'x-sdk-version': '11.0.0',
22+
'X-Appwrite-Response-Format' : '1.7.0',
2323
}
2424

2525
def set_self_signed(self, status=True):

appwrite/encoders/value_class_encoder.py

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,15 @@
99
from ..enums.relation_mutate import RelationMutate
1010
from ..enums.index_type import IndexType
1111
from ..enums.runtime import Runtime
12+
from ..enums.vcs_deployment_type import VCSDeploymentType
13+
from ..enums.deployment_download_type import DeploymentDownloadType
1214
from ..enums.execution_method import ExecutionMethod
1315
from ..enums.name import Name
1416
from ..enums.message_priority import MessagePriority
1517
from ..enums.smtp_encryption import SmtpEncryption
18+
from ..enums.framework import Framework
19+
from ..enums.build_runtime import BuildRuntime
20+
from ..enums.adapter import Adapter
1621
from ..enums.compression import Compression
1722
from ..enums.image_gravity import ImageGravity
1823
from ..enums.image_format import ImageFormat
@@ -51,6 +56,12 @@ def default(self, o):
5156
if isinstance(o, Runtime):
5257
return o.value
5358

59+
if isinstance(o, VCSDeploymentType):
60+
return o.value
61+
62+
if isinstance(o, DeploymentDownloadType):
63+
return o.value
64+
5465
if isinstance(o, ExecutionMethod):
5566
return o.value
5667

@@ -63,6 +74,15 @@ def default(self, o):
6374
if isinstance(o, SmtpEncryption):
6475
return o.value
6576

77+
if isinstance(o, Framework):
78+
return o.value
79+
80+
if isinstance(o, BuildRuntime):
81+
return o.value
82+
83+
if isinstance(o, Adapter):
84+
return o.value
85+
6686
if isinstance(o, Compression):
6787
return o.value
6888

appwrite/enums/adapter.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
from enum import Enum
2+
3+
class Adapter(Enum):
4+
STATIC = "static"
5+
SSR = "ssr"

appwrite/enums/build_runtime.py

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
from enum import Enum
2+
3+
class BuildRuntime(Enum):
4+
NODE_14_5 = "node-14.5"
5+
NODE_16_0 = "node-16.0"
6+
NODE_18_0 = "node-18.0"
7+
NODE_19_0 = "node-19.0"
8+
NODE_20_0 = "node-20.0"
9+
NODE_21_0 = "node-21.0"
10+
NODE_22 = "node-22"
11+
PHP_8_0 = "php-8.0"
12+
PHP_8_1 = "php-8.1"
13+
PHP_8_2 = "php-8.2"
14+
PHP_8_3 = "php-8.3"
15+
RUBY_3_0 = "ruby-3.0"
16+
RUBY_3_1 = "ruby-3.1"
17+
RUBY_3_2 = "ruby-3.2"
18+
RUBY_3_3 = "ruby-3.3"
19+
PYTHON_3_8 = "python-3.8"
20+
PYTHON_3_9 = "python-3.9"
21+
PYTHON_3_10 = "python-3.10"
22+
PYTHON_3_11 = "python-3.11"
23+
PYTHON_3_12 = "python-3.12"
24+
PYTHON_ML_3_11 = "python-ml-3.11"
25+
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"
29+
DENO_1_40 = "deno-1.40"
30+
DENO_1_46 = "deno-1.46"
31+
DENO_2_0 = "deno-2.0"
32+
DART_2_15 = "dart-2.15"
33+
DART_2_16 = "dart-2.16"
34+
DART_2_17 = "dart-2.17"
35+
DART_2_18 = "dart-2.18"
36+
DART_2_19 = "dart-2.19"
37+
DART_3_0 = "dart-3.0"
38+
DART_3_1 = "dart-3.1"
39+
DART_3_3 = "dart-3.3"
40+
DART_3_5 = "dart-3.5"
41+
DOTNET_6_0 = "dotnet-6.0"
42+
DOTNET_7_0 = "dotnet-7.0"
43+
DOTNET_8_0 = "dotnet-8.0"
44+
JAVA_8_0 = "java-8.0"
45+
JAVA_11_0 = "java-11.0"
46+
JAVA_17_0 = "java-17.0"
47+
JAVA_18_0 = "java-18.0"
48+
JAVA_21_0 = "java-21.0"
49+
JAVA_22 = "java-22"
50+
SWIFT_5_5 = "swift-5.5"
51+
SWIFT_5_8 = "swift-5.8"
52+
SWIFT_5_9 = "swift-5.9"
53+
SWIFT_5_10 = "swift-5.10"
54+
KOTLIN_1_6 = "kotlin-1.6"
55+
KOTLIN_1_8 = "kotlin-1.8"
56+
KOTLIN_1_9 = "kotlin-1.9"
57+
KOTLIN_2_0 = "kotlin-2.0"
58+
CPP_17 = "cpp-17"
59+
CPP_20 = "cpp-20"
60+
BUN_1_0 = "bun-1.0"
61+
BUN_1_1 = "bun-1.1"
62+
GO_1_23 = "go-1.23"
63+
STATIC_1 = "static-1"
64+
FLUTTER_3_24 = "flutter-3.24"
65+
FLUTTER_3_27 = "flutter-3.27"
66+
FLUTTER_3_29 = "flutter-3.29"
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
from enum import Enum
2+
3+
class DeploymentDownloadType(Enum):
4+
SOURCE = "source"
5+
OUTPUT = "output"

appwrite/enums/framework.py

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
from enum import Enum
2+
3+
class Framework(Enum):
4+
ANALOG = "analog"
5+
ANGULAR = "angular"
6+
NEXTJS = "nextjs"
7+
REACT = "react"
8+
NUXT = "nuxt"
9+
VUE = "vue"
10+
SVELTEKIT = "sveltekit"
11+
ASTRO = "astro"
12+
REMIX = "remix"
13+
LYNX = "lynx"
14+
FLUTTER = "flutter"
15+
REACT_NATIVE = "react-native"
16+
VITE = "vite"
17+
OTHER = "other"

appwrite/enums/image_format.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
class ImageFormat(Enum):
44
JPG = "jpg"
55
JPEG = "jpeg"
6-
GIF = "gif"
76
PNG = "png"
87
WEBP = "webp"
98
HEIC = "heic"

appwrite/enums/runtime.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ class Runtime(Enum):
2222
PYTHON_3_11 = "python-3.11"
2323
PYTHON_3_12 = "python-3.12"
2424
PYTHON_ML_3_11 = "python-ml-3.11"
25+
PYTHON_ML_3_12 = "python-ml-3.12"
2526
DENO_1_21 = "deno-1.21"
2627
DENO_1_24 = "deno-1.24"
2728
DENO_1_35 = "deno-1.35"
@@ -32,6 +33,7 @@ class Runtime(Enum):
3233
DART_2_16 = "dart-2.16"
3334
DART_2_17 = "dart-2.17"
3435
DART_2_18 = "dart-2.18"
36+
DART_2_19 = "dart-2.19"
3537
DART_3_0 = "dart-3.0"
3638
DART_3_1 = "dart-3.1"
3739
DART_3_3 = "dart-3.3"
@@ -60,3 +62,5 @@ class Runtime(Enum):
6062
GO_1_23 = "go-1.23"
6163
STATIC_1 = "static-1"
6264
FLUTTER_3_24 = "flutter-3.24"
65+
FLUTTER_3_27 = "flutter-3.27"
66+
FLUTTER_3_29 = "flutter-3.29"

appwrite/enums/vcs_deployment_type.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 VCSDeploymentType(Enum):
4+
BRANCH = "branch"
5+
COMMIT = "commit"
6+
TAG = "tag"

appwrite/services/avatars.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ def get_browser(self, code: Browser, width: float = None, height: float = None,
2525
height : float
2626
Image height. Pass an integer between 0 to 2000. Defaults to 100.
2727
quality : float
28-
Image quality. Pass an integer between 0 to 100. Defaults to 100.
28+
Image quality. Pass an integer between 0 to 100. Defaults to keep existing image quality.
2929
3030
Returns
3131
-------
@@ -68,7 +68,7 @@ def get_credit_card(self, code: CreditCard, width: float = None, height: float =
6868
height : float
6969
Image height. Pass an integer between 0 to 2000. Defaults to 100.
7070
quality : float
71-
Image quality. Pass an integer between 0 to 100. Defaults to 100.
71+
Image quality. Pass an integer between 0 to 100. Defaults to keep existing image quality.
7272
7373
Returns
7474
-------
@@ -144,7 +144,7 @@ def get_flag(self, code: Flag, width: float = None, height: float = None, qualit
144144
height : float
145145
Image height. Pass an integer between 0 to 2000. Defaults to 100.
146146
quality : float
147-
Image quality. Pass an integer between 0 to 100. Defaults to 100.
147+
Image quality. Pass an integer between 0 to 100. Defaults to keep existing image quality.
148148
149149
Returns
150150
-------

0 commit comments

Comments
 (0)