Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# Change Log

## 14.0.0

* Rename `VCSDeploymentType` enum to `VCSReferenceType`
* Change `create_template_deployment` method signature: replace `version` parameter with `type` (TemplateReferenceType) and `reference` parameters
* Add `get_screenshot` method to `Avatars` service
* Add `Theme`, `Timezone` and `Output` enums
* Add support for dart39 and flutter335 runtimes

## 13.6.1

* Fix passing of `None` to nullable parameters
Expand Down
4 changes: 2 additions & 2 deletions appwrite/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,11 @@ def __init__(self):
self._endpoint = 'https://cloud.appwrite.io/v1'
self._global_headers = {
'content-type': '',
'user-agent' : f'AppwritePythonSDK/13.6.1 ({platform.uname().system}; {platform.uname().version}; {platform.uname().machine})',
'user-agent' : f'AppwritePythonSDK/14.0.0 ({platform.uname().system}; {platform.uname().version}; {platform.uname().machine})',
'x-sdk-name': 'Python',
'x-sdk-platform': 'server',
'x-sdk-language': 'python',
'x-sdk-version': '13.6.1',
'x-sdk-version': '14.0.0',
'X-Appwrite-Response-Format' : '1.8.0',
}

Expand Down
20 changes: 18 additions & 2 deletions appwrite/encoders/value_class_encoder.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,15 @@
from ..enums.browser import Browser
from ..enums.credit_card import CreditCard
from ..enums.flag import Flag
from ..enums.theme import Theme
from ..enums.timezone import Timezone
from ..enums.output import Output
from ..enums.relationship_type import RelationshipType
from ..enums.relation_mutate import RelationMutate
from ..enums.index_type import IndexType
from ..enums.runtime import Runtime
from ..enums.vcs_deployment_type import VCSDeploymentType
from ..enums.template_reference_type import TemplateReferenceType
from ..enums.vcs_reference_type import VCSReferenceType
from ..enums.deployment_download_type import DeploymentDownloadType
from ..enums.execution_method import ExecutionMethod
from ..enums.name import Name
Expand Down Expand Up @@ -54,6 +58,15 @@ def default(self, o):
if isinstance(o, Flag):
return o.value

if isinstance(o, Theme):
return o.value

if isinstance(o, Timezone):
return o.value

if isinstance(o, Output):
return o.value

if isinstance(o, RelationshipType):
return o.value

Expand All @@ -66,7 +79,10 @@ def default(self, o):
if isinstance(o, Runtime):
return o.value

if isinstance(o, VCSDeploymentType):
if isinstance(o, TemplateReferenceType):
return o.value

if isinstance(o, VCSReferenceType):
return o.value

if isinstance(o, DeploymentDownloadType):
Expand Down
2 changes: 2 additions & 0 deletions appwrite/enums/build_runtime.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ class BuildRuntime(Enum):
DART_3_3 = "dart-3.3"
DART_3_5 = "dart-3.5"
DART_3_8 = "dart-3.8"
DART_3_9 = "dart-3.9"
DOTNET_6_0 = "dotnet-6.0"
DOTNET_7_0 = "dotnet-7.0"
DOTNET_8_0 = "dotnet-8.0"
Expand Down Expand Up @@ -66,3 +67,4 @@ class BuildRuntime(Enum):
FLUTTER_3_27 = "flutter-3.27"
FLUTTER_3_29 = "flutter-3.29"
FLUTTER_3_32 = "flutter-3.32"
FLUTTER_3_35 = "flutter-3.35"
10 changes: 10 additions & 0 deletions appwrite/enums/output.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
from enum import Enum

class Output(Enum):
JPG = "jpg"
JPEG = "jpeg"
PNG = "png"
WEBP = "webp"
HEIC = "heic"
AVIF = "avif"
GIF = "gif"
2 changes: 2 additions & 0 deletions appwrite/enums/runtime.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ class Runtime(Enum):
DART_3_3 = "dart-3.3"
DART_3_5 = "dart-3.5"
DART_3_8 = "dart-3.8"
DART_3_9 = "dart-3.9"
DOTNET_6_0 = "dotnet-6.0"
DOTNET_7_0 = "dotnet-7.0"
DOTNET_8_0 = "dotnet-8.0"
Expand Down Expand Up @@ -66,3 +67,4 @@ class Runtime(Enum):
FLUTTER_3_27 = "flutter-3.27"
FLUTTER_3_29 = "flutter-3.29"
FLUTTER_3_32 = "flutter-3.32"
FLUTTER_3_35 = "flutter-3.35"
6 changes: 6 additions & 0 deletions appwrite/enums/template_reference_type.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
from enum import Enum

class TemplateReferenceType(Enum):
BRANCH = "branch"
COMMIT = "commit"
TAG = "tag"
5 changes: 5 additions & 0 deletions appwrite/enums/theme.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
from enum import Enum

class Theme(Enum):
LIGHT = "light"
DARK = "dark"
Loading